-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Last indented list item inline comment is being moved to outer comment and combined with existing comment #11910
Copy link
Copy link
Closed
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang: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.status:needs investigationIssues that need additional investigation, e.g. to understand whether the reported behavior is a bugIssues that need additional investigation, e.g. to understand whether the reported behavior is a bug
Metadata
Metadata
Assignees
Labels
area:commentsIssues with how Prettier prints commentsIssues with how Prettier prints commentslang: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.status:needs investigationIssues that need additional investigation, e.g. to understand whether the reported behavior is a bugIssues that need additional investigation, e.g. to understand whether the reported behavior is a bug
Prettier 2.5.0
Playground link
Input:
Output:
Expected behavior:
The placement of
Comment2in the sample output is the point of concern.Curiously, using 'flow', 'babel', 'babel-flow' and 'typescript' parsers, the same incorrect output is obtained.
But: when using
babel-tsas the parser, it seems to generate the expected output.So, I'm thinking this is a bug in Prettier rather than in the parsers?