Files
test-repo/changelog_unreleased/javascript/pr-9345.md
T
Sosuke Suzuki bb238f5765 Fix placing leading comments for a body of while statement (#9345)
* Add leading comments for while

* Add tests

* Add changelog
2020-10-08 17:08:40 +09:00

21 lines
270 B
Markdown

#### Fix placing leading comments for a body of while statement (#9345 by @sosukesuzuki)
<!-- prettier-ignore -->
```js
// Input
while(1) // Comment
foo();
// Prettier stable
while (
1 // Comment
)
foo();
// Prettier master
while (1)
// Comment
foo();
```