Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve formatting of ClassDeclaration with BaseList + Constraints #275

Closed
belav opened this issue Jun 7, 2021 · 0 comments · Fixed by #279
Closed

Improve formatting of ClassDeclaration with BaseList + Constraints #275

belav opened this issue Jun 7, 2021 · 0 comments · Fixed by #279
Milestone

Comments

@belav
Copy link
Owner

belav commented Jun 7, 2021

This will probably require the Align doc type, which hasn't been ported from prettier yet.

public class ThisIsSomeLongNameAndItShouldFormatWell2<T, T2, T3> :
    AnotherLongClassName<T>,
    AnotherClassName
    where T : new(), AnotherTypeConstraint
    where T2 : new()
    where T3 : new() { }
// if we format this way instead, it visually separates the base list from the constraints 
public class ThisIsSomeLongNameAndItShouldFormatWell2<T, T2, T3>
    : AnotherLongClassName<T>,
      AnotherClassName
    where T : new(), AnotherTypeConstraint
    where T2 : new()
    where T3 : new() { }
@belav belav added this to the 0.9.6 milestone Jun 7, 2021
belav added a commit that referenced this issue Jun 7, 2021
belav added a commit that referenced this issue Jun 10, 2021
belav added a commit that referenced this issue Jun 10, 2021
@belav belav changed the title ClassDeclaration with BaseList + Constraints Improve formatting of ClassDeclaration with BaseList + Constraints Jun 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant