-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Comments in typescript type unions move to incorrect place #10344
Copy link
Copy link
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentsarea:union typeslang:flowIssues affecting Flow-specific constructs (not general JS issues)Issues affecting Flow-specific constructs (not general JS issues)lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Metadata
Metadata
Assignees
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentsarea:union typeslang:flowIssues affecting Flow-specific constructs (not general JS issues)Issues affecting Flow-specific constructs (not general JS issues)lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Prettier 2.2.1
Playground link
Input:
Output:
Expected behavior:
The comment should stay on the correct side of the
|(like it does withconst):