@naturalcycles/dev-lib 20.13.2 → 20.14.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
@@ -103,7 +103,7 @@
103
103
  "noUselessThisAlias": "off",
104
104
  "useLiteralKeys": "off",
105
105
  "noBannedTypes": "off",
106
- "noCommaOperator": "error",
106
+ "noCommaOperator": "off", // ox
107
107
  "noArguments": "error"
108
108
  },
109
109
  "nursery": {}
@@ -151,7 +151,7 @@ export default {
151
151
  max: 40,
152
152
  },
153
153
  ],
154
- 'constructor-super': 2,
154
+ 'constructor-super': 0, // ox
155
155
  // eqeqeq: [2, 'smart'], // oxlint
156
156
  'for-direction': 2,
157
157
  'getter-return': 2,
@@ -172,7 +172,7 @@ export default {
172
172
  2,
173
173
  {
174
174
  // This is what "removes any newlines between imports":
175
- groups: [['^\\u0000', '^node:', '^@?\\w', '^', '^\\.']],
175
+ groups: [[String.raw`^\u0000`, '^node:', String.raw`^@?\w`, '^', String.raw`^\.`]],
176
176
  },
177
177
  ],
178
178
  'simple-import-sort/exports': 2,
@@ -223,7 +223,7 @@ export default {
223
223
  'no-ex-assign': 2,
224
224
  'no-extra-boolean-cast': 2,
225
225
  'no-implicit-coercion': [
226
- 2,
226
+ 0, // ox
227
227
  {
228
228
  allow: ['!!'],
229
229
  },
@@ -328,6 +328,8 @@ export default {
328
328
  '@typescript-eslint/prefer-promise-reject-errors': 0, // ox
329
329
  'unicorn/prefer-import-meta-properties': 2,
330
330
  'unicorn/prefer-response-static-json': 0, // ox
331
+ 'unicorn/prefer-keyboard-event-key': 0, // ox
332
+ 'unicorn/prefer-default-parameters': 0, // ox
331
333
  'unicorn/prefer-includes': 0, // ox
332
334
  'unicorn/no-array-callback-reference': 0, // false positives
333
335
  'unicorn/no-process-exit': 0,
@@ -460,7 +462,7 @@ export default {
460
462
  ],
461
463
  'max-params': [0, { max: 5 }], // oxlint
462
464
  'no-else-return': 2,
463
- 'no-sequences': 2,
465
+ 'no-sequences': 0, // ox
464
466
  'no-useless-concat': 0, // oxlint
465
467
  '@typescript-eslint/ban-tslint-comment': 0, // ox
466
468
  '@typescript-eslint/explicit-function-return-type': [
@@ -135,7 +135,7 @@ function getConfig(_tsconfigPath) {
135
135
  ...eslintVueRules.rules,
136
136
  ...eslintPrettierRules.rules, // disable eslint rules already covered by prettier
137
137
  ...eslintBiomeRules.rules, // disable eslint rules already covered by biome
138
- ...eslintPluginOxlint.configs['flat/all'].rules, // disable eslint rules already covered by oxlint
138
+ ...eslintPluginOxlint.configs['flat/all'][0].rules, // disable eslint rules already covered by oxlint
139
139
  },
140
140
  }
141
141
  }
@@ -34,6 +34,7 @@
34
34
  "no-new-wrappers": 2,
35
35
  "no-useless-call": 2,
36
36
  "no-accumulating-spread": 2,
37
+ "no-map-spread": 0, // todo: consider, check the effect
37
38
  "prefer-array-find": 2,
38
39
  "prefer-array-flat-map": 2,
39
40
  "prefer-set-has": 2,
@@ -42,6 +43,8 @@
42
43
  "no-bitwise": 2,
43
44
  "no-empty": [2, { "allowEmptyCatch": true }],
44
45
  "no-regex-spaces": 2,
46
+ "no-sequences": 2,
47
+ "no-implicit-coercion": [2, { "allow": ["!!"] }],
45
48
  "no-restricted-globals": [2, "event", "__dirname", "__filename"],
46
49
  "no-unused-expressions": 2,
47
50
  "no-var": 2,
@@ -130,6 +133,31 @@
130
133
  "typescript/require-array-sort-compare": 0, // not good
131
134
  "typescript/restrict-template-expressions": 0, // not good
132
135
  "typescript/no-redundant-type-constituents": 0, // `'a' | string` is still useful for DX
136
+ "typescript/no-restricted-types": [
137
+ 2,
138
+ {
139
+ "types": {
140
+ "Boolean": {
141
+ "message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
142
+ },
143
+ "Number": {
144
+ "message": "Avoid using the `Number` type. Did you mean `number`?"
145
+ },
146
+ "object": {
147
+ "message": "The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).\nConsider using `Record<string, any>` instead, as it allows you to more easily inspect and use the keys."
148
+ },
149
+ "Object": {
150
+ "message": "Avoid using the `Object` type. Did you mean `object`? Consider using Record<string, any> instead"
151
+ },
152
+ "String": {
153
+ "message": "Avoid using the `String` type. Did you mean `string`?"
154
+ },
155
+ "Symbol": {
156
+ "message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
157
+ }
158
+ }
159
+ }
160
+ ],
133
161
  "unicorn/no-anonymous-default-export": 2,
134
162
  "unicorn/no-array-reduce": 2,
135
163
  "unicorn/no-document-cookie": 2,
@@ -148,6 +176,8 @@
148
176
  "unicorn/consistent-empty-array-spread": 2,
149
177
  "unicorn/consistent-existence-index-check": 2,
150
178
  "unicorn/escape-case": 2,
179
+ "unicorn/prefer-keyboard-event-key": 2,
180
+ "unicorn/prefer-default-parameters": 2,
151
181
  "unicorn/no-console-spaces": 2,
152
182
  "unicorn/no-hex-escape": 2,
153
183
  "unicorn/no-instanceof-builtins": 2,
@@ -175,6 +205,71 @@
175
205
  ],
176
206
  "unicorn/no-accessor-recursion": 2,
177
207
  "unicorn/prefer-string-slice": 2,
208
+ "unicorn/no-unnecessary-array-flat-depth": [2],
209
+ "unicorn/no-unnecessary-slice-end": [2],
210
+ "unicorn/no-unreadable-array-destructuring": [2],
211
+ "unicorn/no-unreadable-iife": [2],
212
+ "unicorn/no-useless-collection-argument": [2],
213
+ "unicorn/no-useless-promise-resolve-reject": [2],
214
+ "unicorn/numeric-separators-style": [
215
+ 2,
216
+ {
217
+ "binary": {
218
+ "groupLength": 4,
219
+ "minimumDigits": 0
220
+ },
221
+ "hexadecimal": {
222
+ "groupLength": 2,
223
+ "minimumDigits": 0
224
+ },
225
+ "number": {
226
+ "groupLength": 3,
227
+ "minimumDigits": 5
228
+ },
229
+ "octal": {
230
+ "groupLength": 4,
231
+ "minimumDigits": 0
232
+ },
233
+ "onlyIfContainsSeparator": true
234
+ }
235
+ ],
236
+ "unicorn/prefer-add-event-listener": [2, {}],
237
+ "unicorn/prefer-array-index-of": [2],
238
+ "unicorn/prefer-bigint-literals": [2],
239
+ "unicorn/prefer-blob-reading-methods": [2],
240
+ "unicorn/prefer-dom-node-append": [2],
241
+ "unicorn/prefer-dom-node-dataset": [2],
242
+ "unicorn/prefer-dom-node-remove": [2],
243
+ "unicorn/prefer-dom-node-text-content": [2],
244
+ "unicorn/prefer-event-target": [2],
245
+ "unicorn/prefer-logical-operator-over-ternary": [2],
246
+ "unicorn/prefer-modern-dom-apis": [2],
247
+ "unicorn/prefer-native-coercion-functions": [2],
248
+ "unicorn/prefer-object-from-entries": [2, {}],
249
+ "unicorn/prefer-optional-catch-binding": [2],
250
+ "unicorn/prefer-reflect-apply": [2],
251
+ "unicorn/prefer-string-raw": [2],
252
+ "unicorn/prefer-string-trim-start-end": [2],
253
+ "unicorn/prefer-type-error": [2],
254
+ "unicorn/require-array-join-separator": [2],
255
+ "unicorn/switch-case-braces": [2, "always"],
256
+ "unicorn/text-encoding-identifier-case": [
257
+ 2,
258
+ {
259
+ "withDash": false
260
+ }
261
+ ],
262
+ "vitest/no-duplicate-hooks": [2],
263
+ "vitest/no-focused-tests": [2],
264
+ "vitest/no-identical-title": [2],
265
+ "vitest/no-test-return-statement": [2],
266
+ "vitest/prefer-hooks-in-order": [2],
267
+ "vitest/prefer-hooks-on-top": [2],
268
+ "vitest/prefer-mock-promise-shorthand": [2],
269
+ "vitest/prefer-to-have-length": [2],
270
+ "vitest/require-to-throw-message": [2],
271
+ "vitest/valid-describe-callback": 0,
272
+ "vitest/valid-expect": 0,
178
273
  "vitest/no-import-node-test": 2,
179
274
  "jest/consistent-test-it": [
180
275
  2,
@@ -185,7 +280,9 @@
185
280
  ],
186
281
  "jest/max-nested-describe": [0, { "max": 4 }], // not good
187
282
  "jest/no-alias-methods": 2,
188
- "vue/no-multiple-slot-args": 2
283
+ "vue/no-multiple-slot-args": 2,
284
+ "vue/define-emits-declaration": [2, "type-based"],
285
+ "vue/define-props-declaration": [2]
189
286
  },
190
287
  "settings": {
191
288
  "jsdoc": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/dev-lib",
3
3
  "type": "module",
4
- "version": "20.13.2",
4
+ "version": "20.14.0",
5
5
  "dependencies": {
6
6
  "@biomejs/biome": "^2",
7
7
  "@commitlint/cli": "^20",
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/mitm": "^1",
47
- "@types/node": "^24"
47
+ "@types/node": "^25"
48
48
  },
49
49
  "exports": {
50
50
  "./cfg/": "./cfg/",