Fix ASI protection for private fields (#10334)
This commit is contained in:
1 parent
3950ce194d
commit
e147c3b1c4
5 files changed
+90
-2
No files matched your search
@@ -0,0 +1,22 @@
|
||||
#### Fix ASI protection for private fields (#10334 by @thorn0)
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```jsx
|
||||
// Input
|
||||
class C {
|
||||
#field = 'value';
|
||||
["method"]() {}
|
||||
}
|
||||
|
||||
// Prettier stable (with --no-semi)
|
||||
class C {
|
||||
#field = "value"
|
||||
["method"]() {}
|
||||
}
|
||||
|
||||
// Prettier main (with --no-semi)
|
||||
class C {
|
||||
#field = "value";
|
||||
["method"]() {}
|
||||
}
|
||||
```
|
||||
Reference in new issue
Block a user