Fix missing parentheses around throw expression (#20028)

Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
Lazizbek Ergashevandfisker authored and GitHub committed 2026-09-11 18:10:50 +08:00
1 parent c150b07c07
commit 60a1d7ec78
7 files changed
+301 -14

No files matched your search

+13
View File
@@ -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);
```