Skip to content

Commit 7735c44

Browse files
authored
feat: support ESLint v10 (#1929)
* feat: support ESLint v10 * fix(prefer-importing-jest-globals): don't assume `parserOptions` is defined
1 parent 53efb75 commit 7735c44

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
fail-fast: false
7474
matrix:
7575
node-version: [20.x, 22.x, 24.x]
76-
eslint-version: [8, 9]
76+
eslint-version: [8, 9, 10]
7777
ts-eslint-plugin-version: [8]
7878
runs-on: ubuntu-latest
7979

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
},
124124
"peerDependencies": {
125125
"@typescript-eslint/eslint-plugin": "^8.0.0",
126-
"eslint": "^8.57.0 || ^9.0.0",
126+
"eslint": "^8.57.0 || ^9.0.0 || ^10.0.0",
127127
"jest": "*",
128128
"typescript": ">=4.8.4 <6.0.0"
129129
},

src/rules/prefer-importing-jest-globals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default createRule({
8585
}
8686

8787
const isModule =
88-
context.parserOptions.sourceType === 'module' ||
88+
context.parserOptions?.sourceType === 'module' ||
8989
context.languageOptions.sourceType === 'module';
9090

9191
context.report({

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5375,7 +5375,7 @@ __metadata:
53755375
typescript: "npm:^5.0.4"
53765376
peerDependencies:
53775377
"@typescript-eslint/eslint-plugin": ^8.0.0
5378-
eslint: ^8.57.0 || ^9.0.0
5378+
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
53795379
jest: "*"
53805380
typescript: ">=4.8.4 <6.0.0"
53815381
peerDependenciesMeta:

0 commit comments

Comments
 (0)