lukeed/tidyPublic

fix: stable comments in parens

A comment after an expression, inside parentheses around it, prints
after them, where the next formatting finds it before the ) of the
expression around it or the ; of the statement and moves it again.
decorate now takes its nodes from where it ends up, unless Prettier
prints it inside: unary operands, JSX, and sequences or assignments
that its parenthesized-trailing-comment rule keeps. Recorded as the
approved deviation js-stable-output.
LELuke Edwards authored
d49dfb9Patch
Parent13342b7
4 files changed+89-1
StackedSplit
crates/tidy/src/js/ast/comments.rs+42 −1
crates/tidy/tests/deviations.json+14 −0
crates/tidy/tests/js.rs+19 −0
deviations.md+14 −0