Skip to content

Commit e894f51

Browse files
authored
fix: migrate to non-experimental ts-eslint utils (#1035)
`@typescript-eslint/experimental-utils` has been renamed to `@typescript-eslint/utils`. BREAKING CHANGE: Drop support for `@typescript-eslint/eslint-plugin@4`
1 parent 4449919 commit e894f51

File tree

87 files changed

+150
-229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+150
-229
lines changed

.github/workflows/nodejs.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,13 @@ jobs:
6262
test-node:
6363
name:
6464
# prettier-ignore
65-
Test on Node.js v${{ matrix.node-version }}, eslint v${{ matrix.eslint-version }} and ts-eslint/plugin v${{ matrix.ts-eslint-plugin-version }}
65+
Test on Node.js v${{ matrix.node-version }}, eslint v${{ matrix.eslint-version }}
6666
needs: prepare-yarn-cache
6767
strategy:
6868
fail-fast: false
6969
matrix:
7070
node-version: [12.x, 14.x, 16.x]
7171
eslint-version: [6, 7, 8]
72-
ts-eslint-plugin-version: [4, 5]
73-
exclude:
74-
# ts-eslint/plugin@4 doesn't support eslint@8
75-
- eslint-version: 8
76-
ts-eslint-plugin-version: 4
7772
runs-on: ubuntu-latest
7873

7974
steps:
@@ -85,10 +80,10 @@ jobs:
8580
cache: yarn
8681
- name:
8782
# prettier-ignore
88-
install with eslint v${{ matrix.eslint-version }} and ts-eslint/plugin v${{ matrix.ts-eslint-plugin-version }}
83+
install with eslint v${{ matrix.eslint-version }}
8984
run: |
9085
yarn
91-
yarn add --dev eslint@${{ matrix.eslint-version }} @typescript-eslint/eslint-plugin@${{ matrix.ts-eslint-plugin-version }} @typescript-eslint/parser@${{ matrix.ts-eslint-plugin-version }}
86+
yarn add --dev eslint@${{ matrix.eslint-version }}
9287
- name: run tests
9388
run: yarn test --coverage
9489
env:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
]
8383
},
8484
"dependencies": {
85-
"@typescript-eslint/experimental-utils": "^5.0.0"
85+
"@typescript-eslint/utils": "^5.10.0"
8686
},
8787
"devDependencies": {
8888
"@babel/cli": "^7.4.4",
@@ -127,7 +127,7 @@
127127
"typescript": "^4.4.0"
128128
},
129129
"peerDependencies": {
130-
"@typescript-eslint/eslint-plugin": "^4.0.0 || ^5.0.0",
130+
"@typescript-eslint/eslint-plugin": "^5.0.0",
131131
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
132132
},
133133
"peerDependenciesMeta": {

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { readdirSync } from 'fs';
22
import { join, parse } from 'path';
3-
import { TSESLint } from '@typescript-eslint/experimental-utils';
3+
import { TSESLint } from '@typescript-eslint/utils';
44
import globals from './globals.json';
55
import * as snapshotProcessor from './processors/snapshot-processor';
66

@@ -9,7 +9,7 @@ type RuleModule = TSESLint.RuleModule<string, unknown[]> & {
99
};
1010

1111
// v5 of `@typescript-eslint/experimental-utils` removed this
12-
declare module '@typescript-eslint/experimental-utils/dist/ts-eslint/Rule' {
12+
declare module '@typescript-eslint/utils/dist/ts-eslint/Rule' {
1313
export interface RuleMetaDataDocs {
1414
category: 'Best Practices' | 'Possible Errors';
1515
}

src/rules/__tests__/consistent-test-it.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESLint } from '@typescript-eslint/experimental-utils';
1+
import { TSESLint } from '@typescript-eslint/utils';
22
import dedent from 'dedent';
33
import rule from '../consistent-test-it';
44
import { TestCaseName } from '../utils';

src/rules/__tests__/expect-expect.test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import {
2-
AST_NODE_TYPES,
3-
TSESLint,
4-
} from '@typescript-eslint/experimental-utils';
1+
import { AST_NODE_TYPES, TSESLint } from '@typescript-eslint/utils';
52
import dedent from 'dedent';
63
import rule from '../expect-expect';
74
import { espreeParser } from './test-utils';

src/rules/__tests__/max-nested-describe.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESLint } from '@typescript-eslint/experimental-utils';
1+
import { TSESLint } from '@typescript-eslint/utils';
22
import dedent from 'dedent';
33
import rule from '../max-nested-describe';
44
import { espreeParser } from './test-utils';

src/rules/__tests__/no-alias-methods.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESLint } from '@typescript-eslint/experimental-utils';
1+
import { TSESLint } from '@typescript-eslint/utils';
22
import rule from '../no-alias-methods';
33

44
const ruleTester = new TSESLint.RuleTester();

src/rules/__tests__/no-commented-out-tests.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESLint } from '@typescript-eslint/experimental-utils';
1+
import { TSESLint } from '@typescript-eslint/utils';
22
import dedent from 'dedent';
33
import rule from '../no-commented-out-tests';
44
import { espreeParser } from './test-utils';

src/rules/__tests__/no-conditional-expect.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESLint } from '@typescript-eslint/experimental-utils';
1+
import { TSESLint } from '@typescript-eslint/utils';
22
import dedent from 'dedent';
33
import rule from '../no-conditional-expect';
44
import { espreeParser } from './test-utils';

src/rules/__tests__/no-deprecated-functions.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TSESLint } from '@typescript-eslint/experimental-utils';
1+
import { TSESLint } from '@typescript-eslint/utils';
22
import { JestVersion, detectJestVersion } from '../detectJestVersion';
33
import rule from '../no-deprecated-functions';
44

0 commit comments

Comments
 (0)