Typescript: Prettier incorrectly breaks up constructor properties from modifiers when there is a decorator and comment before it #16207
Labels
area:comments
Issues with how Prettier prints comments
lang:typescript
Issues affecting TypeScript-specific constructs (not general JS issues)
type:bug
Issues identifying ugly output, or a defect in the program
Prettier 3.2.5
Playground link
Input:
Output:
Expected output:
Why?
Because
protected readonly
on a separate line is invalid Typescript syntax, plus theprettier-ignore
comment applies to the next line, so by moving it down the scope has changedThe text was updated successfully, but these errors were encountered: