Back to Prettier

19263

changelog_unreleased/javascript/19263.md

3.9.0406 B
Original Source

Keep trailing comments inside the parentheses of a sequence or assignment expression (#19263 by @sarathfrancis90)

<!-- prettier-ignore -->
jsx
// Input
const x = (a, b, c /* comment */);
const y = (a = b /* comment */);

// Prettier stable
const x = (a, b, c) /* comment */;
const y = (a = b) /* comment */;

// Prettier main
const x = (a, b, c /* comment */);
const y = (a = b /* comment */);