Fix unstable trailing comment on a nested parenthesized assignment (#19893)

Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
Miodrag Obradovicandfisker authored and GitHub committed 2026-08-20 12:28:29 +08:00
1 parent 52d170534e
commit 24a616d0b7
7 files changed
+69 -26

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#### Fix unstable trailing comment on a nested parenthesized assignment (#19893 by @Kjubikstronk)
<!-- prettier-ignore -->
```jsx
// Input
assigned = (a = c /* comment */);
// Prettier stable (First format)
assigned = a = c /* comment */;
// Prettier stable (Second format)
assigned = a = c; /* comment */
// Prettier main
assigned = a = c; /* comment */
```