Add missing parentheses for decorator (#14393)

This commit is contained in:
fisker Cheung authored and GitHub committed 2023-02-24 09:20:34 +08:00
1 parent 2a5b391cc0
commit bc098779c4
5 files changed
+216

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#### Add missing parentheses for decorator (#14393 by @fisker)
<!-- prettier-ignore -->
```jsx
// Input
class Person {
@(myDecoratorArray[0])
greet() {}
}
// Prettier stable
class Person {
@myDecoratorArray[0]
greet() {}
}
// Prettier main
class Person {
@(myDecoratorArray[0])
greet() {}
}
```