Fix displacing of comments in default switch case (#14047)
This commit is contained in:
1 parent
32d46d9fa1
commit
201e02e14e
4 files changed
+111
-1
No files matched your search
@@ -0,0 +1,27 @@
|
||||
#### Fix displacing of comments in default switch case (#14047 by @thorn0)
|
||||
|
||||
It was a regression in Prettier 2.6.0.
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```jsx
|
||||
// Input
|
||||
switch (state) {
|
||||
default:
|
||||
result = state; // no change
|
||||
break;
|
||||
}
|
||||
|
||||
// Prettier stable
|
||||
switch (state) {
|
||||
default: // no change
|
||||
result = state;
|
||||
break;
|
||||
}
|
||||
|
||||
// Prettier main
|
||||
switch (state) {
|
||||
default:
|
||||
result = state; // no change
|
||||
break;
|
||||
}
|
||||
```
|
||||
Reference in new issue
Block a user