diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 4bfb17a75..e54547fe1 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -73,7 +73,7 @@ jobs: fail-fast: false matrix: node-version: [20.x, 22.x, 24.x] - eslint-version: [8, 9] + eslint-version: [8, 9, 10] ts-eslint-plugin-version: [8] runs-on: ubuntu-latest diff --git a/package.json b/package.json index 871d46b75..5b69cf31f 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ }, "peerDependencies": { "@typescript-eslint/eslint-plugin": "^8.0.0", - "eslint": "^8.57.0 || ^9.0.0", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "jest": "*", "typescript": ">=4.8.4 <6.0.0" }, diff --git a/src/rules/prefer-importing-jest-globals.ts b/src/rules/prefer-importing-jest-globals.ts index cf3c7fbde..a84084baa 100644 --- a/src/rules/prefer-importing-jest-globals.ts +++ b/src/rules/prefer-importing-jest-globals.ts @@ -85,7 +85,7 @@ export default createRule({ } const isModule = - context.parserOptions.sourceType === 'module' || + context.parserOptions?.sourceType === 'module' || context.languageOptions.sourceType === 'module'; context.report({ diff --git a/yarn.lock b/yarn.lock index 84d6e9dfc..b7d0b1d63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5375,7 +5375,7 @@ __metadata: typescript: "npm:^5.0.4" peerDependencies: "@typescript-eslint/eslint-plugin": ^8.0.0 - eslint: ^8.57.0 || ^9.0.0 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 jest: "*" typescript: ">=4.8.4 <6.0.0" peerDependenciesMeta: