@@ -12,6 +12,7 @@ module.exports = defineConfig({
1212 es6 : true ,
1313 node : true ,
1414 } ,
15+ reportUnusedDisableDirectives : true ,
1516 extends : [
1617 'eslint:recommended' ,
1718 'plugin:@typescript-eslint/recommended' ,
@@ -21,36 +22,66 @@ module.exports = defineConfig({
2122 ] ,
2223 parser : '@typescript-eslint/parser' ,
2324 parserOptions : {
24- project : [ './tsconfig.lint.json' ] ,
25+ project : [ './tsconfig.json' ] ,
26+ sourceType : 'module' ,
2527 warnOnUnsupportedTypeScriptVersion : false ,
2628 } ,
2729 plugins : [ '@typescript-eslint' , 'prettier' , 'jsdoc' , 'spellcheck' ] ,
2830 rules : {
2931 curly : [ 'error' ] ,
3032 'linebreak-style' : [ 'error' , 'unix' ] ,
3133 'no-case-declarations' : 'warn' ,
34+ 'no-restricted-globals' : [
35+ 'error' ,
36+ {
37+ name : '__dirname' ,
38+ message : "Use `fileURLToPath(new URL('.', import.meta.url))` instead." ,
39+ } ,
40+ ] ,
3241 quotes : [ 'error' , 'single' , { avoidEscape : true } ] ,
3342 semi : [ 'error' , 'always' ] ,
3443
35- '@typescript-eslint/ban-ts-comment' : 'off' ,
44+ '@typescript-eslint/array-type' : [
45+ 'warn' ,
46+ { default : 'array-simple' , readonly : 'generic' } ,
47+ ] ,
48+ '@typescript-eslint/ban-ts-comment' : [
49+ 'error' ,
50+ { 'ts-expect-error' : 'allow-with-description' } ,
51+ ] ,
52+ '@typescript-eslint/ban-types' : 'warn' ,
53+ '@typescript-eslint/consistent-type-imports' : 'error' ,
3654 '@typescript-eslint/explicit-function-return-type' : [
3755 'error' ,
3856 { allowExpressions : true } ,
3957 ] ,
40- '@typescript-eslint/interface-name-prefix' : 'off' ,
41- '@typescript-eslint/member-ordering' : 'warn' ,
42- '@typescript-eslint/consistent-type-imports' : [
58+ '@typescript-eslint/explicit-member-accessibility' : 'error' ,
59+ '@typescript-eslint/indent' : [
4360 'error' ,
44- { prefer : 'type-imports' , disallowTypeAnnotations : false } ,
61+ 2 ,
62+ {
63+ SwitchCase : 1 ,
64+ ignoredNodes : [ 'MemberExpression' , 'TSTypeParameterInstantiation' ] ,
65+ } ,
4566 ] ,
67+ '@typescript-eslint/lines-between-class-members' : [
68+ 'warn' ,
69+ 'always' ,
70+ { exceptAfterSingleLine : true } ,
71+ ] ,
72+ '@typescript-eslint/member-ordering' : 'warn' ,
4673 '@typescript-eslint/no-explicit-any' : 'off' ,
4774 '@typescript-eslint/no-inferrable-types' : 'off' ,
4875 '@typescript-eslint/no-parameter-properties' : 'off' ,
76+ '@typescript-eslint/no-unsafe-argument' : 'off' ,
4977 '@typescript-eslint/no-unsafe-assignment' : 'off' ,
78+ '@typescript-eslint/no-unsafe-call' : 'off' ,
5079 '@typescript-eslint/no-unused-vars' : 'off' ,
5180 '@typescript-eslint/prefer-nullish-coalescing' : 'warn' ,
5281 '@typescript-eslint/prefer-optional-chain' : 'warn' ,
53- '@typescript-eslint/prefer-readonly' : [ 'warn' ] ,
82+ '@typescript-eslint/prefer-readonly' : 'warn' ,
83+ '@typescript-eslint/prefer-reduce-type-parameter' : 'warn' ,
84+ '@typescript-eslint/require-await' : 'warn' ,
5485 '@typescript-eslint/restrict-template-expressions' : 'off' ,
5586 '@typescript-eslint/typedef' : [
5687 'warn' ,
@@ -90,6 +121,7 @@ module.exports = defineConfig({
90121 ] ,
91122 'jsdoc/require-param-type' : 'off' ,
92123 'jsdoc/require-returns-type' : 'off' ,
124+ 'jsdoc/tag-lines' : 'off' ,
93125
94126 'spellcheck/spell-checker' : [
95127 'warn' ,
0 commit comments