Fix missing parentheses around throw expression (#20028)
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
1 parent
c150b07c07
commit
60a1d7ec78
7 files changed
+301
-14
No files matched your search
@@ -0,0 +1,13 @@
|
||||
#### Keep necessary parentheses around `throw` expression (#20028 by @lazerg)
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```jsx
|
||||
// Input
|
||||
(throw error);
|
||||
|
||||
// Prettier stable
|
||||
throw error;
|
||||
|
||||
// Prettier main
|
||||
(throw error);
|
||||
```
|
||||
Reference in new issue
Block a user