@kouts/eslint-config 2.0.5 → 2.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.cjs +274 -316
  2. package/dist/index.js +274 -316
  3. package/package.json +9 -9
package/dist/index.cjs CHANGED
@@ -12,355 +12,311 @@ function getDefaultExportFromCjs (x) {
12
12
  }
13
13
 
14
14
  var name = "@eslint/js";
15
- var version = "9.19.0";
15
+ var version = "9.21.0";
16
16
  var require$$0 = {
17
17
  name: name,
18
18
  version: version};
19
19
 
20
- /*
21
- * WARNING: This file is autogenerated using the tools/update-eslint-all.js
22
- * script. Do not edit manually.
23
- */
24
-
25
20
  var eslintAll;
26
21
  var hasRequiredEslintAll;
27
22
 
28
23
  function requireEslintAll () {
29
24
  if (hasRequiredEslintAll) return eslintAll;
30
25
  hasRequiredEslintAll = 1;
31
-
32
- /* eslint quote-props: off -- autogenerated so don't lint */
33
-
34
- /*
35
- * IMPORTANT!
36
- *
37
- * We cannot add a "name" property to this object because it's still used in eslintrc
38
- * which doesn't support the "name" property. If we add a "name" property, it will
39
- * cause an error.
40
- */
41
-
42
26
  eslintAll = Object.freeze({
43
- "rules": {
44
- "accessor-pairs": "error",
45
- "array-callback-return": "error",
46
- "arrow-body-style": "error",
47
- "block-scoped-var": "error",
48
- "camelcase": "error",
49
- "capitalized-comments": "error",
50
- "class-methods-use-this": "error",
51
- "complexity": "error",
52
- "consistent-return": "error",
53
- "consistent-this": "error",
54
- "constructor-super": "error",
55
- "curly": "error",
56
- "default-case": "error",
57
- "default-case-last": "error",
58
- "default-param-last": "error",
59
- "dot-notation": "error",
60
- "eqeqeq": "error",
61
- "for-direction": "error",
62
- "func-name-matching": "error",
63
- "func-names": "error",
64
- "func-style": "error",
65
- "getter-return": "error",
66
- "grouped-accessor-pairs": "error",
67
- "guard-for-in": "error",
68
- "id-denylist": "error",
69
- "id-length": "error",
70
- "id-match": "error",
71
- "init-declarations": "error",
72
- "logical-assignment-operators": "error",
73
- "max-classes-per-file": "error",
74
- "max-depth": "error",
75
- "max-lines": "error",
76
- "max-lines-per-function": "error",
77
- "max-nested-callbacks": "error",
78
- "max-params": "error",
79
- "max-statements": "error",
80
- "new-cap": "error",
81
- "no-alert": "error",
82
- "no-array-constructor": "error",
83
- "no-async-promise-executor": "error",
84
- "no-await-in-loop": "error",
85
- "no-bitwise": "error",
86
- "no-caller": "error",
87
- "no-case-declarations": "error",
88
- "no-class-assign": "error",
89
- "no-compare-neg-zero": "error",
90
- "no-cond-assign": "error",
91
- "no-console": "error",
92
- "no-const-assign": "error",
93
- "no-constant-binary-expression": "error",
94
- "no-constant-condition": "error",
95
- "no-constructor-return": "error",
96
- "no-continue": "error",
97
- "no-control-regex": "error",
98
- "no-debugger": "error",
99
- "no-delete-var": "error",
100
- "no-div-regex": "error",
101
- "no-dupe-args": "error",
102
- "no-dupe-class-members": "error",
103
- "no-dupe-else-if": "error",
104
- "no-dupe-keys": "error",
105
- "no-duplicate-case": "error",
106
- "no-duplicate-imports": "error",
107
- "no-else-return": "error",
108
- "no-empty": "error",
109
- "no-empty-character-class": "error",
110
- "no-empty-function": "error",
111
- "no-empty-pattern": "error",
112
- "no-empty-static-block": "error",
113
- "no-eq-null": "error",
114
- "no-eval": "error",
115
- "no-ex-assign": "error",
116
- "no-extend-native": "error",
117
- "no-extra-bind": "error",
118
- "no-extra-boolean-cast": "error",
119
- "no-extra-label": "error",
120
- "no-fallthrough": "error",
121
- "no-func-assign": "error",
122
- "no-global-assign": "error",
123
- "no-implicit-coercion": "error",
124
- "no-implicit-globals": "error",
125
- "no-implied-eval": "error",
126
- "no-import-assign": "error",
127
- "no-inline-comments": "error",
128
- "no-inner-declarations": "error",
129
- "no-invalid-regexp": "error",
130
- "no-invalid-this": "error",
131
- "no-irregular-whitespace": "error",
132
- "no-iterator": "error",
133
- "no-label-var": "error",
134
- "no-labels": "error",
135
- "no-lone-blocks": "error",
136
- "no-lonely-if": "error",
137
- "no-loop-func": "error",
138
- "no-loss-of-precision": "error",
139
- "no-magic-numbers": "error",
140
- "no-misleading-character-class": "error",
141
- "no-multi-assign": "error",
142
- "no-multi-str": "error",
143
- "no-negated-condition": "error",
144
- "no-nested-ternary": "error",
145
- "no-new": "error",
146
- "no-new-func": "error",
147
- "no-new-native-nonconstructor": "error",
148
- "no-new-wrappers": "error",
149
- "no-nonoctal-decimal-escape": "error",
150
- "no-obj-calls": "error",
151
- "no-object-constructor": "error",
152
- "no-octal": "error",
153
- "no-octal-escape": "error",
154
- "no-param-reassign": "error",
155
- "no-plusplus": "error",
156
- "no-promise-executor-return": "error",
157
- "no-proto": "error",
158
- "no-prototype-builtins": "error",
159
- "no-redeclare": "error",
160
- "no-regex-spaces": "error",
161
- "no-restricted-exports": "error",
162
- "no-restricted-globals": "error",
163
- "no-restricted-imports": "error",
164
- "no-restricted-properties": "error",
165
- "no-restricted-syntax": "error",
166
- "no-return-assign": "error",
167
- "no-script-url": "error",
168
- "no-self-assign": "error",
169
- "no-self-compare": "error",
170
- "no-sequences": "error",
171
- "no-setter-return": "error",
172
- "no-shadow": "error",
173
- "no-shadow-restricted-names": "error",
174
- "no-sparse-arrays": "error",
175
- "no-template-curly-in-string": "error",
176
- "no-ternary": "error",
177
- "no-this-before-super": "error",
178
- "no-throw-literal": "error",
179
- "no-undef": "error",
180
- "no-undef-init": "error",
181
- "no-undefined": "error",
182
- "no-underscore-dangle": "error",
183
- "no-unexpected-multiline": "error",
184
- "no-unmodified-loop-condition": "error",
185
- "no-unneeded-ternary": "error",
186
- "no-unreachable": "error",
187
- "no-unreachable-loop": "error",
188
- "no-unsafe-finally": "error",
189
- "no-unsafe-negation": "error",
190
- "no-unsafe-optional-chaining": "error",
191
- "no-unused-expressions": "error",
192
- "no-unused-labels": "error",
193
- "no-unused-private-class-members": "error",
194
- "no-unused-vars": "error",
195
- "no-use-before-define": "error",
196
- "no-useless-assignment": "error",
197
- "no-useless-backreference": "error",
198
- "no-useless-call": "error",
199
- "no-useless-catch": "error",
200
- "no-useless-computed-key": "error",
201
- "no-useless-concat": "error",
202
- "no-useless-constructor": "error",
203
- "no-useless-escape": "error",
204
- "no-useless-rename": "error",
205
- "no-useless-return": "error",
206
- "no-var": "error",
207
- "no-void": "error",
208
- "no-warning-comments": "error",
209
- "no-with": "error",
210
- "object-shorthand": "error",
211
- "one-var": "error",
212
- "operator-assignment": "error",
213
- "prefer-arrow-callback": "error",
214
- "prefer-const": "error",
215
- "prefer-destructuring": "error",
216
- "prefer-exponentiation-operator": "error",
217
- "prefer-named-capture-group": "error",
218
- "prefer-numeric-literals": "error",
219
- "prefer-object-has-own": "error",
220
- "prefer-object-spread": "error",
221
- "prefer-promise-reject-errors": "error",
222
- "prefer-regex-literals": "error",
223
- "prefer-rest-params": "error",
224
- "prefer-spread": "error",
225
- "prefer-template": "error",
226
- "radix": "error",
227
- "require-atomic-updates": "error",
228
- "require-await": "error",
229
- "require-unicode-regexp": "error",
230
- "require-yield": "error",
231
- "sort-imports": "error",
232
- "sort-keys": "error",
233
- "sort-vars": "error",
234
- "strict": "error",
235
- "symbol-description": "error",
236
- "unicode-bom": "error",
237
- "use-isnan": "error",
238
- "valid-typeof": "error",
239
- "vars-on-top": "error",
240
- "yoda": "error"
241
- }
27
+ "rules": {
28
+ "accessor-pairs": "error",
29
+ "array-callback-return": "error",
30
+ "arrow-body-style": "error",
31
+ "block-scoped-var": "error",
32
+ "camelcase": "error",
33
+ "capitalized-comments": "error",
34
+ "class-methods-use-this": "error",
35
+ "complexity": "error",
36
+ "consistent-return": "error",
37
+ "consistent-this": "error",
38
+ "constructor-super": "error",
39
+ "curly": "error",
40
+ "default-case": "error",
41
+ "default-case-last": "error",
42
+ "default-param-last": "error",
43
+ "dot-notation": "error",
44
+ "eqeqeq": "error",
45
+ "for-direction": "error",
46
+ "func-name-matching": "error",
47
+ "func-names": "error",
48
+ "func-style": "error",
49
+ "getter-return": "error",
50
+ "grouped-accessor-pairs": "error",
51
+ "guard-for-in": "error",
52
+ "id-denylist": "error",
53
+ "id-length": "error",
54
+ "id-match": "error",
55
+ "init-declarations": "error",
56
+ "logical-assignment-operators": "error",
57
+ "max-classes-per-file": "error",
58
+ "max-depth": "error",
59
+ "max-lines": "error",
60
+ "max-lines-per-function": "error",
61
+ "max-nested-callbacks": "error",
62
+ "max-params": "error",
63
+ "max-statements": "error",
64
+ "new-cap": "error",
65
+ "no-alert": "error",
66
+ "no-array-constructor": "error",
67
+ "no-async-promise-executor": "error",
68
+ "no-await-in-loop": "error",
69
+ "no-bitwise": "error",
70
+ "no-caller": "error",
71
+ "no-case-declarations": "error",
72
+ "no-class-assign": "error",
73
+ "no-compare-neg-zero": "error",
74
+ "no-cond-assign": "error",
75
+ "no-console": "error",
76
+ "no-const-assign": "error",
77
+ "no-constant-binary-expression": "error",
78
+ "no-constant-condition": "error",
79
+ "no-constructor-return": "error",
80
+ "no-continue": "error",
81
+ "no-control-regex": "error",
82
+ "no-debugger": "error",
83
+ "no-delete-var": "error",
84
+ "no-div-regex": "error",
85
+ "no-dupe-args": "error",
86
+ "no-dupe-class-members": "error",
87
+ "no-dupe-else-if": "error",
88
+ "no-dupe-keys": "error",
89
+ "no-duplicate-case": "error",
90
+ "no-duplicate-imports": "error",
91
+ "no-else-return": "error",
92
+ "no-empty": "error",
93
+ "no-empty-character-class": "error",
94
+ "no-empty-function": "error",
95
+ "no-empty-pattern": "error",
96
+ "no-empty-static-block": "error",
97
+ "no-eq-null": "error",
98
+ "no-eval": "error",
99
+ "no-ex-assign": "error",
100
+ "no-extend-native": "error",
101
+ "no-extra-bind": "error",
102
+ "no-extra-boolean-cast": "error",
103
+ "no-extra-label": "error",
104
+ "no-fallthrough": "error",
105
+ "no-func-assign": "error",
106
+ "no-global-assign": "error",
107
+ "no-implicit-coercion": "error",
108
+ "no-implicit-globals": "error",
109
+ "no-implied-eval": "error",
110
+ "no-import-assign": "error",
111
+ "no-inline-comments": "error",
112
+ "no-inner-declarations": "error",
113
+ "no-invalid-regexp": "error",
114
+ "no-invalid-this": "error",
115
+ "no-irregular-whitespace": "error",
116
+ "no-iterator": "error",
117
+ "no-label-var": "error",
118
+ "no-labels": "error",
119
+ "no-lone-blocks": "error",
120
+ "no-lonely-if": "error",
121
+ "no-loop-func": "error",
122
+ "no-loss-of-precision": "error",
123
+ "no-magic-numbers": "error",
124
+ "no-misleading-character-class": "error",
125
+ "no-multi-assign": "error",
126
+ "no-multi-str": "error",
127
+ "no-negated-condition": "error",
128
+ "no-nested-ternary": "error",
129
+ "no-new": "error",
130
+ "no-new-func": "error",
131
+ "no-new-native-nonconstructor": "error",
132
+ "no-new-wrappers": "error",
133
+ "no-nonoctal-decimal-escape": "error",
134
+ "no-obj-calls": "error",
135
+ "no-object-constructor": "error",
136
+ "no-octal": "error",
137
+ "no-octal-escape": "error",
138
+ "no-param-reassign": "error",
139
+ "no-plusplus": "error",
140
+ "no-promise-executor-return": "error",
141
+ "no-proto": "error",
142
+ "no-prototype-builtins": "error",
143
+ "no-redeclare": "error",
144
+ "no-regex-spaces": "error",
145
+ "no-restricted-exports": "error",
146
+ "no-restricted-globals": "error",
147
+ "no-restricted-imports": "error",
148
+ "no-restricted-properties": "error",
149
+ "no-restricted-syntax": "error",
150
+ "no-return-assign": "error",
151
+ "no-script-url": "error",
152
+ "no-self-assign": "error",
153
+ "no-self-compare": "error",
154
+ "no-sequences": "error",
155
+ "no-setter-return": "error",
156
+ "no-shadow": "error",
157
+ "no-shadow-restricted-names": "error",
158
+ "no-sparse-arrays": "error",
159
+ "no-template-curly-in-string": "error",
160
+ "no-ternary": "error",
161
+ "no-this-before-super": "error",
162
+ "no-throw-literal": "error",
163
+ "no-undef": "error",
164
+ "no-undef-init": "error",
165
+ "no-undefined": "error",
166
+ "no-underscore-dangle": "error",
167
+ "no-unexpected-multiline": "error",
168
+ "no-unmodified-loop-condition": "error",
169
+ "no-unneeded-ternary": "error",
170
+ "no-unreachable": "error",
171
+ "no-unreachable-loop": "error",
172
+ "no-unsafe-finally": "error",
173
+ "no-unsafe-negation": "error",
174
+ "no-unsafe-optional-chaining": "error",
175
+ "no-unused-expressions": "error",
176
+ "no-unused-labels": "error",
177
+ "no-unused-private-class-members": "error",
178
+ "no-unused-vars": "error",
179
+ "no-use-before-define": "error",
180
+ "no-useless-assignment": "error",
181
+ "no-useless-backreference": "error",
182
+ "no-useless-call": "error",
183
+ "no-useless-catch": "error",
184
+ "no-useless-computed-key": "error",
185
+ "no-useless-concat": "error",
186
+ "no-useless-constructor": "error",
187
+ "no-useless-escape": "error",
188
+ "no-useless-rename": "error",
189
+ "no-useless-return": "error",
190
+ "no-var": "error",
191
+ "no-void": "error",
192
+ "no-warning-comments": "error",
193
+ "no-with": "error",
194
+ "object-shorthand": "error",
195
+ "one-var": "error",
196
+ "operator-assignment": "error",
197
+ "prefer-arrow-callback": "error",
198
+ "prefer-const": "error",
199
+ "prefer-destructuring": "error",
200
+ "prefer-exponentiation-operator": "error",
201
+ "prefer-named-capture-group": "error",
202
+ "prefer-numeric-literals": "error",
203
+ "prefer-object-has-own": "error",
204
+ "prefer-object-spread": "error",
205
+ "prefer-promise-reject-errors": "error",
206
+ "prefer-regex-literals": "error",
207
+ "prefer-rest-params": "error",
208
+ "prefer-spread": "error",
209
+ "prefer-template": "error",
210
+ "radix": "error",
211
+ "require-atomic-updates": "error",
212
+ "require-await": "error",
213
+ "require-unicode-regexp": "error",
214
+ "require-yield": "error",
215
+ "sort-imports": "error",
216
+ "sort-keys": "error",
217
+ "sort-vars": "error",
218
+ "strict": "error",
219
+ "symbol-description": "error",
220
+ "unicode-bom": "error",
221
+ "use-isnan": "error",
222
+ "valid-typeof": "error",
223
+ "vars-on-top": "error",
224
+ "yoda": "error"
225
+ }
242
226
  });
243
227
  return eslintAll;
244
228
  }
245
229
 
246
- /**
247
- * @fileoverview Configuration applied when a user configuration extends from
248
- * eslint:recommended.
249
- * @author Nicholas C. Zakas
250
- */
251
-
252
230
  var eslintRecommended;
253
231
  var hasRequiredEslintRecommended;
254
232
 
255
233
  function requireEslintRecommended () {
256
234
  if (hasRequiredEslintRecommended) return eslintRecommended;
257
235
  hasRequiredEslintRecommended = 1;
258
-
259
- /* eslint sort-keys: ["error", "asc"] -- Long, so make more readable */
260
-
261
- /*
262
- * IMPORTANT!
263
- *
264
- * We cannot add a "name" property to this object because it's still used in eslintrc
265
- * which doesn't support the "name" property. If we add a "name" property, it will
266
- * cause an error.
267
- */
268
-
269
236
  eslintRecommended = Object.freeze({
270
- rules: Object.freeze({
271
- "constructor-super": "error",
272
- "for-direction": "error",
273
- "getter-return": "error",
274
- "no-async-promise-executor": "error",
275
- "no-case-declarations": "error",
276
- "no-class-assign": "error",
277
- "no-compare-neg-zero": "error",
278
- "no-cond-assign": "error",
279
- "no-const-assign": "error",
280
- "no-constant-binary-expression": "error",
281
- "no-constant-condition": "error",
282
- "no-control-regex": "error",
283
- "no-debugger": "error",
284
- "no-delete-var": "error",
285
- "no-dupe-args": "error",
286
- "no-dupe-class-members": "error",
287
- "no-dupe-else-if": "error",
288
- "no-dupe-keys": "error",
289
- "no-duplicate-case": "error",
290
- "no-empty": "error",
291
- "no-empty-character-class": "error",
292
- "no-empty-pattern": "error",
293
- "no-empty-static-block": "error",
294
- "no-ex-assign": "error",
295
- "no-extra-boolean-cast": "error",
296
- "no-fallthrough": "error",
297
- "no-func-assign": "error",
298
- "no-global-assign": "error",
299
- "no-import-assign": "error",
300
- "no-invalid-regexp": "error",
301
- "no-irregular-whitespace": "error",
302
- "no-loss-of-precision": "error",
303
- "no-misleading-character-class": "error",
304
- "no-new-native-nonconstructor": "error",
305
- "no-nonoctal-decimal-escape": "error",
306
- "no-obj-calls": "error",
307
- "no-octal": "error",
308
- "no-prototype-builtins": "error",
309
- "no-redeclare": "error",
310
- "no-regex-spaces": "error",
311
- "no-self-assign": "error",
312
- "no-setter-return": "error",
313
- "no-shadow-restricted-names": "error",
314
- "no-sparse-arrays": "error",
315
- "no-this-before-super": "error",
316
- "no-undef": "error",
317
- "no-unexpected-multiline": "error",
318
- "no-unreachable": "error",
319
- "no-unsafe-finally": "error",
320
- "no-unsafe-negation": "error",
321
- "no-unsafe-optional-chaining": "error",
322
- "no-unused-labels": "error",
323
- "no-unused-private-class-members": "error",
324
- "no-unused-vars": "error",
325
- "no-useless-backreference": "error",
326
- "no-useless-catch": "error",
327
- "no-useless-escape": "error",
328
- "no-with": "error",
329
- "require-yield": "error",
330
- "use-isnan": "error",
331
- "valid-typeof": "error"
332
- })
237
+ rules: Object.freeze({
238
+ "constructor-super": "error",
239
+ "for-direction": "error",
240
+ "getter-return": "error",
241
+ "no-async-promise-executor": "error",
242
+ "no-case-declarations": "error",
243
+ "no-class-assign": "error",
244
+ "no-compare-neg-zero": "error",
245
+ "no-cond-assign": "error",
246
+ "no-const-assign": "error",
247
+ "no-constant-binary-expression": "error",
248
+ "no-constant-condition": "error",
249
+ "no-control-regex": "error",
250
+ "no-debugger": "error",
251
+ "no-delete-var": "error",
252
+ "no-dupe-args": "error",
253
+ "no-dupe-class-members": "error",
254
+ "no-dupe-else-if": "error",
255
+ "no-dupe-keys": "error",
256
+ "no-duplicate-case": "error",
257
+ "no-empty": "error",
258
+ "no-empty-character-class": "error",
259
+ "no-empty-pattern": "error",
260
+ "no-empty-static-block": "error",
261
+ "no-ex-assign": "error",
262
+ "no-extra-boolean-cast": "error",
263
+ "no-fallthrough": "error",
264
+ "no-func-assign": "error",
265
+ "no-global-assign": "error",
266
+ "no-import-assign": "error",
267
+ "no-invalid-regexp": "error",
268
+ "no-irregular-whitespace": "error",
269
+ "no-loss-of-precision": "error",
270
+ "no-misleading-character-class": "error",
271
+ "no-new-native-nonconstructor": "error",
272
+ "no-nonoctal-decimal-escape": "error",
273
+ "no-obj-calls": "error",
274
+ "no-octal": "error",
275
+ "no-prototype-builtins": "error",
276
+ "no-redeclare": "error",
277
+ "no-regex-spaces": "error",
278
+ "no-self-assign": "error",
279
+ "no-setter-return": "error",
280
+ "no-shadow-restricted-names": "error",
281
+ "no-sparse-arrays": "error",
282
+ "no-this-before-super": "error",
283
+ "no-undef": "error",
284
+ "no-unexpected-multiline": "error",
285
+ "no-unreachable": "error",
286
+ "no-unsafe-finally": "error",
287
+ "no-unsafe-negation": "error",
288
+ "no-unsafe-optional-chaining": "error",
289
+ "no-unused-labels": "error",
290
+ "no-unused-private-class-members": "error",
291
+ "no-unused-vars": "error",
292
+ "no-useless-backreference": "error",
293
+ "no-useless-catch": "error",
294
+ "no-useless-escape": "error",
295
+ "no-with": "error",
296
+ "require-yield": "error",
297
+ "use-isnan": "error",
298
+ "valid-typeof": "error"
299
+ })
333
300
  });
334
301
  return eslintRecommended;
335
302
  }
336
303
 
337
- /**
338
- * @fileoverview Main package entrypoint.
339
- * @author Nicholas C. Zakas
340
- */
341
-
342
304
  var src;
343
305
  var hasRequiredSrc;
344
306
 
345
307
  function requireSrc () {
346
308
  if (hasRequiredSrc) return src;
347
309
  hasRequiredSrc = 1;
348
-
349
310
  const { name, version } = require$$0;
350
-
351
- //------------------------------------------------------------------------------
352
- // Public Interface
353
- //------------------------------------------------------------------------------
354
-
355
311
  src = {
356
- meta: {
357
- name,
358
- version
359
- },
360
- configs: {
361
- all: requireEslintAll(),
362
- recommended: requireEslintRecommended()
363
- }
312
+ meta: {
313
+ name,
314
+ version
315
+ },
316
+ configs: {
317
+ all: requireEslintAll(),
318
+ recommended: requireEslintRecommended()
319
+ }
364
320
  };
365
321
  return src;
366
322
  }
@@ -395,7 +351,9 @@ const typescript = [
395
351
  vars: "all",
396
352
  argsIgnorePattern: "^_"
397
353
  }
398
- ]
354
+ ],
355
+ // Disallow non-null assertions using the ! postfix operator
356
+ "@typescript-eslint/no-non-null-assertion": "error"
399
357
  }
400
358
  }
401
359
  ];