@naturalcycles/dev-lib 20.20.0 → 20.21.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 +101 -101
- package/cfg/eslint.config.js +0 -6
- package/package.json +1 -2
package/cfg/eslint-rules.js
CHANGED
|
@@ -326,99 +326,99 @@ export default {
|
|
|
326
326
|
'@typescript-eslint/prefer-find': 2,
|
|
327
327
|
'prefer-promise-reject-errors': 0,
|
|
328
328
|
'@typescript-eslint/prefer-promise-reject-errors': 0, // ox
|
|
329
|
-
'unicorn/prefer-import-meta-properties': 2,
|
|
330
|
-
'unicorn/prefer-response-static-json': 0, // ox
|
|
331
|
-
'unicorn/prefer-keyboard-event-key': 0, // ox
|
|
332
|
-
'unicorn/prefer-default-parameters': 0, // ox
|
|
333
|
-
'unicorn/prefer-includes': 0, // ox
|
|
334
|
-
'unicorn/no-array-callback-reference': 0, // false positives
|
|
335
|
-
'unicorn/no-process-exit': 0,
|
|
336
|
-
'unicorn/prefer-single-call': 0,
|
|
337
|
-
'unicorn/no-abusive-eslint-disable': 0,
|
|
338
|
-
'unicorn/no-negated-condition': 0,
|
|
339
|
-
'unicorn/no-unnecessary-polyfills': 0, // little value, bottleneck performance
|
|
340
|
-
'unicorn/no-array-method-this-argument': 0, // bug: wrongly removes`readable.flatMap` concurrency option
|
|
341
|
-
'unicorn/prefer-array-flat': 0, // bug: messes up with `readable.flatMap`
|
|
342
|
-
'unicorn/number-literal-case': 0, // conflicts with prettier
|
|
343
|
-
'unicorn/prevent-abbreviations': 0,
|
|
344
|
-
'unicorn/prefer-module': 0,
|
|
345
|
-
'unicorn/no-null': 0,
|
|
346
|
-
'unicorn/filename-case': 0,
|
|
347
|
-
'unicorn/prefer-node-protocol': 0, // oxlint
|
|
348
|
-
'unicorn/prefer-set-has': 0,
|
|
349
|
-
'unicorn/explicit-length-check': 0,
|
|
350
|
-
'unicorn/no-array-for-each': 0,
|
|
351
|
-
'unicorn/prefer-at': 0, // iOS 15.4+, oxlint
|
|
352
|
-
'unicorn/import-style': 0, // todo: fix
|
|
353
|
-
'unicorn/prefer-spread': 0, // fails on joiSchema.concat() which is not an array!
|
|
354
|
-
'unicorn/prefer-structured-clone': 0, // no real advantage, plus in most of the cases we want JSON to remove undefined, etc.
|
|
355
|
-
'unicorn/better-regex': 0, // we still believe that [0-9] is clearer than [\d]
|
|
356
|
-
'unicorn/no-for-loop': 0, // oxlint has similar
|
|
357
|
-
'unicorn/no-array-reduce': 0, // oxlint
|
|
358
|
-
'unicorn/consistent-assert': 0, // oxlint
|
|
359
|
-
'unicorn/consistent-date-clone': 0, // oxlint
|
|
360
|
-
'unicorn/consistent-empty-array-spread': 0, // oxlint
|
|
361
|
-
'unicorn/consistent-existence-index-check': 0, // oxlint
|
|
362
|
-
'unicorn/escape-case': 0, // oxlint
|
|
363
|
-
'unicorn/no-console-spaces': 0, // oxlint
|
|
364
|
-
'unicorn/no-hex-escape': 0, // oxlint
|
|
365
|
-
'unicorn/no-instanceof-builtins': 0, // oxlint
|
|
366
|
-
'unicorn/no-lonely-if': 0, // oxlint
|
|
367
|
-
'unicorn/no-named-default': 0, // oxlint
|
|
368
|
-
'unicorn/no-negation-in-equality-check': 0, // oxlint
|
|
369
|
-
'unicorn/no-new-buffer': 0, // oxlint
|
|
370
|
-
'unicorn/no-accessor-recursion': 0, // oxlint
|
|
371
|
-
'unicorn/no-anonymous-default-export': 0, // oxlint
|
|
372
|
-
'unicorn/prefer-string-replace-all': 0, // oxlint
|
|
373
|
-
'unicorn/prefer-math-min-max': 0, // oxlint
|
|
374
|
-
'unicorn/prefer-code-point': 0, // oxlint
|
|
375
|
-
'unicorn/prefer-global-this': 0, // oxlint
|
|
376
|
-
'unicorn/error-message': 0, // oxlint
|
|
377
|
-
'unicorn/no-zero-fractions': 0, // oxlint
|
|
378
|
-
'unicorn/prefer-array-some': 0, // oxlint
|
|
379
|
-
'unicorn/prefer-math-trunc': 0, // oxlint
|
|
380
|
-
'unicorn/no-object-as-default-parameter': 0, // doesn't allow e.g method (opt = { skipValidation: true })
|
|
381
|
-
'unicorn/catch-error-name': [
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
],
|
|
388
|
-
'unicorn/prefer-switch': 0,
|
|
389
|
-
'unicorn/no-useless-undefined': 0,
|
|
390
|
-
'unicorn/prefer-ternary': [0, 'only-single-line'], // single-line doesn't really work, hence disabled
|
|
391
|
-
'unicorn/numeric-separators-style': [2, { onlyIfContainsSeparator: true }],
|
|
392
|
-
'unicorn/consistent-destructuring': 0, // todo: enable later
|
|
393
|
-
'unicorn/no-nested-ternary': 0,
|
|
394
|
-
'unicorn/consistent-function-scoping': 0, // todo: consider enabling later
|
|
395
|
-
'unicorn/no-this-assignment': 0,
|
|
396
|
-
'unicorn/prefer-string-slice': 0, // todo: consider?
|
|
397
|
-
'unicorn/prefer-number-properties': 0,
|
|
398
|
-
'unicorn/prefer-negative-index': 0,
|
|
399
|
-
'unicorn/prefer-regexp-test': 0,
|
|
400
|
-
'unicorn/prefer-query-selector': 0,
|
|
401
|
-
'unicorn/prefer-prototype-methods': 0, // false-positive on node promisify() of callback functions
|
|
402
|
-
'unicorn/expiring-todo-comments': 1, // warning, instead of error
|
|
403
|
-
'unicorn/no-await-in-promise-methods': 0, // oxlint
|
|
404
|
-
'unicorn/no-document-cookie': 0, // oxlint
|
|
405
|
-
'unicorn/no-empty-file': 0, // oxlint
|
|
406
|
-
'unicorn/no-invalid-fetch-options': 0, // oxlint
|
|
407
|
-
'unicorn/no-invalid-remove-event-listener': 0, // oxlint
|
|
408
|
-
'unicorn/no-magic-array-flat-depth': 0, // oxlint
|
|
409
|
-
'unicorn/no-new-array': 0, // oxlint
|
|
410
|
-
'unicorn/no-single-promise-in-promise-methods': 0, // oxlint
|
|
411
|
-
'unicorn/no-unnecessary-await': 0, // oxlint
|
|
412
|
-
'unicorn/no-useless-fallback-in-spread': 0, // oxlint
|
|
413
|
-
'unicorn/no-useless-length-check': 0, // oxlint
|
|
414
|
-
'unicorn/no-useless-spread': 0, // oxlint
|
|
415
|
-
'unicorn/prefer-array-find': 0, // oxlint
|
|
416
|
-
'unicorn/prefer-modern-math-apis': 0, // oxlint
|
|
417
|
-
'unicorn/prefer-set-size': 0, // oxlint
|
|
418
|
-
'unicorn/prefer-string-starts-ends-with': 0, // oxlint
|
|
329
|
+
// 'unicorn/prefer-import-meta-properties': 2,
|
|
330
|
+
// 'unicorn/prefer-response-static-json': 0, // ox
|
|
331
|
+
// 'unicorn/prefer-keyboard-event-key': 0, // ox
|
|
332
|
+
// 'unicorn/prefer-default-parameters': 0, // ox
|
|
333
|
+
// 'unicorn/prefer-includes': 0, // ox
|
|
334
|
+
// 'unicorn/no-array-callback-reference': 0, // false positives
|
|
335
|
+
// 'unicorn/no-process-exit': 0,
|
|
336
|
+
// 'unicorn/prefer-single-call': 0,
|
|
337
|
+
// 'unicorn/no-abusive-eslint-disable': 0,
|
|
338
|
+
// 'unicorn/no-negated-condition': 0,
|
|
339
|
+
// 'unicorn/no-unnecessary-polyfills': 0, // little value, bottleneck performance
|
|
340
|
+
// 'unicorn/no-array-method-this-argument': 0, // bug: wrongly removes`readable.flatMap` concurrency option
|
|
341
|
+
// 'unicorn/prefer-array-flat': 0, // bug: messes up with `readable.flatMap`
|
|
342
|
+
// 'unicorn/number-literal-case': 0, // conflicts with prettier
|
|
343
|
+
// 'unicorn/prevent-abbreviations': 0,
|
|
344
|
+
// 'unicorn/prefer-module': 0,
|
|
345
|
+
// 'unicorn/no-null': 0,
|
|
346
|
+
// 'unicorn/filename-case': 0,
|
|
347
|
+
// 'unicorn/prefer-node-protocol': 0, // oxlint
|
|
348
|
+
// 'unicorn/prefer-set-has': 0,
|
|
349
|
+
// 'unicorn/explicit-length-check': 0,
|
|
350
|
+
// 'unicorn/no-array-for-each': 0,
|
|
351
|
+
// 'unicorn/prefer-at': 0, // iOS 15.4+, oxlint
|
|
352
|
+
// 'unicorn/import-style': 0, // todo: fix
|
|
353
|
+
// 'unicorn/prefer-spread': 0, // fails on joiSchema.concat() which is not an array!
|
|
354
|
+
// 'unicorn/prefer-structured-clone': 0, // no real advantage, plus in most of the cases we want JSON to remove undefined, etc.
|
|
355
|
+
// 'unicorn/better-regex': 0, // we still believe that [0-9] is clearer than [\d]
|
|
356
|
+
// 'unicorn/no-for-loop': 0, // oxlint has similar
|
|
357
|
+
// 'unicorn/no-array-reduce': 0, // oxlint
|
|
358
|
+
// 'unicorn/consistent-assert': 0, // oxlint
|
|
359
|
+
// 'unicorn/consistent-date-clone': 0, // oxlint
|
|
360
|
+
// 'unicorn/consistent-empty-array-spread': 0, // oxlint
|
|
361
|
+
// 'unicorn/consistent-existence-index-check': 0, // oxlint
|
|
362
|
+
// 'unicorn/escape-case': 0, // oxlint
|
|
363
|
+
// 'unicorn/no-console-spaces': 0, // oxlint
|
|
364
|
+
// 'unicorn/no-hex-escape': 0, // oxlint
|
|
365
|
+
// 'unicorn/no-instanceof-builtins': 0, // oxlint
|
|
366
|
+
// 'unicorn/no-lonely-if': 0, // oxlint
|
|
367
|
+
// 'unicorn/no-named-default': 0, // oxlint
|
|
368
|
+
// 'unicorn/no-negation-in-equality-check': 0, // oxlint
|
|
369
|
+
// 'unicorn/no-new-buffer': 0, // oxlint
|
|
370
|
+
// 'unicorn/no-accessor-recursion': 0, // oxlint
|
|
371
|
+
// 'unicorn/no-anonymous-default-export': 0, // oxlint
|
|
372
|
+
// 'unicorn/prefer-string-replace-all': 0, // oxlint
|
|
373
|
+
// 'unicorn/prefer-math-min-max': 0, // oxlint
|
|
374
|
+
// 'unicorn/prefer-code-point': 0, // oxlint
|
|
375
|
+
// 'unicorn/prefer-global-this': 0, // oxlint
|
|
376
|
+
// 'unicorn/error-message': 0, // oxlint
|
|
377
|
+
// 'unicorn/no-zero-fractions': 0, // oxlint
|
|
378
|
+
// 'unicorn/prefer-array-some': 0, // oxlint
|
|
379
|
+
// 'unicorn/prefer-math-trunc': 0, // oxlint
|
|
380
|
+
// 'unicorn/no-object-as-default-parameter': 0, // doesn't allow e.g method (opt = { skipValidation: true })
|
|
381
|
+
// 'unicorn/catch-error-name': [
|
|
382
|
+
// 0, // oxlint
|
|
383
|
+
// {
|
|
384
|
+
// name: 'err',
|
|
385
|
+
// ignore: [/^err\d*$/, /^_/],
|
|
386
|
+
// },
|
|
387
|
+
// ],
|
|
388
|
+
// 'unicorn/prefer-switch': 0,
|
|
389
|
+
// 'unicorn/no-useless-undefined': 0,
|
|
390
|
+
// 'unicorn/prefer-ternary': [0, 'only-single-line'], // single-line doesn't really work, hence disabled
|
|
391
|
+
// 'unicorn/numeric-separators-style': [2, { onlyIfContainsSeparator: true }],
|
|
392
|
+
// 'unicorn/consistent-destructuring': 0, // todo: enable later
|
|
393
|
+
// 'unicorn/no-nested-ternary': 0,
|
|
394
|
+
// 'unicorn/consistent-function-scoping': 0, // todo: consider enabling later
|
|
395
|
+
// 'unicorn/no-this-assignment': 0,
|
|
396
|
+
// 'unicorn/prefer-string-slice': 0, // todo: consider?
|
|
397
|
+
// 'unicorn/prefer-number-properties': 0,
|
|
398
|
+
// 'unicorn/prefer-negative-index': 0,
|
|
399
|
+
// 'unicorn/prefer-regexp-test': 0,
|
|
400
|
+
// 'unicorn/prefer-query-selector': 0,
|
|
401
|
+
// 'unicorn/prefer-prototype-methods': 0, // false-positive on node promisify() of callback functions
|
|
402
|
+
// 'unicorn/expiring-todo-comments': 1, // warning, instead of error
|
|
403
|
+
// 'unicorn/no-await-in-promise-methods': 0, // oxlint
|
|
404
|
+
// 'unicorn/no-document-cookie': 0, // oxlint
|
|
405
|
+
// 'unicorn/no-empty-file': 0, // oxlint
|
|
406
|
+
// 'unicorn/no-invalid-fetch-options': 0, // oxlint
|
|
407
|
+
// 'unicorn/no-invalid-remove-event-listener': 0, // oxlint
|
|
408
|
+
// 'unicorn/no-magic-array-flat-depth': 0, // oxlint
|
|
409
|
+
// 'unicorn/no-new-array': 0, // oxlint
|
|
410
|
+
// 'unicorn/no-single-promise-in-promise-methods': 0, // oxlint
|
|
411
|
+
// 'unicorn/no-unnecessary-await': 0, // oxlint
|
|
412
|
+
// 'unicorn/no-useless-fallback-in-spread': 0, // oxlint
|
|
413
|
+
// 'unicorn/no-useless-length-check': 0, // oxlint
|
|
414
|
+
// 'unicorn/no-useless-spread': 0, // oxlint
|
|
415
|
+
// 'unicorn/prefer-array-find': 0, // oxlint
|
|
416
|
+
// 'unicorn/prefer-modern-math-apis': 0, // oxlint
|
|
417
|
+
// 'unicorn/prefer-set-size': 0, // oxlint
|
|
418
|
+
// 'unicorn/prefer-string-starts-ends-with': 0, // oxlint
|
|
419
419
|
'@typescript-eslint/return-await': [2, 'always'], // ox is not good yet
|
|
420
420
|
'@typescript-eslint/require-await': 0, // ox
|
|
421
|
-
'unicorn/no-array-reverse': 0, // too early
|
|
421
|
+
// 'unicorn/no-array-reverse': 0, // too early
|
|
422
422
|
'@typescript-eslint/no-misused-promises': 0, // ox, but not good rule
|
|
423
423
|
'@typescript-eslint/no-unsafe-assignment': 0,
|
|
424
424
|
'@typescript-eslint/no-unsafe-member-access': 0,
|
|
@@ -438,16 +438,16 @@ export default {
|
|
|
438
438
|
'@typescript-eslint/restrict-plus-operands': 0, // ox
|
|
439
439
|
'@typescript-eslint/unbound-method': 0,
|
|
440
440
|
'@typescript-eslint/no-unsafe-argument': 0, // prevents "legit" use of `any`
|
|
441
|
-
'unicorn/prefer-export-from': 0, // breaks auto-imports in IntelliJ Idea
|
|
442
|
-
'unicorn/require-module-specifiers': 0, // oxlint
|
|
443
|
-
'unicorn/prefer-classlist-toggle': 0, // oxlint
|
|
444
|
-
'unicorn/no-unnecessary-array-splice-count': 0, // oxlint
|
|
445
|
-
'unicorn/no-useless-error-capture-stack-trace': 0, // oxlint
|
|
446
|
-
'unicorn/prefer-top-level-await': 0, // oxlint
|
|
447
|
-
'unicorn/prefer-class-fields': 0, // oxlint
|
|
448
|
-
'unicorn/no-await-expression-member': 0, // some cases are better as-is
|
|
449
|
-
'unicorn/no-array-sort': 0,
|
|
450
|
-
'unicorn/prefer-json-parse-buffer': 0, // typescript doesn't allow it
|
|
441
|
+
// 'unicorn/prefer-export-from': 0, // breaks auto-imports in IntelliJ Idea
|
|
442
|
+
// 'unicorn/require-module-specifiers': 0, // oxlint
|
|
443
|
+
// 'unicorn/prefer-classlist-toggle': 0, // oxlint
|
|
444
|
+
// 'unicorn/no-unnecessary-array-splice-count': 0, // oxlint
|
|
445
|
+
// 'unicorn/no-useless-error-capture-stack-trace': 0, // oxlint
|
|
446
|
+
// 'unicorn/prefer-top-level-await': 0, // oxlint
|
|
447
|
+
// 'unicorn/prefer-class-fields': 0, // oxlint
|
|
448
|
+
// 'unicorn/no-await-expression-member': 0, // some cases are better as-is
|
|
449
|
+
// 'unicorn/no-array-sort': 0,
|
|
450
|
+
// 'unicorn/prefer-json-parse-buffer': 0, // typescript doesn't allow it
|
|
451
451
|
'no-constructor-return': 2,
|
|
452
452
|
// 'no-promise-executor-return': 2,
|
|
453
453
|
'no-self-compare': 2,
|
package/cfg/eslint.config.js
CHANGED
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import globals from 'globals'
|
|
8
8
|
import eslint from '@eslint/js'
|
|
9
9
|
import tseslint from 'typescript-eslint'
|
|
10
|
-
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
|
|
11
10
|
import eslintPluginVue from 'eslint-plugin-vue'
|
|
12
11
|
import eslintPluginOxlint from 'eslint-plugin-oxlint'
|
|
13
12
|
import eslintPluginVitest from '@vitest/eslint-plugin'
|
|
@@ -54,11 +53,6 @@ function getEslintConfigForDir() {
|
|
|
54
53
|
...c,
|
|
55
54
|
files: defaultFiles,
|
|
56
55
|
})),
|
|
57
|
-
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/configs/recommended.js
|
|
58
|
-
{
|
|
59
|
-
...eslintPluginUnicorn.configs.recommended,
|
|
60
|
-
files: defaultFiles,
|
|
61
|
-
},
|
|
62
56
|
// https://eslint.vuejs.org/user-guide/#user-guide
|
|
63
57
|
...eslintPluginVue.configs['flat/recommended'].map(c => ({
|
|
64
58
|
...c,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naturalcycles/dev-lib",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "20.
|
|
4
|
+
"version": "20.21.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@biomejs/biome": "^2",
|
|
7
7
|
"@eslint/js": "^9",
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
"eslint-plugin-import-x": "^4",
|
|
15
15
|
"eslint-plugin-oxlint": "^1",
|
|
16
16
|
"eslint-plugin-simple-import-sort": "^12",
|
|
17
|
-
"eslint-plugin-unicorn": "^62",
|
|
18
17
|
"eslint-plugin-vue": "^10",
|
|
19
18
|
"globals": "^17",
|
|
20
19
|
"lint-staged": "^16",
|