Prettier 3.9.9
Playground link
--parser typescript
--range-start 19
--range-end 42
Input:
// prettier-ignore
const a = [1,2, 3];
Output:
// prettier-ignore
const a = [1, 2, 3];
Expected output:
// prettier-ignore
const a = [1,2, 3];
Why?
The range is exactly the ignored statement. The // prettier-ignore comment is outside the range, so the statement is formatted. Formatting the whole file keeps it as written.
Also reproduces on main (88d8e96).
Prettier 3.9.9
Playground link
Input:
Output:
Expected output:
Why?
The range is exactly the ignored statement. The
// prettier-ignorecomment is outside the range, so the statement is formatted. Formatting the whole file keeps it as written.Also reproduces on
main(88d8e96).