Skip to content

Commit 150e355

Browse files
authored
feat: drop support for @typescript-eslint/eslint-plugin v5 (#1530)
BREAKING CHANGE: dropped support for `@typescript-eslint/eslint-plugin` v5
1 parent 9899ddf commit 150e355

File tree

5 files changed

+60
-73
lines changed

5 files changed

+60
-73
lines changed

.github/workflows/nodejs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
matrix:
7474
node-version: [16.x, 18.x, 19.x, 20.x, 21.x]
7575
eslint-version: [7, 8]
76-
ts-eslint-plugin-version: [5, 6, 7]
76+
ts-eslint-plugin-version: [6, 7]
7777
exclude:
7878
# ts-eslint/plugin@7 doesn't support node@16
7979
- node-version: 16.x

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@
111111
"@types/eslint": "^8.4.6",
112112
"@types/jest": "^29.0.0",
113113
"@types/node": "^14.18.26",
114-
"@typescript-eslint/eslint-plugin": "^5.0.0",
115-
"@typescript-eslint/parser": "^5.0.0",
114+
"@typescript-eslint/eslint-plugin": "^6.0.0",
115+
"@typescript-eslint/parser": "^6.0.0",
116116
"babel-jest": "^29.0.0",
117117
"babel-plugin-replace-ts-export-assignment": "^0.0.2",
118118
"dedent": "^1.5.0",
@@ -142,7 +142,7 @@
142142
"typescript": "^5.0.4"
143143
},
144144
"peerDependencies": {
145-
"@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.0.0 || ^7.0.0",
145+
"@typescript-eslint/eslint-plugin": "^6.0.0 || ^7.0.0",
146146
"eslint": "^7.0.0 || ^8.0.0",
147147
"jest": "*"
148148
},

src/rules/__tests__/unbound-method.test.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import path from 'path';
2-
import { version as rawTypeScriptESLintPluginVersion } from '@typescript-eslint/eslint-plugin/package.json';
32
import { TSESLint } from '@typescript-eslint/utils';
43
import dedent from 'dedent';
54
import type { MessageIds, Options } from '../unbound-method';
@@ -253,9 +252,7 @@ ruleTester.run('unbound-method', requireRule(false), {
253252
"['1', '2', '3'].map(Number.parseInt);",
254253
'[5.2, 7.1, 3.6].map(Math.floor);',
255254
'const x = console.log;',
256-
...(parseInt(rawTypeScriptESLintPluginVersion.split('.')[0], 10) >= 6
257-
? ['const x = Object.defineProperty;']
258-
: []),
255+
'const x = Object.defineProperty;',
259256
...[
260257
'instance.bound();',
261258
'instance.unbound();',

src/rules/no-untyped-mock-factory.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,7 @@ export default createRule({
3636
create(context) {
3737
return {
3838
CallExpression(node: TSESTree.CallExpression): void {
39-
let { callee, typeArguments } = node;
40-
41-
/* istanbul ignore next */
42-
if (!('typeArguments' in node)) {
43-
typeArguments = (node as TSESTree.CallExpression).typeParameters;
44-
}
39+
const { callee, typeArguments } = node;
4540

4641
if (callee.type !== AST_NODE_TYPES.MemberExpression) {
4742
return;

yarn.lock

+54-59
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,7 @@ __metadata:
16611661
languageName: node
16621662
linkType: hard
16631663

1664-
"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.6.1":
1664+
"@eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1":
16651665
version: 4.10.0
16661666
resolution: "@eslint-community/regexpp@npm:4.10.0"
16671667
checksum: 2a6e345429ea8382aaaf3a61f865cae16ed44d31ca917910033c02dc00d505d939f10b81e079fa14d43b51499c640138e153b7e40743c4c094d9df97d4e56f7b
@@ -2939,44 +2939,46 @@ __metadata:
29392939
languageName: node
29402940
linkType: hard
29412941

2942-
"@typescript-eslint/eslint-plugin@npm:^5.0.0":
2943-
version: 5.62.0
2944-
resolution: "@typescript-eslint/eslint-plugin@npm:5.62.0"
2942+
"@typescript-eslint/eslint-plugin@npm:^6.0.0":
2943+
version: 6.21.0
2944+
resolution: "@typescript-eslint/eslint-plugin@npm:6.21.0"
29452945
dependencies:
2946-
"@eslint-community/regexpp": ^4.4.0
2947-
"@typescript-eslint/scope-manager": 5.62.0
2948-
"@typescript-eslint/type-utils": 5.62.0
2949-
"@typescript-eslint/utils": 5.62.0
2946+
"@eslint-community/regexpp": ^4.5.1
2947+
"@typescript-eslint/scope-manager": 6.21.0
2948+
"@typescript-eslint/type-utils": 6.21.0
2949+
"@typescript-eslint/utils": 6.21.0
2950+
"@typescript-eslint/visitor-keys": 6.21.0
29502951
debug: ^4.3.4
29512952
graphemer: ^1.4.0
2952-
ignore: ^5.2.0
2953-
natural-compare-lite: ^1.4.0
2954-
semver: ^7.3.7
2955-
tsutils: ^3.21.0
2953+
ignore: ^5.2.4
2954+
natural-compare: ^1.4.0
2955+
semver: ^7.5.4
2956+
ts-api-utils: ^1.0.1
29562957
peerDependencies:
2957-
"@typescript-eslint/parser": ^5.0.0
2958-
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
2958+
"@typescript-eslint/parser": ^6.0.0 || ^6.0.0-alpha
2959+
eslint: ^7.0.0 || ^8.0.0
29592960
peerDependenciesMeta:
29602961
typescript:
29612962
optional: true
2962-
checksum: fc104b389c768f9fa7d45a48c86d5c1ad522c1d0512943e782a56b1e3096b2cbcc1eea3fcc590647bf0658eef61aac35120a9c6daf979bf629ad2956deb516a1
2963+
checksum: 5ef2c502255e643e98051e87eb682c2a257e87afd8ec3b9f6274277615e1c2caf3131b352244cfb1987b8b2c415645eeacb9113fa841fc4c9b2ac46e8aed6efd
29632964
languageName: node
29642965
linkType: hard
29652966

2966-
"@typescript-eslint/parser@npm:^5.0.0":
2967-
version: 5.62.0
2968-
resolution: "@typescript-eslint/parser@npm:5.62.0"
2967+
"@typescript-eslint/parser@npm:^6.0.0":
2968+
version: 6.21.0
2969+
resolution: "@typescript-eslint/parser@npm:6.21.0"
29692970
dependencies:
2970-
"@typescript-eslint/scope-manager": 5.62.0
2971-
"@typescript-eslint/types": 5.62.0
2972-
"@typescript-eslint/typescript-estree": 5.62.0
2971+
"@typescript-eslint/scope-manager": 6.21.0
2972+
"@typescript-eslint/types": 6.21.0
2973+
"@typescript-eslint/typescript-estree": 6.21.0
2974+
"@typescript-eslint/visitor-keys": 6.21.0
29732975
debug: ^4.3.4
29742976
peerDependencies:
2975-
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
2977+
eslint: ^7.0.0 || ^8.0.0
29762978
peerDependenciesMeta:
29772979
typescript:
29782980
optional: true
2979-
checksum: d168f4c7f21a7a63f47002e2d319bcbb6173597af5c60c1cf2de046b46c76b4930a093619e69faf2d30214c29ab27b54dcf1efc7046a6a6bd6f37f59a990e752
2981+
checksum: 162fe3a867eeeffda7328bce32dae45b52283c68c8cb23258fb9f44971f761991af61f71b8c9fe1aa389e93dfe6386f8509c1273d870736c507d76dd40647b68
29802982
languageName: node
29812983
linkType: hard
29822984

@@ -3000,20 +3002,20 @@ __metadata:
30003002
languageName: node
30013003
linkType: hard
30023004

3003-
"@typescript-eslint/type-utils@npm:5.62.0":
3004-
version: 5.62.0
3005-
resolution: "@typescript-eslint/type-utils@npm:5.62.0"
3005+
"@typescript-eslint/type-utils@npm:6.21.0":
3006+
version: 6.21.0
3007+
resolution: "@typescript-eslint/type-utils@npm:6.21.0"
30063008
dependencies:
3007-
"@typescript-eslint/typescript-estree": 5.62.0
3008-
"@typescript-eslint/utils": 5.62.0
3009+
"@typescript-eslint/typescript-estree": 6.21.0
3010+
"@typescript-eslint/utils": 6.21.0
30093011
debug: ^4.3.4
3010-
tsutils: ^3.21.0
3012+
ts-api-utils: ^1.0.1
30113013
peerDependencies:
3012-
eslint: "*"
3014+
eslint: ^7.0.0 || ^8.0.0
30133015
peerDependenciesMeta:
30143016
typescript:
30153017
optional: true
3016-
checksum: fc41eece5f315dfda14320be0da78d3a971d650ea41300be7196934b9715f3fe1120a80207551eb71d39568275dbbcf359bde540d1ca1439d8be15e9885d2739
3018+
checksum: 77025473f4d80acf1fafcce99c5c283e557686a61861febeba9c9913331f8a41e930bf5cd8b7a54db502a57b6eb8ea6d155cbd4f41349ed00e3d7aeb1f477ddc
30173019
languageName: node
30183020
linkType: hard
30193021

@@ -3086,7 +3088,24 @@ __metadata:
30863088
languageName: node
30873089
linkType: hard
30883090

3089-
"@typescript-eslint/utils@npm:5.62.0, @typescript-eslint/utils@npm:^5.38.1":
3091+
"@typescript-eslint/utils@npm:6.21.0, @typescript-eslint/utils@npm:^6.0.0":
3092+
version: 6.21.0
3093+
resolution: "@typescript-eslint/utils@npm:6.21.0"
3094+
dependencies:
3095+
"@eslint-community/eslint-utils": ^4.4.0
3096+
"@types/json-schema": ^7.0.12
3097+
"@types/semver": ^7.5.0
3098+
"@typescript-eslint/scope-manager": 6.21.0
3099+
"@typescript-eslint/types": 6.21.0
3100+
"@typescript-eslint/typescript-estree": 6.21.0
3101+
semver: ^7.5.4
3102+
peerDependencies:
3103+
eslint: ^7.0.0 || ^8.0.0
3104+
checksum: b129b3a4aebec8468259f4589985cb59ea808afbfdb9c54f02fad11e17d185e2bf72bb332f7c36ec3c09b31f18fc41368678b076323e6e019d06f74ee93f7bf2
3105+
languageName: node
3106+
linkType: hard
3107+
3108+
"@typescript-eslint/utils@npm:^5.38.1":
30903109
version: 5.62.0
30913110
resolution: "@typescript-eslint/utils@npm:5.62.0"
30923111
dependencies:
@@ -3104,23 +3123,6 @@ __metadata:
31043123
languageName: node
31053124
linkType: hard
31063125

3107-
"@typescript-eslint/utils@npm:^6.0.0":
3108-
version: 6.21.0
3109-
resolution: "@typescript-eslint/utils@npm:6.21.0"
3110-
dependencies:
3111-
"@eslint-community/eslint-utils": ^4.4.0
3112-
"@types/json-schema": ^7.0.12
3113-
"@types/semver": ^7.5.0
3114-
"@typescript-eslint/scope-manager": 6.21.0
3115-
"@typescript-eslint/types": 6.21.0
3116-
"@typescript-eslint/typescript-estree": 6.21.0
3117-
semver: ^7.5.4
3118-
peerDependencies:
3119-
eslint: ^7.0.0 || ^8.0.0
3120-
checksum: b129b3a4aebec8468259f4589985cb59ea808afbfdb9c54f02fad11e17d185e2bf72bb332f7c36ec3c09b31f18fc41368678b076323e6e019d06f74ee93f7bf2
3121-
languageName: node
3122-
linkType: hard
3123-
31243126
"@typescript-eslint/visitor-keys@npm:5.62.0":
31253127
version: 5.62.0
31263128
resolution: "@typescript-eslint/visitor-keys@npm:5.62.0"
@@ -5209,8 +5211,8 @@ __metadata:
52095211
"@types/eslint": ^8.4.6
52105212
"@types/jest": ^29.0.0
52115213
"@types/node": ^14.18.26
5212-
"@typescript-eslint/eslint-plugin": ^5.0.0
5213-
"@typescript-eslint/parser": ^5.0.0
5214+
"@typescript-eslint/eslint-plugin": ^6.0.0
5215+
"@typescript-eslint/parser": ^6.0.0
52145216
"@typescript-eslint/utils": ^6.0.0
52155217
babel-jest: ^29.0.0
52165218
babel-plugin-replace-ts-export-assignment: ^0.0.2
@@ -5240,7 +5242,7 @@ __metadata:
52405242
ts-node: ^10.2.1
52415243
typescript: ^5.0.4
52425244
peerDependencies:
5243-
"@typescript-eslint/eslint-plugin": ^5.0.0 || ^6.0.0 || ^7.0.0
5245+
"@typescript-eslint/eslint-plugin": ^6.0.0 || ^7.0.0
52445246
eslint: ^7.0.0 || ^8.0.0
52455247
jest: "*"
52465248
peerDependenciesMeta:
@@ -8473,13 +8475,6 @@ __metadata:
84738475
languageName: node
84748476
linkType: hard
84758477

8476-
"natural-compare-lite@npm:^1.4.0":
8477-
version: 1.4.0
8478-
resolution: "natural-compare-lite@npm:1.4.0"
8479-
checksum: 5222ac3986a2b78dd6069ac62cbb52a7bf8ffc90d972ab76dfe7b01892485d229530ed20d0c62e79a6b363a663b273db3bde195a1358ce9e5f779d4453887225
8480-
languageName: node
8481-
linkType: hard
8482-
84838478
"natural-compare@npm:^1.4.0":
84848479
version: 1.4.0
84858480
resolution: "natural-compare@npm:1.4.0"

0 commit comments

Comments
 (0)