@naturalcycles/dev-lib 20.13.2 → 20.13.3

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.
@@ -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,
@@ -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
  }
@@ -130,6 +130,31 @@
130
130
  "typescript/require-array-sort-compare": 0, // not good
131
131
  "typescript/restrict-template-expressions": 0, // not good
132
132
  "typescript/no-redundant-type-constituents": 0, // `'a' | string` is still useful for DX
133
+ "typescript/no-restricted-types": [
134
+ 2,
135
+ {
136
+ "types": {
137
+ "Boolean": {
138
+ "message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
139
+ },
140
+ "Number": {
141
+ "message": "Avoid using the `Number` type. Did you mean `number`?"
142
+ },
143
+ "object": {
144
+ "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."
145
+ },
146
+ "Object": {
147
+ "message": "Avoid using the `Object` type. Did you mean `object`? Consider using Record<string, any> instead"
148
+ },
149
+ "String": {
150
+ "message": "Avoid using the `String` type. Did you mean `string`?"
151
+ },
152
+ "Symbol": {
153
+ "message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
154
+ }
155
+ }
156
+ }
157
+ ],
133
158
  "unicorn/no-anonymous-default-export": 2,
134
159
  "unicorn/no-array-reduce": 2,
135
160
  "unicorn/no-document-cookie": 2,
@@ -175,6 +200,71 @@
175
200
  ],
176
201
  "unicorn/no-accessor-recursion": 2,
177
202
  "unicorn/prefer-string-slice": 2,
203
+ "unicorn/no-unnecessary-array-flat-depth": [2],
204
+ "unicorn/no-unnecessary-slice-end": [2],
205
+ "unicorn/no-unreadable-array-destructuring": [2],
206
+ "unicorn/no-unreadable-iife": [2],
207
+ "unicorn/no-useless-collection-argument": [2],
208
+ "unicorn/no-useless-promise-resolve-reject": [2],
209
+ "unicorn/numeric-separators-style": [
210
+ 2,
211
+ {
212
+ "binary": {
213
+ "groupLength": 4,
214
+ "minimumDigits": 0
215
+ },
216
+ "hexadecimal": {
217
+ "groupLength": 2,
218
+ "minimumDigits": 0
219
+ },
220
+ "number": {
221
+ "groupLength": 3,
222
+ "minimumDigits": 5
223
+ },
224
+ "octal": {
225
+ "groupLength": 4,
226
+ "minimumDigits": 0
227
+ },
228
+ "onlyIfContainsSeparator": true
229
+ }
230
+ ],
231
+ "unicorn/prefer-add-event-listener": [2, {}],
232
+ "unicorn/prefer-array-index-of": [2],
233
+ "unicorn/prefer-bigint-literals": [2],
234
+ "unicorn/prefer-blob-reading-methods": [2],
235
+ "unicorn/prefer-dom-node-append": [2],
236
+ "unicorn/prefer-dom-node-dataset": [2],
237
+ "unicorn/prefer-dom-node-remove": [2],
238
+ "unicorn/prefer-dom-node-text-content": [2],
239
+ "unicorn/prefer-event-target": [2],
240
+ "unicorn/prefer-logical-operator-over-ternary": [2],
241
+ "unicorn/prefer-modern-dom-apis": [2],
242
+ "unicorn/prefer-native-coercion-functions": [2],
243
+ "unicorn/prefer-object-from-entries": [2, {}],
244
+ "unicorn/prefer-optional-catch-binding": [2],
245
+ "unicorn/prefer-reflect-apply": [2],
246
+ "unicorn/prefer-string-raw": [2],
247
+ "unicorn/prefer-string-trim-start-end": [2],
248
+ "unicorn/prefer-type-error": [2],
249
+ "unicorn/require-array-join-separator": [2],
250
+ "unicorn/switch-case-braces": [2, "always"],
251
+ "unicorn/text-encoding-identifier-case": [
252
+ 2,
253
+ {
254
+ "withDash": false
255
+ }
256
+ ],
257
+ "vitest/no-duplicate-hooks": [2],
258
+ "vitest/no-focused-tests": [2],
259
+ "vitest/no-identical-title": [2],
260
+ "vitest/no-test-return-statement": [2],
261
+ "vitest/prefer-hooks-in-order": [2],
262
+ "vitest/prefer-hooks-on-top": [2],
263
+ "vitest/prefer-mock-promise-shorthand": [2],
264
+ "vitest/prefer-to-have-length": [2],
265
+ "vitest/require-to-throw-message": [2],
266
+ "vitest/valid-describe-callback": 0,
267
+ "vitest/valid-expect": 0,
178
268
  "vitest/no-import-node-test": 2,
179
269
  "jest/consistent-test-it": [
180
270
  2,
@@ -185,7 +275,9 @@
185
275
  ],
186
276
  "jest/max-nested-describe": [0, { "max": 4 }], // not good
187
277
  "jest/no-alias-methods": 2,
188
- "vue/no-multiple-slot-args": 2
278
+ "vue/no-multiple-slot-args": 2,
279
+ "vue/define-emits-declaration": [2, "type-based"],
280
+ "vue/define-props-declaration": [2]
189
281
  },
190
282
  "settings": {
191
283
  "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.13.3",
5
5
  "dependencies": {
6
6
  "@biomejs/biome": "^2",
7
7
  "@commitlint/cli": "^20",