Fix inconsistent comment attach between NewExpression and CallExpression (#18669)
This commit is contained in:
1 parent
8c82557983
commit
62309811c0
11 files changed
+465
-84
No files matched your search
@@ -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,
|
||||
);
|
||||
```
|
||||
Reference in new issue
Block a user