Exclude semicolon from DoWhileStatement (#18851)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
fisker Cheungandautofix-ci[bot] authored and GitHub committed 2026-02-03 21:26:09 +08:00
1 parent 11c31c6b61
commit 5d0e890a50
7 files changed
+146 -6

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
#### Improve `do..while` print in `no-semi` mode (#18851 by @fisker)
<!-- prettier-ignore -->
```jsx
// Input
do {
doStuff()
} while (1)
// comment
;[foo, bar].forEach(doStuff)
// Prettier stable
do {
doStuff()
} while (
1
// comment
)
;[foo, bar].forEach(doStuff)
// Prettier main
do {
doStuff()
} while (1)
// comment
;[foo, bar].forEach(doStuff)
```