-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add parentheses for decorator expressions (#16458)
Co-authored-by: fisker <[email protected]>
- Loading branch information
1 parent
6bbd461
commit 9102b73
Showing
6 changed files
with
109 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 1,18 @@ | ||
#### Add parentheses for decorator expressions (#16458 by @y-schneider) | ||
|
||
Prevent parentheses around member expressions or tagged template literals from being removed to follow the stricter parsing rules of TypeScript 5.5. | ||
|
||
<!-- prettier-ignore --> | ||
```ts | ||
// Input | ||
@(foo`tagged template`) | ||
class X {} | ||
|
||
// Prettier stable | ||
@foo`tagged template` | ||
class X {} | ||
|
||
// Prettier main | ||
@(foo`tagged template`) | ||
class X {} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -295,6 295,7 @@ | |
"unaries", | ||
"uncook", | ||
"unparenthesised", | ||
"Unparenthesized", | ||
"Unrestrict", | ||
"upvoted", | ||
"upvotes", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters