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

This commit is contained in:
fisker Cheung authored and GitHub committed 2026-01-18 01:30:03 +08:00
1 parent 8c82557983
commit 62309811c0
11 files changed
+465 -84

No files matched your search

+29
View File
@@ -0,0 +1,29 @@
#### 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,
);
```