Back to Prettier

18669

changelog_unreleased/javascript/18669.md

3.9.0352 B
Original Source

Fix inconsistent comment attach between NewExpression and CallExpression (#18669 by @fisker)

<!-- prettier-ignore -->
jsx
// Input
foo( // comment
  bar
);
new Foo( // comment
  bar
);

// Prettier stable
foo(
  // comment
  bar,
);
new Foo(bar); // comment

// Prettier main
foo(
  // comment
  bar,
);
new Foo(
  // comment
  bar,
);