-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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.
Description
Prettier 2.2.1
Playground link
--parser typescript
--trailing-comma all
Input:
type Foo = "1" | "2" /* two */ | "3";
const Foo = "1" | "2" /*two*/ | "3";
Output:
type Foo = "1" | "2" | /* two */ "3";
const Foo = "1" | "2" /*two*/ | "3";
Expected behavior:
The comment should stay on the correct side of the |
(like it does with const
):
type Foo = "1" | "2" /* two */ | "3";
const Foo = "1" | "2" /*two*/ | "3";
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.