Comment in empty array type breaks code #13588
Labels
area:comments
Issues with how Prettier prints comments
lang:flow
Issues affecting Flow-specific constructs (not general JS issues)
lang:typescript
Issues affecting TypeScript-specific constructs (not general JS issues)
type:bug
Issues identifying ugly output, or a defect in the program
Prettier 2.7.1
Playground link
Input:
Output:
The code is broken and no longer parsable as correct typescript. This happens both with "typescript" and "babel-ts" parsers.
Expected behavior:
Output should stay the same as input.
This is similar to #9299 but there it breaks only if there's a colon before the comment but with typescript it breaks any empty array type.
The text was updated successfully, but these errors were encountered: