Skip to content

Commit 33157aa

Browse files
dependabot[bot]Mossakaclaude
authored
chore(deps-dev): bump eslint from 8.57.1 to 10.0.0 in the linting group (#581)
* chore(deps-dev): bump eslint from 8.57.1 to 10.0.0 in the linting group Bumps the linting group with 1 update: [eslint](https://github.com/eslint/eslint). Updates `eslint` from 8.57.1 to 10.0.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](eslint/eslint@v8.57.1...v10.0.0) --- updated-dependencies: - dependency-name: eslint dependency-version: 10.0.0 dependency-type: direct:development update-type: version-update:semver-major dependency-group: linting ... Signed-off-by: dependabot[bot] <support@github.com> * fix: migrate eslint config for eslint 10 compatibility - Migrate from .eslintrc.js (legacy) to eslint.config.mjs (flat config) - Upgrade @typescript-eslint packages from v6 to v8 - Add @eslint/compat to fix eslint-plugin-security with ESLint 10 (context.getSourceCode() removed in v10) - Add @eslint/js, globals, and typescript-eslint packages - Remove eslint-plugin-rulesdir (use native flat config plugin) - Rename eslint-disable comments: rulesdir/ -> local/ - Update no-var-requires -> no-require-imports (renamed in ts-eslint v8) - Update RuleTester to use languageOptions (flat config format) - Remove --ext .ts from lint script (removed in ESLint 9+) - Disable new ESLint 10 rules (no-useless-assignment, preserve-caught-error) to maintain parity with previous config; enable in follow-up PR - Add .npmrc with legacy-peer-deps for @typescript-eslint peer dep compatibility (ESLint 10 support pending in typescript-eslint) * fix: drop Node 18 from CI matrix (ESLint 10 requires Node >= 20.12) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jiaxiao (mossaka) Zhou <duibao55328@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6989952 commit 33157aa

10 files changed

Lines changed: 328 additions & 417 deletions

File tree

.eslintrc.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
node-version: ['18', '20', '22']
22+
node-version: ['20', '22']
2323

2424
steps:
2525
- name: Checkout repository

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
legacy-peer-deps=true

eslint-rules/no-unsafe-execa.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { RuleTester } = require('eslint');
99
const rule = require('./no-unsafe-execa');
1010

1111
const ruleTester = new RuleTester({
12-
parserOptions: {
12+
languageOptions: {
1313
ecmaVersion: 2020,
1414
sourceType: 'module',
1515
},

eslint.config.mjs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import js from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
import security from 'eslint-plugin-security';
4+
import { fixupPluginRules } from '@eslint/compat';
5+
import globals from 'globals';
6+
import { createRequire } from 'module';
7+
8+
const require = createRequire(import.meta.url);
9+
const noUnsafeExeca = require('./eslint-rules/no-unsafe-execa.js');
10+
11+
const localPlugin = {
12+
rules: {
13+
'no-unsafe-execa': noUnsafeExeca,
14+
},
15+
};
16+
17+
export default tseslint.config(
18+
{
19+
ignores: ['dist/', 'node_modules/', 'eslint-rules/'],
20+
},
21+
js.configs.recommended,
22+
...tseslint.configs.recommended,
23+
{
24+
plugins: {
25+
security: fixupPluginRules(security),
26+
},
27+
rules: {
28+
...security.configs.recommended.rules,
29+
},
30+
},
31+
{
32+
files: ['src/**/*.ts'],
33+
plugins: {
34+
local: localPlugin,
35+
},
36+
languageOptions: {
37+
ecmaVersion: 2020,
38+
sourceType: 'module',
39+
globals: {
40+
...globals.node,
41+
},
42+
},
43+
rules: {
44+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
45+
'@typescript-eslint/no-explicit-any': 'warn',
46+
// New rules in ESLint 10 eslint:recommended - disable for now, enable in follow-up PR
47+
'no-useless-assignment': 'off',
48+
'preserve-caught-error': 'off',
49+
'security/detect-child-process': 'error',
50+
'local/no-unsafe-execa': 'warn',
51+
},
52+
},
53+
);

0 commit comments

Comments
 (0)