Exclude semicolon from DoWhileStatement (#18851)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
11c31c6b61
commit
5d0e890a50
7 files changed
+146
-6
No files matched your search
@@ -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)
|
||||
```
|
||||
Reference in new issue
Block a user