@naturalcycles/dev-lib 20.1.7 → 20.3.0
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.
- package/cfg/eslint-rules.js +49 -47
- package/cfg/eslint-vitest-rules.js +1 -0
- package/cfg/oxlint.config.json +19 -0
- package/package.json +1 -1
package/cfg/eslint-rules.js
CHANGED
|
@@ -2,17 +2,7 @@ export default {
|
|
|
2
2
|
rules: {
|
|
3
3
|
'@typescript-eslint/adjacent-overload-signatures': 2,
|
|
4
4
|
'@typescript-eslint/ban-ts-comment': 0,
|
|
5
|
-
'no-restricted-globals':
|
|
6
|
-
2,
|
|
7
|
-
{
|
|
8
|
-
name: '__dirname',
|
|
9
|
-
message: '__dirname is not available in ESM. Use import.meta.dirname instead.',
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
name: '__filename',
|
|
13
|
-
message: '__filename is not available in ESM. Use import.meta.filename instead.',
|
|
14
|
-
},
|
|
15
|
-
],
|
|
5
|
+
'no-restricted-globals': 0, // oxlint
|
|
16
6
|
'@typescript-eslint/no-restricted-types': [
|
|
17
7
|
2,
|
|
18
8
|
{
|
|
@@ -165,7 +155,7 @@ export default {
|
|
|
165
155
|
// eqeqeq: [2, 'smart'], // oxlint
|
|
166
156
|
'for-direction': 2,
|
|
167
157
|
'getter-return': 2,
|
|
168
|
-
'id-
|
|
158
|
+
'id-denylist': [
|
|
169
159
|
2,
|
|
170
160
|
'any',
|
|
171
161
|
'Number',
|
|
@@ -208,22 +198,23 @@ export default {
|
|
|
208
198
|
// 'import-x/extensions': [2, 'always'], // biome useImportExtensions
|
|
209
199
|
'no-array-constructor': 0,
|
|
210
200
|
'no-async-promise-executor': 2,
|
|
211
|
-
'no-bitwise':
|
|
212
|
-
'no-caller':
|
|
201
|
+
'no-bitwise': 0, // oxlint
|
|
202
|
+
'no-caller': 0, // oxlint
|
|
213
203
|
'no-case-declarations': 2,
|
|
214
204
|
'no-class-assign': 2,
|
|
215
205
|
'no-compare-neg-zero': 2,
|
|
216
206
|
'no-cond-assign': 2,
|
|
217
207
|
'no-const-assign': 2,
|
|
218
208
|
'no-constant-condition': 2,
|
|
219
|
-
'no-constant-binary-expression':
|
|
209
|
+
'no-constant-binary-expression': 0, // oxlint
|
|
220
210
|
'no-control-regex': 2,
|
|
221
211
|
'no-debugger': 2,
|
|
222
212
|
'no-delete-var': 2,
|
|
223
213
|
'no-dupe-args': 2,
|
|
224
|
-
'no-dupe-else-if':
|
|
214
|
+
'no-dupe-else-if': 0, // oxlint
|
|
225
215
|
'no-dupe-keys': 2,
|
|
226
216
|
'no-duplicate-case': 2,
|
|
217
|
+
'no-empty-static-block': 0, // oxlint
|
|
227
218
|
'no-empty': [2, { allowEmptyCatch: true }],
|
|
228
219
|
'no-empty-character-class': 2,
|
|
229
220
|
'no-empty-function': 0,
|
|
@@ -242,9 +233,9 @@ export default {
|
|
|
242
233
|
'no-global-assign': 2,
|
|
243
234
|
'no-import-assign': 0, // used in some unit tests
|
|
244
235
|
'no-inner-declarations': 2,
|
|
245
|
-
'no-invalid-regexp':
|
|
236
|
+
'no-invalid-regexp': 0, // oxlint
|
|
246
237
|
'no-invalid-this': 0, // too many false positives in valid classes
|
|
247
|
-
'no-irregular-whitespace':
|
|
238
|
+
'no-irregular-whitespace': 0, // oxlint
|
|
248
239
|
'no-misleading-character-class': 2,
|
|
249
240
|
'no-new-symbol': 2,
|
|
250
241
|
'no-obj-calls': 2,
|
|
@@ -252,38 +243,12 @@ export default {
|
|
|
252
243
|
'no-prototype-builtins': 2,
|
|
253
244
|
'no-redeclare': 2,
|
|
254
245
|
'no-regex-spaces': 2,
|
|
255
|
-
'no-restricted-imports': [
|
|
256
|
-
2,
|
|
257
|
-
'rxjs/Rx',
|
|
258
|
-
'rxjs/internals',
|
|
259
|
-
'rxjs/Observable',
|
|
260
|
-
'rxjs/Observer',
|
|
261
|
-
'rxjs/Subject',
|
|
262
|
-
'rxjs/observable/defer',
|
|
263
|
-
'rxjs/observable/merge',
|
|
264
|
-
'rxjs/observable/of',
|
|
265
|
-
'rxjs/observable/timer',
|
|
266
|
-
'rxjs/observable/combineLatest',
|
|
267
|
-
'rxjs/add/observable/combineLatest',
|
|
268
|
-
'rxjs/add/observable/of',
|
|
269
|
-
'rxjs/add/observable/merge',
|
|
270
|
-
'rxjs/add/operator/debounceTime',
|
|
271
|
-
'rxjs/add/operator/distinctUntilChanged',
|
|
272
|
-
'rxjs/add/operator/do',
|
|
273
|
-
'rxjs/add/operator/filter',
|
|
274
|
-
'rxjs/add/operator/map',
|
|
275
|
-
'rxjs/add/operator/retry',
|
|
276
|
-
'rxjs/add/operator/startWith',
|
|
277
|
-
'rxjs/add/operator/switchMap',
|
|
278
|
-
'rxjs/observable/interval',
|
|
279
|
-
'rxjs/observable/forkJoin',
|
|
280
|
-
],
|
|
281
246
|
curly: [0, 'multi-line'], // this one is an exception that can conflict with prettier, oxlint
|
|
282
247
|
'no-self-assign': 2,
|
|
283
248
|
'no-setter-return': 2,
|
|
284
249
|
'no-shadow': 0, // it is buggy with TypeScript enums
|
|
285
250
|
'no-shadow-restricted-names': 2,
|
|
286
|
-
'no-sparse-arrays':
|
|
251
|
+
'no-sparse-arrays': 0, // oxlint
|
|
287
252
|
'no-this-before-super': 2,
|
|
288
253
|
'@typescript-eslint/only-throw-error': 0, // biome
|
|
289
254
|
'no-undef': 0, // covered by TS, conflicts with typescript-eslint
|
|
@@ -292,8 +257,10 @@ export default {
|
|
|
292
257
|
'no-unsafe-finally': 2,
|
|
293
258
|
'no-unsafe-negation': 2,
|
|
294
259
|
'no-unused-labels': 2,
|
|
260
|
+
'no-unused-private-class-members': 0, // oxlint
|
|
261
|
+
'no-useless-backreference': 0, // oxlint
|
|
295
262
|
'no-useless-catch': 2,
|
|
296
|
-
'no-useless-escape':
|
|
263
|
+
'no-useless-escape': 0, // oxlint
|
|
297
264
|
'no-useless-assignment': 2,
|
|
298
265
|
'no-unneeded-ternary': 0, // oxlint
|
|
299
266
|
'no-duplicate-imports': 0, // too many false-positives (with e.g import type + import on next line)
|
|
@@ -320,6 +287,7 @@ export default {
|
|
|
320
287
|
'no-await-in-loop': 0, // it's actually often ok
|
|
321
288
|
'no-extend-native': 0, // oxlint
|
|
322
289
|
'guard-for-in': 0, // oxlint
|
|
290
|
+
'prefer-spread': 0, // oxlint
|
|
323
291
|
'@typescript-eslint/no-namespace': [
|
|
324
292
|
2,
|
|
325
293
|
{
|
|
@@ -376,13 +344,25 @@ export default {
|
|
|
376
344
|
'unicorn/prefer-set-has': 0,
|
|
377
345
|
'unicorn/explicit-length-check': 0,
|
|
378
346
|
'unicorn/no-array-for-each': 0,
|
|
379
|
-
'unicorn/prefer-at': 0, // iOS 15.4
|
|
347
|
+
'unicorn/prefer-at': 0, // iOS 15.4+, oxlint
|
|
380
348
|
'unicorn/import-style': 0, // todo: fix
|
|
381
349
|
'unicorn/prefer-spread': 0, // fails on joiSchema.concat() which is not an array!
|
|
382
350
|
'unicorn/prefer-structured-clone': 0, // no real advantage, plus in most of the cases we want JSON to remove undefined, etc.
|
|
383
351
|
'unicorn/better-regex': 0, // we still believe that [0-9] is clearer than [\d]
|
|
384
352
|
'unicorn/no-for-loop': 0, // oxlint has similar
|
|
385
353
|
'unicorn/no-array-reduce': 0, // oxlint
|
|
354
|
+
'unicorn/consistent-assert': 0, // oxlint
|
|
355
|
+
'unicorn/consistent-date-clone': 0, // oxlint
|
|
356
|
+
'unicorn/consistent-empty-array-spread': 0, // oxlint
|
|
357
|
+
'unicorn/consistent-existence-index-check': 0, // oxlint
|
|
358
|
+
'unicorn/escape-case': 0, // oxlint
|
|
359
|
+
'unicorn/no-console-spaces': 0, // oxlint
|
|
360
|
+
'unicorn/no-hex-escape': 0, // oxlint
|
|
361
|
+
'unicorn/no-instanceof-builtins': 0, // oxlint
|
|
362
|
+
'unicorn/no-lonely-if': 0, // oxlint
|
|
363
|
+
'unicorn/no-named-default': 0, // oxlint
|
|
364
|
+
'unicorn/no-negation-in-equality-check': 0, // oxlint
|
|
365
|
+
'unicorn/no-new-buffer': 0, // oxlint
|
|
386
366
|
'unicorn/no-accessor-recursion': 0, // oxlint
|
|
387
367
|
'unicorn/no-anonymous-default-export': 0, // oxlint
|
|
388
368
|
'unicorn/no-object-as-default-parameter': 0, // doesn't allow e.g method (opt = { skipValidation: true })
|
|
@@ -408,6 +388,22 @@ export default {
|
|
|
408
388
|
'unicorn/prefer-query-selector': 0,
|
|
409
389
|
'unicorn/prefer-prototype-methods': 0, // false-positive on node promisify() of callback functions
|
|
410
390
|
'unicorn/expiring-todo-comments': 1, // warning, instead of error
|
|
391
|
+
'unicorn/no-await-in-promise-methods': 0, // oxlint
|
|
392
|
+
'unicorn/no-document-cookie': 0, // oxlint
|
|
393
|
+
'unicorn/no-empty-file': 0, // oxlint
|
|
394
|
+
'unicorn/no-invalid-fetch-options': 0, // oxlint
|
|
395
|
+
'unicorn/no-invalid-remove-event-listener': 0, // oxlint
|
|
396
|
+
'unicorn/no-magic-array-flat-depth': 0, // oxlint
|
|
397
|
+
'unicorn/no-new-array': 0, // oxlint
|
|
398
|
+
'unicorn/no-single-promise-in-promise-methods': 0, // oxlint
|
|
399
|
+
'unicorn/no-unnecessary-await': 0, // oxlint
|
|
400
|
+
'unicorn/no-useless-fallback-in-spread': 0, // oxlint
|
|
401
|
+
'unicorn/no-useless-length-check': 0, // oxlint
|
|
402
|
+
'unicorn/no-useless-spread': 0, // oxlint
|
|
403
|
+
'unicorn/prefer-array-find': 0, // oxlint
|
|
404
|
+
'unicorn/prefer-modern-math-apis': 0, // oxlint
|
|
405
|
+
'unicorn/prefer-set-size': 0, // oxlint
|
|
406
|
+
'unicorn/prefer-string-starts-ends-with': 0, // oxlint
|
|
411
407
|
'@typescript-eslint/return-await': [2, 'always'],
|
|
412
408
|
'@typescript-eslint/require-await': 0,
|
|
413
409
|
'unicorn/no-array-reverse': 0, // too early
|
|
@@ -431,6 +427,12 @@ export default {
|
|
|
431
427
|
'@typescript-eslint/unbound-method': 0,
|
|
432
428
|
'@typescript-eslint/no-unsafe-argument': 0, // prevents "legit" use of `any`
|
|
433
429
|
'unicorn/prefer-export-from': 0, // breaks auto-imports in IntelliJ Idea
|
|
430
|
+
'unicorn/require-module-specifiers': 0, // oxlint
|
|
431
|
+
'unicorn/prefer-classlist-toggle': 0, // oxlint
|
|
432
|
+
'unicorn/no-unnecessary-array-splice-count': 0, // oxlint
|
|
433
|
+
'unicorn/no-useless-error-capture-stack-trace': 0, // oxlint
|
|
434
|
+
'unicorn/prefer-top-level-await': 0, // oxlint
|
|
435
|
+
'unicorn/prefer-class-fields': 0, // oxlint
|
|
434
436
|
'unicorn/no-await-expression-member': 0, // some cases are better as-is
|
|
435
437
|
'unicorn/no-array-sort': 0,
|
|
436
438
|
'unicorn/prefer-json-parse-buffer': 0, // typescript doesn't allow it
|
|
@@ -30,6 +30,7 @@ export default {
|
|
|
30
30
|
'vitest/prefer-to-contain': 2,
|
|
31
31
|
'vitest/prefer-to-have-length': 2,
|
|
32
32
|
'vitest/prefer-vi-mocked': 2,
|
|
33
|
+
'vitest/require-local-test-context-for-concurrent-snapshots': 0, // oxlint
|
|
33
34
|
'vitest/require-to-throw-message': 2,
|
|
34
35
|
'vitest/valid-title': 0, // noisy
|
|
35
36
|
'vitest/valid-expect-in-promise': 2,
|
package/cfg/oxlint.config.json
CHANGED
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"curly": [2, "multi-line"],
|
|
46
46
|
"guard-for-in": 2,
|
|
47
47
|
"max-params": [2, { "max": 5 }],
|
|
48
|
+
"prefer-spread": 2,
|
|
48
49
|
"import/extensions": [2, "always"],
|
|
49
50
|
"import/no-amd": 2,
|
|
50
51
|
"import/no-commonjs": 2,
|
|
@@ -91,6 +92,24 @@
|
|
|
91
92
|
"unicorn/no-magic-array-flat-depth": 2,
|
|
92
93
|
"unicorn/prefer-modern-math-apis": 2,
|
|
93
94
|
"unicorn/prefer-node-protocol": 2,
|
|
95
|
+
"unicorn/require-module-specifiers": 2,
|
|
96
|
+
"unicorn/prefer-classlist-toggle": 2,
|
|
97
|
+
"unicorn/no-unnecessary-array-splice-count": 2,
|
|
98
|
+
"unicorn/no-useless-error-capture-stack-trace": 2,
|
|
99
|
+
"unicorn/prefer-top-level-await": 2,
|
|
100
|
+
"unicorn/prefer-class-fields": 2,
|
|
101
|
+
"unicorn/consistent-assert": 2,
|
|
102
|
+
"unicorn/consistent-date-clone": 2,
|
|
103
|
+
"unicorn/consistent-empty-array-spread": 2,
|
|
104
|
+
"unicorn/consistent-existence-index-check": 2,
|
|
105
|
+
"unicorn/escape-case": 2,
|
|
106
|
+
"unicorn/no-console-spaces": 2,
|
|
107
|
+
"unicorn/no-hex-escape": 2,
|
|
108
|
+
"unicorn/no-instanceof-builtins": 2,
|
|
109
|
+
"unicorn/no-lonely-if": 2,
|
|
110
|
+
"unicorn/no-negation-in-equality-check": 2,
|
|
111
|
+
"unicorn/no-new-buffer": 2,
|
|
112
|
+
"import/no-named-default": 2,
|
|
94
113
|
"unicorn/catch-error-name": [
|
|
95
114
|
2,
|
|
96
115
|
{
|