Files
test-repo/changelog_unreleased/javascript/18851.md
T
fisker Cheungandautofix-ci[bot] 5d0e890a50 Exclude semicolon from DoWhileStatement (#18851)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-02-03 21:26:09 +08:00

369 B

Improve do..while print in no-semi mode (#18851 by @fisker)

// 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)