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

Ugly formatting for class implements with long type parameters #8943

Closed
sosukesuzuki opened this issue Aug 10, 2020 · 4 comments · Fixed by #8967
Closed

Ugly formatting for class implements with long type parameters #8943

sosukesuzuki opened this issue Aug 10, 2020 · 4 comments · Fixed by #8967
Assignees
Labels
lang:typescript Issues affecting TypeScript-specific constructs (not general JS issues) locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:bug Issues identifying ugly output, or a defect in the program
Milestone

Comments

@sosukesuzuki
Copy link
Member

This is regression on master. I found this when work on #8941.
Prettier pr-8931(Current master)
Playground link

--parser typescript

Input:

class ReallyReallyLongName2<
  TypeArgumentNumberOne,
  TypeArgumentNumberTwo,
  TypeArgumentNumberThree
> implements BaseInterface {}

Output:

class ReallyReallyLongName2<
    TypeArgumentNumberOne,
    TypeArgumentNumberTwo,
    TypeArgumentNumberThree
  >
  implements BaseInterface {}

Expected behavior(2.0.5 output):

class ReallyReallyLongName2<
  TypeArgumentNumberOne,
  TypeArgumentNumberTwo,
  TypeArgumentNumberThree
> implements BaseInterface {}
@sosukesuzuki sosukesuzuki added type:bug Issues identifying ugly output, or a defect in the program lang:typescript Issues affecting TypeScript-specific constructs (not general JS issues) labels Aug 10, 2020
@sosukesuzuki sosukesuzuki self-assigned this Aug 10, 2020
@fisker
Copy link
Member

fisker commented Aug 10, 2020

Is this changed by #8312?

@fisker
Copy link
Member

fisker commented Aug 10, 2020

That's the one, but I'm not sure it's bug.

@sosukesuzuki
Copy link
Member Author

this does not happen for extends. If this is not bug, I thnik we should unify behaviors.

@fisker

This comment has been minimized.

@sosukesuzuki sosukesuzuki added this to the 2.1 milestone Aug 15, 2020
@github-actions github-actions bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Nov 18, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lang:typescript Issues affecting TypeScript-specific constructs (not general JS issues) locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:bug Issues identifying ugly output, or a defect in the program
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants