@@ -11,112 +11,141 @@ import { FlatCompat } from "@eslint/eslintrc";
11
11
const __filename = fileURLToPath ( import . meta. url ) ;
12
12
const __dirname = path . dirname ( __filename ) ;
13
13
const compat = new FlatCompat ( {
14
- baseDirectory : __dirname ,
15
- recommendedConfig : js . configs . recommended ,
16
- allConfig : js . configs . all
14
+ baseDirectory : __dirname ,
15
+ recommendedConfig : js . configs . recommended ,
16
+ allConfig : js . configs . all ,
17
17
} ) ;
18
18
19
- export default [ {
19
+ export default [
20
+ {
20
21
ignores : [ "**/*.js" , "test/deno*" , "test/bun*" ] ,
21
- } , ...fixupConfigRules ( compat . extends (
22
- "eslint:recommended" ,
23
- "plugin:@typescript-eslint/recommended" ,
24
- "plugin:import/recommended" ,
25
- "plugin:import/typescript" ,
26
- "prettier" ,
27
- ) ) , {
22
+ } ,
23
+ ...fixupConfigRules (
24
+ compat . extends (
25
+ "eslint:recommended" ,
26
+ "plugin:@typescript-eslint/recommended" ,
27
+ "plugin:import/recommended" ,
28
+ "plugin:import/typescript" ,
29
+ "prettier" ,
30
+ ) ,
31
+ ) ,
32
+ {
28
33
plugins : {
29
- "@typescript-eslint" : fixupPluginRules ( typescriptEslintEslintPlugin ) ,
30
- tsdoc,
34
+ "@typescript-eslint" : fixupPluginRules ( typescriptEslintEslintPlugin ) ,
35
+ tsdoc,
31
36
} ,
32
37
33
38
languageOptions : {
34
- parser : tsParser ,
35
- ecmaVersion : 5 ,
36
- sourceType : "script" ,
39
+ parser : tsParser ,
40
+ ecmaVersion : 5 ,
41
+ sourceType : "script" ,
37
42
38
- parserOptions : {
39
- project : "./tsconfig.json" ,
40
- } ,
43
+ parserOptions : {
44
+ project : "./tsconfig.json" ,
45
+ } ,
41
46
} ,
42
47
43
48
settings : { } ,
44
49
45
50
rules : {
46
- "no-constant-condition" : [ "warn" , {
47
- checkLoops : false ,
48
- } ] ,
51
+ "no-constant-condition" : [
52
+ "warn" ,
53
+ {
54
+ checkLoops : false ,
55
+ } ,
56
+ ] ,
49
57
50
- "no-useless-escape" : "warn" ,
51
- "no-console" : "warn" ,
52
- "no-var" : "warn" ,
53
- "no-return-await" : "warn" ,
54
- "prefer-const" : "warn" ,
55
- "guard-for-in" : "warn" ,
56
- curly : "warn" ,
57
- "no-param-reassign" : "warn" ,
58
- "prefer-spread" : "warn" ,
59
- "import/no-unresolved" : "off" ,
60
- "import/no-cycle" : "error" ,
61
- "import/no-default-export" : "warn" ,
62
- "tsdoc/syntax" : "warn" ,
63
- "@typescript-eslint/await-thenable" : "warn" ,
58
+ "no-useless-escape" : "warn" ,
59
+ "no-console" : "warn" ,
60
+ "no-var" : "warn" ,
61
+ "no-return-await" : "warn" ,
62
+ "prefer-const" : "warn" ,
63
+ "guard-for-in" : "warn" ,
64
+ curly : "warn" ,
65
+ "no-param-reassign" : "warn" ,
66
+ "prefer-spread" : "warn" ,
67
+ "import/no-unresolved" : "off" ,
68
+ "import/no-cycle" : "error" ,
69
+ "import/no-default-export" : "warn" ,
70
+ "tsdoc/syntax" : "warn" ,
71
+ "@typescript-eslint/await-thenable" : "warn" ,
64
72
65
- "@typescript-eslint/array-type" : [ "warn" , {
66
- default : "generic" ,
67
- } ] ,
73
+ "@typescript-eslint/array-type" : [
74
+ "warn" ,
75
+ {
76
+ default : "generic" ,
77
+ } ,
78
+ ] ,
68
79
69
- "@typescript-eslint/naming-convention" : [ "warn" , {
70
- selector : "default" ,
71
- format : [ "camelCase" , "UPPER_CASE" , "PascalCase" ] ,
72
- leadingUnderscore : "allow" ,
73
- } , {
74
- selector : "typeLike" ,
75
- format : [ "PascalCase" ] ,
76
- leadingUnderscore : "allow" ,
77
- } ] ,
80
+ "@typescript-eslint/naming-convention" : [
81
+ "warn" ,
82
+ {
83
+ selector : "default" ,
84
+ format : [ "camelCase" , "UPPER_CASE" , "PascalCase" ] ,
85
+ leadingUnderscore : "allow" ,
86
+ } ,
87
+ {
88
+ selector : "typeLike" ,
89
+ format : [ "PascalCase" ] ,
90
+ leadingUnderscore : "allow" ,
91
+ } ,
92
+ ] ,
78
93
79
- "@typescript-eslint/restrict-plus-operands" : "warn" ,
80
- //"@typescript-eslint/no-throw-literal": "warn",
81
- "@typescript-eslint/unbound-method" : "warn" ,
82
- "@typescript-eslint/explicit-module-boundary-types" : "warn" ,
83
- //"@typescript-eslint/no-extra-semi": "warn",
84
- "@typescript-eslint/no-extra-non-null-assertion" : "warn" ,
94
+ "@typescript-eslint/restrict-plus-operands" : "warn" ,
95
+ //"@typescript-eslint/no-throw-literal": "warn",
96
+ "@typescript-eslint/unbound-method" : "warn" ,
97
+ "@typescript-eslint/explicit-module-boundary-types" : "warn" ,
98
+ //"@typescript-eslint/no-extra-semi": "warn",
99
+ "@typescript-eslint/no-extra-non-null-assertion" : "warn" ,
85
100
86
- "@typescript-eslint/no-unused-vars" : [ "warn" , {
87
- argsIgnorePattern : "^_" ,
88
- } ] ,
101
+ "@typescript-eslint/no-unused-vars" : [
102
+ "warn" ,
103
+ {
104
+ argsIgnorePattern : "^_" ,
105
+ } ,
106
+ ] ,
89
107
90
- "@typescript-eslint/no-use-before-define" : "warn" ,
91
- "@typescript-eslint/no-for-in-array" : "warn" ,
92
- "@typescript-eslint/no-unsafe-argument" : "warn" ,
93
- "@typescript-eslint/no-unsafe-call" : "warn" ,
108
+ "@typescript-eslint/no-use-before-define" : "warn" ,
109
+ "@typescript-eslint/no-for-in-array" : "warn" ,
110
+ "@typescript-eslint/no-unsafe-argument" : "warn" ,
111
+ "@typescript-eslint/no-unsafe-call" : "warn" ,
94
112
95
- "@typescript-eslint/no-unnecessary-condition" : [ "warn" , {
96
- allowConstantLoopConditions : true ,
97
- } ] ,
113
+ "@typescript-eslint/no-unnecessary-condition" : [
114
+ "warn" ,
115
+ {
116
+ allowConstantLoopConditions : true ,
117
+ } ,
118
+ ] ,
98
119
99
- "@typescript-eslint/no-unnecessary-type-constraint" : "warn" ,
100
- "@typescript-eslint/no-implied-eval" : "warn" ,
101
- "@typescript-eslint/no-non-null-asserted-optional-chain" : "warn" ,
102
- "@typescript-eslint/no-invalid-void-type" : "warn" ,
103
- "@typescript-eslint/no-loss-of-precision" : "warn" ,
104
- "@typescript-eslint/no-confusing-void-expression" : "warn" ,
105
- "@typescript-eslint/no-redundant-type-constituents" : "warn" ,
106
- "@typescript-eslint/prefer-for-of" : "warn" ,
107
- "@typescript-eslint/prefer-includes" : "warn" ,
108
- "@typescript-eslint/prefer-string-starts-ends-with" : "warn" ,
109
- "@typescript-eslint/prefer-readonly" : "warn" ,
110
- "@typescript-eslint/prefer-regexp-exec" : "warn" ,
111
- "@typescript-eslint/prefer-nullish-coalescing" : "warn" ,
112
- "@typescript-eslint/prefer-optional-chain" : "warn" ,
113
- "@typescript-eslint/prefer-ts-expect-error" : "warn" ,
114
- "@typescript-eslint/indent" : "off" ,
115
- "@typescript-eslint/no-explicit-any" : "off" ,
116
- "@typescript-eslint/no-empty-interface" : "off" ,
117
- "@typescript-eslint/no-empty-function" : "off" ,
118
- "@typescript-eslint/no-var-requires" : "off" ,
119
- "@typescript-eslint/no-non-null-assertion" : "off" ,
120
- "@typescript-eslint/ban-ts-comment" : "off" ,
120
+ "@typescript-eslint/no-unnecessary-type-constraint" : "warn" ,
121
+ "@typescript-eslint/no-implied-eval" : "warn" ,
122
+ "@typescript-eslint/no-non-null-asserted-optional-chain" : "warn" ,
123
+ "@typescript-eslint/no-invalid-void-type" : "warn" ,
124
+ "@typescript-eslint/no-loss-of-precision" : "warn" ,
125
+ "@typescript-eslint/no-confusing-void-expression" : "warn" ,
126
+ "@typescript-eslint/no-redundant-type-constituents" : "warn" ,
127
+ "@typescript-eslint/prefer-for-of" : "warn" ,
128
+ "@typescript-eslint/prefer-includes" : "warn" ,
129
+ "@typescript-eslint/prefer-string-starts-ends-with" : "warn" ,
130
+ "@typescript-eslint/prefer-readonly" : "warn" ,
131
+ "@typescript-eslint/prefer-regexp-exec" : "warn" ,
132
+ "@typescript-eslint/prefer-nullish-coalescing" : "warn" ,
133
+ "@typescript-eslint/prefer-optional-chain" : "warn" ,
134
+ "@typescript-eslint/prefer-ts-expect-error" : "warn" ,
135
+ "@typescript-eslint/consistent-type-imports" : [
136
+ "error" ,
137
+ {
138
+ prefer : "type-imports" ,
139
+ disallowTypeAnnotations : false ,
140
+ } ,
141
+ ] ,
142
+ "@typescript-eslint/indent" : "off" ,
143
+ "@typescript-eslint/no-explicit-any" : "off" ,
144
+ "@typescript-eslint/no-empty-interface" : "off" ,
145
+ "@typescript-eslint/no-empty-function" : "off" ,
146
+ "@typescript-eslint/no-var-requires" : "off" ,
147
+ "@typescript-eslint/no-non-null-assertion" : "off" ,
148
+ "@typescript-eslint/ban-ts-comment" : "off" ,
121
149
} ,
122
- } ] ;
150
+ } ,
151
+ ] ;
0 commit comments