Fix ASI protection for private fields (#10334)

This commit is contained in:
Georgii Dolzhykov authored and GitHub committed 2021-02-18 12:39:56 +02:00
1 parent 3950ce194d
commit e147c3b1c4
5 files changed
+90 -2

No files matched your search

+22
View File
@@ -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"]() {}
}
```