Keep parentheses in yield expression (#19913)
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
1 parent
c4c3320496
commit
f6ddf6e437
6 files changed
+163
-16
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#### Keep necessary parentheses in `yield` expression (#19913 by @giaBaoJS)
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```jsx
|
||||
// Input
|
||||
function* f() {
|
||||
yield (/*
|
||||
*/ a);
|
||||
}
|
||||
|
||||
// Prettier stable
|
||||
function* f() {
|
||||
yield /*
|
||||
*/ a;
|
||||
}
|
||||
|
||||
// Prettier main
|
||||
function* f() {
|
||||
yield (
|
||||
/*
|
||||
*/ a
|
||||
);
|
||||
}
|
||||
```
|
||||
Reference in new issue
Block a user