Back to Prettier

18851

changelog_unreleased/javascript/18851.md

3.9.0368 B
Original Source

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)