Skip to content

Commit 11c9e3f

Browse files
committed
refactor: backport changes in tseslint8 to main
1 parent 57b57ba commit 11c9e3f

File tree

23 files changed

+315
-234
lines changed

23 files changed

+315
-234
lines changed

.npmrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
registry=https://registry.npmjs.org
22
package-manager-strict=true
33
shell-emulator=true
4-
node-linker=hoisted

examples/vite-react-dom-ts-flat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"eslint-plugin-react-hooks": "4.6.2",
2525
"eslint-plugin-react-refresh": "0.4.8",
2626
"typescript": "^5.5.3",
27-
"typescript-eslint": "8.0.0-alpha.47",
27+
"typescript-eslint": "^7.16.1",
2828
"vite": "5.3.4"
2929
}
3030
}

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@
5656
"@swc/core": "1.7.0",
5757
"@tsconfig/node22": "22.0.0",
5858
"@tsconfig/strictest": "2.0.5",
59+
"@types/bun": "1.1.6",
5960
"@types/node": "20.14.11",
6061
"@types/react": "18.3.3",
6162
"@types/react-dom": "18.3.0",
62-
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.47",
63-
"@typescript-eslint/parser": "8.0.0-alpha.47",
64-
"@typescript-eslint/rule-tester": "8.0.0-alpha.47",
63+
"@typescript-eslint/eslint-plugin": "^7.16.1",
64+
"@typescript-eslint/parser": "^7.16.1",
65+
"@typescript-eslint/rule-tester": "^7.16.1",
6566
"@vitest/ui": "2.0.3",
6667
"bun": "1.1.20",
67-
"bun-types": "1.1.20",
6868
"bundle-require": "^5.0.0",
6969
"code-block-writer": "13.0.1",
7070
"cspell": "8.11.0",
@@ -115,13 +115,13 @@
115115
"@types/node": "20.14.11",
116116
"@types/react": "18.3.3",
117117
"@types/react-dom": "18.3.0",
118-
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.47",
119-
"@typescript-eslint/parser": "8.0.0-alpha.47",
120-
"@typescript-eslint/rule-tester": "8.0.0-alpha.47",
121-
"@typescript-eslint/scope-manager": "8.0.0-alpha.47",
122-
"@typescript-eslint/type-utils": "8.0.0-alpha.47",
123-
"@typescript-eslint/types": "8.0.0-alpha.47",
124-
"@typescript-eslint/utils": "8.0.0-alpha.47",
118+
"@typescript-eslint/eslint-plugin": "^7.16.1",
119+
"@typescript-eslint/parser": "^7.16.1",
120+
"@typescript-eslint/rule-tester": "^7.16.1",
121+
"@typescript-eslint/scope-manager": "^7.16.1",
122+
"@typescript-eslint/type-utils": "^7.16.1",
123+
"@typescript-eslint/types": "^7.16.1",
124+
"@typescript-eslint/utils": "^7.16.1",
125125
"array-includes": "npm:@nolyfill/array-includes@^1",
126126
"array.prototype.findlast": "npm:@nolyfill/array.prototype.findlast@^1",
127127
"array.prototype.findlastindex": "npm:@nolyfill/array.prototype.findlastindex@^1",
@@ -146,7 +146,7 @@
146146
"ts-api-utils": "^1.3.0",
147147
"typedarray": "npm:@nolyfill/typedarray@^1",
148148
"typescript": "^5.5.3",
149-
"typescript-eslint": "8.0.0-alpha.47"
149+
"typescript-eslint": "^7.16.1"
150150
},
151151
"overridesMeta": {
152152
"esbuild": "Ensure that the esbuild has single version across the monorepo.",

packages/core/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
"@eslint-react/tools": "workspace:*",
4949
"@eslint-react/types": "workspace:*",
5050
"@eslint-react/var": "workspace:*",
51-
"@typescript-eslint/scope-manager": "8.0.0-alpha.47",
52-
"@typescript-eslint/type-utils": "8.0.0-alpha.47",
53-
"@typescript-eslint/types": "8.0.0-alpha.47",
54-
"@typescript-eslint/utils": "8.0.0-alpha.47"
51+
"@typescript-eslint/scope-manager": "^7.16.1",
52+
"@typescript-eslint/type-utils": "^7.16.1",
53+
"@typescript-eslint/types": "^7.16.1",
54+
"@typescript-eslint/utils": "^7.16.1"
5555
},
5656
"devDependencies": {
5757
"short-unique-id": "5.2.0",

packages/core/src/component/component-init-path.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ export function getComponentInitPath(node: TSESTreeFunction): O.Option<ERCompone
163163

164164
if (
165165
parent.type === NodeType.MethodDefinition
166+
&& parent.parent.type === NodeType.ClassBody
166167
&& parent.parent.parent.type === NodeType.ClassDeclaration
167168
) {
168169
return O.some([
@@ -175,6 +176,7 @@ export function getComponentInitPath(node: TSESTreeFunction): O.Option<ERCompone
175176

176177
if (
177178
parent.type === NodeType.PropertyDefinition
179+
&& parent.parent.type === NodeType.ClassBody
178180
&& parent.parent.parent.type === NodeType.ClassDeclaration
179181
) {
180182
return O.some([

packages/plugins/eslint-plugin-react-debug/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
"@eslint-react/shared": "workspace:*",
4848
"@eslint-react/tools": "workspace:*",
4949
"@eslint-react/types": "workspace:*",
50-
"@typescript-eslint/scope-manager": "8.0.0-alpha.47",
51-
"@typescript-eslint/type-utils": "8.0.0-alpha.47",
52-
"@typescript-eslint/types": "8.0.0-alpha.47",
53-
"@typescript-eslint/utils": "8.0.0-alpha.47",
50+
"@typescript-eslint/scope-manager": "^7.16.1",
51+
"@typescript-eslint/type-utils": "^7.16.1",
52+
"@typescript-eslint/types": "^7.16.1",
53+
"@typescript-eslint/utils": "^7.16.1",
5454
"string-ts": "^2.2.0"
5555
},
5656
"devDependencies": {

packages/plugins/eslint-plugin-react-dom/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
"@eslint-react/tools": "workspace:*",
4949
"@eslint-react/types": "workspace:*",
5050
"@eslint-react/var": "workspace:*",
51-
"@typescript-eslint/scope-manager": "8.0.0-alpha.47",
52-
"@typescript-eslint/types": "8.0.0-alpha.47",
53-
"@typescript-eslint/utils": "8.0.0-alpha.47"
51+
"@typescript-eslint/scope-manager": "^7.16.1",
52+
"@typescript-eslint/types": "^7.16.1",
53+
"@typescript-eslint/utils": "^7.16.1"
5454
},
5555
"devDependencies": {
5656
"string-ts": "2.2.0",

packages/plugins/eslint-plugin-react-hooks-extra/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
"@eslint-react/tools": "workspace:*",
4949
"@eslint-react/types": "workspace:*",
5050
"@eslint-react/var": "workspace:*",
51-
"@typescript-eslint/scope-manager": "8.0.0-alpha.47",
52-
"@typescript-eslint/type-utils": "8.0.0-alpha.47",
53-
"@typescript-eslint/types": "8.0.0-alpha.47",
54-
"@typescript-eslint/utils": "8.0.0-alpha.47"
51+
"@typescript-eslint/scope-manager": "^7.16.1",
52+
"@typescript-eslint/type-utils": "^7.16.1",
53+
"@typescript-eslint/types": "^7.16.1",
54+
"@typescript-eslint/utils": "^7.16.1"
5555
},
5656
"devDependencies": {
5757
"string-ts": "2.2.0",

packages/plugins/eslint-plugin-react-naming-convention/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@
4747
"@eslint-react/shared": "workspace:*",
4848
"@eslint-react/tools": "workspace:*",
4949
"@eslint-react/types": "workspace:*",
50-
"@typescript-eslint/scope-manager": "8.0.0-alpha.47",
51-
"@typescript-eslint/type-utils": "8.0.0-alpha.47",
52-
"@typescript-eslint/types": "8.0.0-alpha.47",
53-
"@typescript-eslint/utils": "8.0.0-alpha.47"
50+
"@typescript-eslint/scope-manager": "^7.16.1",
51+
"@typescript-eslint/type-utils": "^7.16.1",
52+
"@typescript-eslint/types": "^7.16.1",
53+
"@typescript-eslint/utils": "^7.16.1"
5454
},
5555
"devDependencies": {
5656
"string-ts": "2.2.0",

packages/plugins/eslint-plugin-react-x/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@
4848
"@eslint-react/tools": "workspace:*",
4949
"@eslint-react/types": "workspace:*",
5050
"@eslint-react/var": "workspace:*",
51-
"@typescript-eslint/scope-manager": "8.0.0-alpha.47",
52-
"@typescript-eslint/type-utils": "8.0.0-alpha.47",
53-
"@typescript-eslint/types": "8.0.0-alpha.47",
54-
"@typescript-eslint/utils": "8.0.0-alpha.47",
51+
"@typescript-eslint/scope-manager": "^7.16.1",
52+
"@typescript-eslint/type-utils": "^7.16.1",
53+
"@typescript-eslint/types": "^7.16.1",
54+
"@typescript-eslint/utils": "^7.16.1",
5555
"is-immutable-type": "4.0.0"
5656
},
5757
"devDependencies": {

0 commit comments

Comments
 (0)