1- import tseslintPlugin from '@typescript-eslint/eslint-plugin'
21import globals from 'globals'
32import tsParser from '@typescript-eslint/parser'
43import neostandard from 'neostandard'
@@ -29,21 +28,30 @@ export default [
2928 ...globals . node ,
3029 Atomics : 'readonly' ,
3130 SharedArrayBuffer : 'readonly' ,
32- }
31+ } ,
32+ ecmaVersion : 2022 , // Support class fields and other modern syntax
33+ sourceType : 'module' // Match TypeScript module: ESNext
3334 } ,
3435 rules : {
36+ // Code style - match TypeScript settings
3537 semi : [ 'error' , 'never' ] ,
3638 quotes : [ 'error' , 'single' ] ,
39+
40+ // Strict checking - match TypeScript strictness
3741 'no-console' : 'error' ,
38- 'no-unused-vars' : 'error' ,
39- 'no-undef' : 'error'
42+ 'no-unused-vars' : 'error' , // Match TypeScript noUnusedLocals: true
43+ 'no-undef' : 'error' ,
44+ strict : [ 'error' , 'global' ] , // Match TypeScript alwaysStrict: true
45+
46+ // Additional strictness to match TypeScript behavior
47+ 'no-implicit-globals' : 'error' ,
48+ 'prefer-const' : 'error' , // Encourage immutability
49+ 'no-var' : 'error' , // Use let/const only
50+ 'no-redeclare' : 'error'
4051 } ,
4152 } ,
4253 {
4354 files : [ 'src/**/*.ts' ] ,
44- plugins : {
45- '@typescript-eslint' : tseslintPlugin ,
46- } ,
4755
4856 languageOptions : {
4957 globals : {
@@ -60,21 +68,13 @@ export default [
6068 rules : {
6169 semi : [ 'error' , 'never' ] ,
6270 quotes : [ 'error' , 'single' ] ,
63- 'no-console' : 'error' ,
64- 'no-unused-vars' : 'off' ,
65- '@typescript-eslint/no-unused-vars' : [ 'warn' , {
66- argsIgnorePattern : '^_' ,
67- varsIgnorePattern : '^_' ,
68- caughtErrorsIgnorePattern : '^_' ,
69- } ] ,
70- // '@typescript-eslint/no-explicit-any': 'warn', - codebase not ready for this
71+ // Disable ESLint rules that TypeScript handles better
72+ 'no-unused-vars' : 'off' , // TypeScript handles this via noUnusedLocals
73+ 'no-undef' : 'off' , // TypeScript handles undefined variables
7174 } ,
7275 } ,
7376 {
7477 files : [ 'test/**/*.ts' ] ,
75- plugins : {
76- '@typescript-eslint' : tseslintPlugin ,
77- } ,
7878 languageOptions : {
7979 parser : tsParser ,
8080 parserOptions : {
@@ -84,8 +84,9 @@ export default [
8484 rules : {
8585 semi : [ 'error' , 'never' ] ,
8686 quotes : [ 'error' , 'single' ] ,
87- 'no-console' : 'off' , // Allow console in tests
88- 'no-undef' : 'off' , // Tests may define globals
87+ // Disable ESLint rules that TypeScript handles better
88+ 'no-unused-vars' : 'off' , // TypeScript handles this via noUnusedLocals
89+ 'no-undef' : 'off' , // TypeScript handles undefined variables
8990 }
9091 } ,
9192 {
0 commit comments