Adding prettier-ignore comment in JSX doubles the comment #8736
Labels
area:comments
Issues with how Prettier prints comments
locked-due-to-inactivity
Please open a new issue and fill out the template instead of commenting.
type:bug
Issues identifying ugly output, or a defect in the program
Prettier 2.0.5
Playground link
Input:
Output:
Expected behavior:
I would expect prettier to ignore this ugly block entirely. This is probably a pretty uncommon use case, but I was trying to get a
ts-ignore
comment to work in JSX by following instructions here (microsoft/TypeScript#27552 (comment)) and ended up in this state where every time I saved the file, prettier auto formatting would double the number of comments I hadThe text was updated successfully, but these errors were encountered: