Skip to content

Commit c880eab

Browse files
committed
Fix ESLint v9 configuration compatibility with Node.js 16.x
- Remove unused eslint-comments and import rule references - Simplify configuration to avoid structuredClone compatibility issues - Update ecmaVersion and globals for better Node.js 16.x compatibility
1 parent 0572832 commit c880eab

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

eslint.config.mjs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import js from '@eslint/js';
21
import typescript from '@typescript-eslint/eslint-plugin';
32
import typescriptParser from '@typescript-eslint/parser';
43
import jest from 'eslint-plugin-jest';
@@ -21,14 +20,14 @@ export default [
2120
files: ['src/**/*.ts', '__tests__/**/*.ts'],
2221
languageOptions: {
2322
parser: typescriptParser,
24-
ecmaVersion: 9,
23+
ecmaVersion: 2020,
2524
sourceType: 'module',
2625
parserOptions: {
2726
project: './tsconfig.json'
2827
},
2928
globals: {
3029
...globals.node,
31-
...globals.es6,
30+
...globals.es2020,
3231
...globals.jest
3332
}
3433
},
@@ -38,12 +37,6 @@ export default [
3837
prettier: prettier
3938
},
4039
rules: {
41-
// Disable conflicting rules (no basic ESLint rules due to structuredClone compatibility issues in v9 + Node.js 16.x)
42-
'eslint-comments/no-use': 'off',
43-
'import/no-namespace': 'off',
44-
'no-unused-vars': 'off',
45-
'camelcase': 'off',
46-
'semi': 'off',
4740

4841
// TypeScript-specific rules
4942
'@typescript-eslint/no-unused-vars': 'error',

0 commit comments

Comments
 (0)