@naturalcycles/dev-lib 20.2.0 → 20.4.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/biome.jsonc CHANGED
@@ -39,6 +39,7 @@
39
39
  "useImportExtensions": "off", // oxlint
40
40
  "useParseIntRadix": "off",
41
41
  "noUnusedFunctionParameters": "off", // oxlint
42
+ "noConstantCondition": "off", // ox
42
43
  // noUnusedImports + noUnusedVariables can replace eslint-plugin-unused-vars!
43
44
  "noUnusedImports": "off", // oxlint
44
45
  "noUnusedVariables": {
@@ -77,7 +78,8 @@
77
78
  "suspicious": {
78
79
  "useNumberToFixedDigitsArgument": "error",
79
80
  "useIterableCallbackReturn": "off",
80
- "useErrorMessage": "error",
81
+ "useErrorMessage": "off", // ox
82
+ "noControlCharactersInRegex": "off", // ox
81
83
  "noEvolvingTypes": "error",
82
84
  "noExplicitAny": "off",
83
85
  "noAssignInExpressions": "off",
@@ -86,11 +88,14 @@
86
88
  "noThenProperty": "off",
87
89
  "noImportAssign": "off",
88
90
  "noDoubleEquals": "off", // oxlint
91
+ "noDocumentCookie": "off", // ox
89
92
  "noEmptyInterface": "off"
90
93
  },
91
94
  "complexity": {
92
95
  "useDateNow": "error",
96
+ "useArrowFunction": "off", // ox
93
97
  "noUselessUndefinedInitialization": "error",
98
+ "noUselessEscapeInRegex": "off", // ox
94
99
  "noUselessStringConcat": "error",
95
100
  "noForEach": "off",
96
101
  "noUselessThisAlias": "off",
@@ -155,7 +155,7 @@ export default {
155
155
  // eqeqeq: [2, 'smart'], // oxlint
156
156
  'for-direction': 2,
157
157
  'getter-return': 2,
158
- 'id-blacklist': [
158
+ 'id-denylist': [
159
159
  2,
160
160
  'any',
161
161
  'Number',
@@ -243,32 +243,6 @@ export default {
243
243
  'no-prototype-builtins': 2,
244
244
  'no-redeclare': 2,
245
245
  'no-regex-spaces': 2,
246
- 'no-restricted-imports': [
247
- 2,
248
- 'rxjs/Rx',
249
- 'rxjs/internals',
250
- 'rxjs/Observable',
251
- 'rxjs/Observer',
252
- 'rxjs/Subject',
253
- 'rxjs/observable/defer',
254
- 'rxjs/observable/merge',
255
- 'rxjs/observable/of',
256
- 'rxjs/observable/timer',
257
- 'rxjs/observable/combineLatest',
258
- 'rxjs/add/observable/combineLatest',
259
- 'rxjs/add/observable/of',
260
- 'rxjs/add/observable/merge',
261
- 'rxjs/add/operator/debounceTime',
262
- 'rxjs/add/operator/distinctUntilChanged',
263
- 'rxjs/add/operator/do',
264
- 'rxjs/add/operator/filter',
265
- 'rxjs/add/operator/map',
266
- 'rxjs/add/operator/retry',
267
- 'rxjs/add/operator/startWith',
268
- 'rxjs/add/operator/switchMap',
269
- 'rxjs/observable/interval',
270
- 'rxjs/observable/forkJoin',
271
- ],
272
246
  curly: [0, 'multi-line'], // this one is an exception that can conflict with prettier, oxlint
273
247
  'no-self-assign': 2,
274
248
  'no-setter-return': 2,
@@ -313,6 +287,7 @@ export default {
313
287
  'no-await-in-loop': 0, // it's actually often ok
314
288
  'no-extend-native': 0, // oxlint
315
289
  'guard-for-in': 0, // oxlint
290
+ 'prefer-spread': 0, // oxlint
316
291
  '@typescript-eslint/no-namespace': [
317
292
  2,
318
293
  {
@@ -369,15 +344,35 @@ export default {
369
344
  'unicorn/prefer-set-has': 0,
370
345
  'unicorn/explicit-length-check': 0,
371
346
  'unicorn/no-array-for-each': 0,
372
- 'unicorn/prefer-at': 0, // iOS 15.4+
347
+ 'unicorn/prefer-at': 0, // iOS 15.4+, oxlint
373
348
  'unicorn/import-style': 0, // todo: fix
374
349
  'unicorn/prefer-spread': 0, // fails on joiSchema.concat() which is not an array!
375
350
  'unicorn/prefer-structured-clone': 0, // no real advantage, plus in most of the cases we want JSON to remove undefined, etc.
376
351
  'unicorn/better-regex': 0, // we still believe that [0-9] is clearer than [\d]
377
352
  'unicorn/no-for-loop': 0, // oxlint has similar
378
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
379
366
  'unicorn/no-accessor-recursion': 0, // oxlint
380
367
  'unicorn/no-anonymous-default-export': 0, // oxlint
368
+ 'unicorn/prefer-string-replace-all': 0, // oxlint
369
+ 'unicorn/prefer-math-min-max': 0, // oxlint
370
+ 'unicorn/prefer-code-point': 0, // oxlint
371
+ 'unicorn/prefer-global-this': 0, // oxlint
372
+ 'unicorn/error-message': 0, // oxlint
373
+ 'unicorn/no-zero-fractions': 0, // oxlint
374
+ 'unicorn/prefer-array-some': 0, // oxlint
375
+ 'unicorn/prefer-math-trunc': 0, // oxlint
381
376
  'unicorn/no-object-as-default-parameter': 0, // doesn't allow e.g method (opt = { skipValidation: true })
382
377
  'unicorn/catch-error-name': [
383
378
  0, // oxlint
@@ -440,6 +435,12 @@ export default {
440
435
  '@typescript-eslint/unbound-method': 0,
441
436
  '@typescript-eslint/no-unsafe-argument': 0, // prevents "legit" use of `any`
442
437
  'unicorn/prefer-export-from': 0, // breaks auto-imports in IntelliJ Idea
438
+ 'unicorn/require-module-specifiers': 0, // oxlint
439
+ 'unicorn/prefer-classlist-toggle': 0, // oxlint
440
+ 'unicorn/no-unnecessary-array-splice-count': 0, // oxlint
441
+ 'unicorn/no-useless-error-capture-stack-trace': 0, // oxlint
442
+ 'unicorn/prefer-top-level-await': 0, // oxlint
443
+ 'unicorn/prefer-class-fields': 0, // oxlint
443
444
  'unicorn/no-await-expression-member': 0, // some cases are better as-is
444
445
  'unicorn/no-array-sort': 0,
445
446
  'unicorn/prefer-json-parse-buffer': 0, // typescript doesn't allow it
@@ -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,32 @@
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
+ "unicorn/prefer-string-replace-all": 2,
113
+ "unicorn/prefer-math-min-max": 2,
114
+ "unicorn/prefer-code-point": 2,
115
+ "unicorn/prefer-global-this": 2,
116
+ "unicorn/error-message": 2,
117
+ "unicorn/no-zero-fractions": 2,
118
+ "unicorn/prefer-array-some": 2,
119
+ "unicorn/prefer-math-trunc": 2,
120
+ "import/no-named-default": 2,
94
121
  "unicorn/catch-error-name": [
95
122
  2,
96
123
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "20.2.0",
4
+ "version": "20.4.0",
5
5
  "dependencies": {
6
6
  "@biomejs/biome": "^2",
7
7
  "@commitlint/cli": "^20",