Correct identification of in/instanceof identifiers (#20019)

Co-authored-by: fisker Cheung <lionkay@gmail.com>
This commit is contained in:
Cole Ellisonandfisker Cheung authored and GitHub committed 2026-09-13 03:06:14 +08:00
1 parent 2529b92818
commit c41be0bf9c
4 files changed
+59 -2

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
#### Avoid unnecessary semicolons before private members named `#in` or `#instanceof` (#20019 by @cellison-figma)
<!-- prettier-ignore -->
```js
// Input
class Graph {
#nodes = {};
#in = {};
}
// Prettier stable (--parser oxc --no-semi)
class Graph {
#nodes = {};
#in = {}
}
// Prettier main (--parser oxc --no-semi)
class Graph {
#nodes = {}
#in = {}
}
```