@naturalcycles/dev-lib 20.39.0 → 20.41.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/lint-staged.config.js +2 -2
- package/cfg/oxfmt.config.d.ts +5 -0
- package/cfg/oxfmt.config.js +30 -0
- package/cfg/oxlint.config.d.ts +5 -0
- package/cfg/oxlint.config.js +410 -0
- package/dist/check.util.js +5 -5
- package/package.json +3 -2
- package/cfg/oxlint.config.json +0 -375
|
@@ -19,13 +19,13 @@ import { exec2 } from '@naturalcycles/nodejs-lib/exec2'
|
|
|
19
19
|
import picomatch from 'picomatch'
|
|
20
20
|
import { prettierExtensionsAll, lintExclude, minActionlintVersion } from './_cnst.js'
|
|
21
21
|
|
|
22
|
-
const oxfmtConfigPath = ['.
|
|
22
|
+
const oxfmtConfigPath = ['oxfmt.config.ts'].find(fs.existsSync)
|
|
23
23
|
|
|
24
24
|
const stylelintConfigPath = [`stylelint.config.js`].find(fs.existsSync)
|
|
25
25
|
|
|
26
26
|
const eslintConfigPath = ['eslint.config.js'].find(fs.existsSync)
|
|
27
27
|
|
|
28
|
-
const oxlintConfigPath = ['.
|
|
28
|
+
const oxlintConfigPath = ['oxlint.config.ts'].find(fs.existsSync)
|
|
29
29
|
|
|
30
30
|
let oxfmtCmd = undefined
|
|
31
31
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineConfig } from 'oxfmt'
|
|
2
|
+
|
|
3
|
+
export function defineOxfmtConfig(config) {
|
|
4
|
+
return defineConfig({
|
|
5
|
+
...sharedConfig,
|
|
6
|
+
...config,
|
|
7
|
+
ignorePatterns: [...sharedConfig.ignorePatterns, ...(config.ignorePatterns || [])],
|
|
8
|
+
})
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const sharedConfig = {
|
|
12
|
+
ignorePatterns: ['__exclude', '*.compact.json', '*.mock.json'],
|
|
13
|
+
arrowParens: 'avoid',
|
|
14
|
+
proseWrap: 'always',
|
|
15
|
+
semi: false,
|
|
16
|
+
singleQuote: true,
|
|
17
|
+
tabWidth: 2,
|
|
18
|
+
sortPackageJson: false,
|
|
19
|
+
sortImports: {
|
|
20
|
+
newlinesBetween: false,
|
|
21
|
+
groups: [
|
|
22
|
+
'side_effect',
|
|
23
|
+
'side_effect-style',
|
|
24
|
+
'builtin',
|
|
25
|
+
'external',
|
|
26
|
+
['internal', 'parent', 'sibling', 'index'],
|
|
27
|
+
'unknown',
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
}
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { defineConfig } from 'oxlint'
|
|
2
|
+
|
|
3
|
+
export function defineOxlintConfig(config) {
|
|
4
|
+
return defineConfig({
|
|
5
|
+
...sharedConfig,
|
|
6
|
+
...config,
|
|
7
|
+
ignorePatterns: [...sharedConfig.ignorePatterns, ...(config.ignorePatterns || [])],
|
|
8
|
+
rules: {
|
|
9
|
+
...sharedConfig.rules,
|
|
10
|
+
...config.rules,
|
|
11
|
+
},
|
|
12
|
+
settings: {
|
|
13
|
+
...sharedConfig.settings,
|
|
14
|
+
...config.settings,
|
|
15
|
+
},
|
|
16
|
+
})
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export const sharedConfig = {
|
|
20
|
+
ignorePatterns: ['__exclude'],
|
|
21
|
+
plugins: [
|
|
22
|
+
'oxc',
|
|
23
|
+
'eslint',
|
|
24
|
+
'typescript',
|
|
25
|
+
'unicorn',
|
|
26
|
+
'import',
|
|
27
|
+
'jsdoc',
|
|
28
|
+
'node',
|
|
29
|
+
'promise',
|
|
30
|
+
// enable as needed
|
|
31
|
+
// "react",
|
|
32
|
+
// "react-perf",
|
|
33
|
+
// "jsx-a11y",
|
|
34
|
+
// "vue",
|
|
35
|
+
'vitest',
|
|
36
|
+
],
|
|
37
|
+
jsPlugins: [`${import.meta.dirname}/oxlint-plugin-stylistic.mjs`],
|
|
38
|
+
options: {
|
|
39
|
+
reportUnusedDisableDirectives: 'deny',
|
|
40
|
+
maxWarnings: 0,
|
|
41
|
+
denyWarnings: true,
|
|
42
|
+
typeAware: true,
|
|
43
|
+
typeCheck: true,
|
|
44
|
+
},
|
|
45
|
+
rules: {
|
|
46
|
+
'no-unused-vars': [
|
|
47
|
+
'error',
|
|
48
|
+
{
|
|
49
|
+
fix: {
|
|
50
|
+
imports: 'fix',
|
|
51
|
+
variables: 'suggestion',
|
|
52
|
+
},
|
|
53
|
+
varsIgnorePattern: '^(_$|__)',
|
|
54
|
+
argsIgnorePattern: '^_',
|
|
55
|
+
destructuredArrayIgnorePattern: '^_',
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
'@stylistic/padding-line-between-statements': [
|
|
59
|
+
2,
|
|
60
|
+
{ blankLine: 'always', prev: 'function', next: '*' },
|
|
61
|
+
{ blankLine: 'always', prev: '*', next: 'function' },
|
|
62
|
+
{ blankLine: 'always', prev: 'class', next: '*' },
|
|
63
|
+
{ blankLine: 'always', prev: '*', next: 'class' },
|
|
64
|
+
],
|
|
65
|
+
'@stylistic/lines-between-class-members': [2, 'always', { exceptAfterSingleLine: true }],
|
|
66
|
+
complexity: [2, { max: 40 }],
|
|
67
|
+
'no-this-alias': 0,
|
|
68
|
+
'no-shadow': 0, // too many shadows in the codebase already
|
|
69
|
+
'no-async-promise-executor': 0,
|
|
70
|
+
'no-standalone-expect': 0,
|
|
71
|
+
'no-conditional-expect': 0,
|
|
72
|
+
'expect-expect': 0,
|
|
73
|
+
'no-disabled-tests': 0,
|
|
74
|
+
'valid-expect': 0,
|
|
75
|
+
'valid-title': 0,
|
|
76
|
+
'valid-describe-callback': 0,
|
|
77
|
+
'jsdoc/require-yields': 0,
|
|
78
|
+
'no-new-wrappers': 2,
|
|
79
|
+
'no-useless-call': 2,
|
|
80
|
+
'no-accumulating-spread': 2,
|
|
81
|
+
'no-map-spread': 0, // todo: consider, check the effect
|
|
82
|
+
'prefer-array-find': 2,
|
|
83
|
+
'prefer-array-flat-map': 2,
|
|
84
|
+
'prefer-set-has': 2,
|
|
85
|
+
'prefer-const': [2, { destructuring: 'all' }],
|
|
86
|
+
'no-array-constructor': 2,
|
|
87
|
+
'no-useless-return': 0, // not useful
|
|
88
|
+
'no-bitwise': 2,
|
|
89
|
+
'no-empty': [2, { allowEmptyCatch: true }],
|
|
90
|
+
'no-regex-spaces': 2,
|
|
91
|
+
'no-sequences': 2,
|
|
92
|
+
'no-implicit-coercion': [2, { allow: ['!!'] }],
|
|
93
|
+
'no-restricted-globals': [
|
|
94
|
+
2,
|
|
95
|
+
'event',
|
|
96
|
+
'__dirname',
|
|
97
|
+
'__filename',
|
|
98
|
+
{
|
|
99
|
+
name: 'Intl',
|
|
100
|
+
message: 'Use Intl2 instead.',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
'no-unused-expressions': 2,
|
|
104
|
+
'no-var': 2,
|
|
105
|
+
'unicode-bom': 2,
|
|
106
|
+
'no-extend-native': 2,
|
|
107
|
+
'no-extra-bind': 2,
|
|
108
|
+
'no-duplicate-imports': [
|
|
109
|
+
0, // disabled until auto-fix is there
|
|
110
|
+
{
|
|
111
|
+
allowSeparateTypeImports: true,
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
'no-new': 2,
|
|
115
|
+
'no-unexpected-multiline': 2,
|
|
116
|
+
'no-unneeded-ternary': 2,
|
|
117
|
+
'no-useless-concat': 2,
|
|
118
|
+
'no-useless-constructor': 2,
|
|
119
|
+
'preserve-caught-error': 2,
|
|
120
|
+
eqeqeq: [2, 'smart'],
|
|
121
|
+
curly: [2, 'multi-line'],
|
|
122
|
+
'guard-for-in': 2,
|
|
123
|
+
'max-params': [2, { max: 5 }],
|
|
124
|
+
'prefer-spread': 2,
|
|
125
|
+
'import/extensions': [0, 'always', { ignorePackages: true }], // disabled as it's buggy; would be nice to enable eventually
|
|
126
|
+
'import/no-amd': 2,
|
|
127
|
+
'import/no-commonjs': 2,
|
|
128
|
+
'import/no-cycle': 2,
|
|
129
|
+
'import/no-default-export': 2,
|
|
130
|
+
'import/no-webpack-loader-syntax': 2,
|
|
131
|
+
'import/no-duplicates': [2, { 'prefer-inline': false }],
|
|
132
|
+
// "import/export": 2, // todo: adopt when it graduates
|
|
133
|
+
'import/no-empty-named-blocks': 2,
|
|
134
|
+
'import/no-absolute-path': 2,
|
|
135
|
+
'import/no-named-as-default': 2,
|
|
136
|
+
'import/no-named-as-default-member': 0,
|
|
137
|
+
'import/no-self-import': 2,
|
|
138
|
+
'import/no-unassigned-import': 0,
|
|
139
|
+
'oxc/bad-bitwise-operator': 2,
|
|
140
|
+
'oxc/no-const-enum': 2,
|
|
141
|
+
'oxc/approx-constant': 2,
|
|
142
|
+
'oxc/misrefactored-assign-op': 2,
|
|
143
|
+
'promise/spec-only': 2,
|
|
144
|
+
'typescript/class-literal-property-style': 2,
|
|
145
|
+
'typescript/explicit-function-return-type': [2, { allowExpressions: true }],
|
|
146
|
+
// "typescript/explicit-module-boundary-types": [2, {"allowArgumentsExplicitlyTypedAsAny": true}]
|
|
147
|
+
'typescript/no-empty-object-type': [2, { allowInterfaces: 'always' }],
|
|
148
|
+
'typescript/no-import-type-side-effects': 2,
|
|
149
|
+
// "typescript/no-namespace": 2,
|
|
150
|
+
'typescript/no-non-null-asserted-nullish-coalescing': 2,
|
|
151
|
+
'typescript/no-require-imports': 2,
|
|
152
|
+
'typescript/no-var-requires': 2,
|
|
153
|
+
'typescript/no-unnecessary-template-expression': 2,
|
|
154
|
+
'typescript/no-unnecessary-type-arguments': 0, // not good in the end
|
|
155
|
+
'typescript/no-unnecessary-type-constraint': 2,
|
|
156
|
+
// "typescript/no-unsafe-argument": 2, // looks good, but too strict for now
|
|
157
|
+
// "typescript/no-dynamic-delete": 2,
|
|
158
|
+
'typescript/prefer-optional-chain': 0, // buggy
|
|
159
|
+
'typescript/non-nullable-type-assertion-style': 2,
|
|
160
|
+
'typescript/prefer-literal-enum-member': 2,
|
|
161
|
+
'typescript/prefer-reduce-type-parameter': 2,
|
|
162
|
+
'typescript/promise-function-async': [
|
|
163
|
+
2,
|
|
164
|
+
{
|
|
165
|
+
checkArrowFunctions: false,
|
|
166
|
+
checkFunctionDeclarations: true,
|
|
167
|
+
checkFunctionExpressions: true,
|
|
168
|
+
checkMethodDeclarations: true,
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
'typescript/prefer-for-of': 2,
|
|
172
|
+
'typescript/no-confusing-non-null-assertion': 2,
|
|
173
|
+
'typescript/ban-ts-comment': [
|
|
174
|
+
2,
|
|
175
|
+
{
|
|
176
|
+
minimumDescriptionLength: 2,
|
|
177
|
+
'ts-expect-error': 'allow-with-description',
|
|
178
|
+
'ts-nocheck': 'allow-with-description',
|
|
179
|
+
'ts-check': false,
|
|
180
|
+
'ts-ignore': true,
|
|
181
|
+
},
|
|
182
|
+
],
|
|
183
|
+
'typescript/ban-tslint-comment': 2,
|
|
184
|
+
'typescript/prefer-function-type': 2,
|
|
185
|
+
'typescript/prefer-namespace-keyword': 2,
|
|
186
|
+
'typescript/consistent-generic-constructors': [2, 'constructor'],
|
|
187
|
+
'typescript/consistent-type-definitions': [2, 'interface'],
|
|
188
|
+
'typescript/consistent-type-imports': 2,
|
|
189
|
+
'typescript/consistent-type-assertions': [
|
|
190
|
+
2,
|
|
191
|
+
{
|
|
192
|
+
assertionStyle: 'as',
|
|
193
|
+
},
|
|
194
|
+
],
|
|
195
|
+
'typescript/no-inferrable-types': [
|
|
196
|
+
2,
|
|
197
|
+
{
|
|
198
|
+
ignoreParameters: true,
|
|
199
|
+
},
|
|
200
|
+
],
|
|
201
|
+
'typescript/adjacent-overload-signatures': 2,
|
|
202
|
+
'typescript/array-type': 2,
|
|
203
|
+
'typescript/prefer-enum-initializers': 2,
|
|
204
|
+
'typescript/prefer-promise-reject-errors': 2,
|
|
205
|
+
'typescript/prefer-ts-expect-error': 2,
|
|
206
|
+
'typescript/require-await': 0, // not good yet
|
|
207
|
+
'typescript/restrict-plus-operands': 2,
|
|
208
|
+
'typescript/return-await': [2, 'error-handling-correctness-only'],
|
|
209
|
+
'typescript/only-throw-error': 2,
|
|
210
|
+
'typescript/no-unsafe-function-type': 2,
|
|
211
|
+
'typescript/no-misused-promises': [
|
|
212
|
+
2,
|
|
213
|
+
{
|
|
214
|
+
checksVoidReturn: {
|
|
215
|
+
// "variables": false,
|
|
216
|
+
// "inheritedMethods": false,
|
|
217
|
+
// "returns": false
|
|
218
|
+
arguments: false,
|
|
219
|
+
properties: false,
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
'typescript/no-mixed-enums': 2,
|
|
224
|
+
'typescript/no-unnecessary-type-assertion': 2,
|
|
225
|
+
'typescript/no-unnecessary-boolean-literal-compare': 2,
|
|
226
|
+
'typescript/no-base-to-string': 2,
|
|
227
|
+
// disabled, as it fails on legit unit test patterns
|
|
228
|
+
'typescript/unbound-method': [
|
|
229
|
+
0,
|
|
230
|
+
{
|
|
231
|
+
ignoreStatic: true,
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
'typescript/switch-exhaustiveness-check': 0, // not good
|
|
235
|
+
'typescript/require-array-sort-compare': 0, // not good
|
|
236
|
+
'typescript/restrict-template-expressions': 0, // not good
|
|
237
|
+
'typescript/no-redundant-type-constituents': 0, // `'a' | string` is still useful for DX
|
|
238
|
+
'typescript/no-restricted-types': [
|
|
239
|
+
2,
|
|
240
|
+
{
|
|
241
|
+
types: {
|
|
242
|
+
Boolean: {
|
|
243
|
+
message: 'Avoid using the `Boolean` type. Did you mean `boolean`?',
|
|
244
|
+
},
|
|
245
|
+
Number: {
|
|
246
|
+
message: 'Avoid using the `Number` type. Did you mean `number`?',
|
|
247
|
+
},
|
|
248
|
+
object: {
|
|
249
|
+
message:
|
|
250
|
+
'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.',
|
|
251
|
+
},
|
|
252
|
+
Object: {
|
|
253
|
+
message:
|
|
254
|
+
'Avoid using the `Object` type. Did you mean `object`? Consider using Record<string, any> instead',
|
|
255
|
+
},
|
|
256
|
+
String: {
|
|
257
|
+
message: 'Avoid using the `String` type. Did you mean `string`?',
|
|
258
|
+
},
|
|
259
|
+
Symbol: {
|
|
260
|
+
message: 'Avoid using the `Symbol` type. Did you mean `symbol`?',
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
],
|
|
265
|
+
'unicorn/no-anonymous-default-export': 2,
|
|
266
|
+
'unicorn/no-immediate-mutation': 2,
|
|
267
|
+
'unicorn/no-array-reduce': 2,
|
|
268
|
+
'unicorn/no-document-cookie': 2,
|
|
269
|
+
'unicorn/no-length-as-slice-end': 2,
|
|
270
|
+
'unicorn/no-magic-array-flat-depth': 2,
|
|
271
|
+
'unicorn/prefer-modern-math-apis': 2,
|
|
272
|
+
'unicorn/prefer-node-protocol': 2,
|
|
273
|
+
'unicorn/require-module-specifiers': 2,
|
|
274
|
+
'unicorn/require-module-attributes': 2,
|
|
275
|
+
'unicorn/prefer-classlist-toggle': 2,
|
|
276
|
+
'unicorn/no-unnecessary-array-splice-count': 2,
|
|
277
|
+
'unicorn/no-useless-error-capture-stack-trace': 2,
|
|
278
|
+
'unicorn/prefer-top-level-await': 2,
|
|
279
|
+
'unicorn/prefer-class-fields': 2,
|
|
280
|
+
'unicorn/consistent-assert': 2,
|
|
281
|
+
'unicorn/consistent-date-clone': 2,
|
|
282
|
+
'unicorn/consistent-empty-array-spread': 2,
|
|
283
|
+
'unicorn/consistent-existence-index-check': 2,
|
|
284
|
+
'unicorn/escape-case': 2,
|
|
285
|
+
'unicorn/prefer-keyboard-event-key': 2,
|
|
286
|
+
'unicorn/prefer-default-parameters': 2,
|
|
287
|
+
'unicorn/no-console-spaces': 2,
|
|
288
|
+
'unicorn/no-hex-escape': 2,
|
|
289
|
+
'unicorn/no-instanceof-builtins': 2,
|
|
290
|
+
'unicorn/no-lonely-if': 2,
|
|
291
|
+
'unicorn/no-negation-in-equality-check': 2,
|
|
292
|
+
'unicorn/no-new-buffer': 2,
|
|
293
|
+
'unicorn/prefer-string-replace-all': 2,
|
|
294
|
+
'unicorn/prefer-math-min-max': 2,
|
|
295
|
+
'unicorn/prefer-code-point': 2,
|
|
296
|
+
'unicorn/prefer-global-this': 2,
|
|
297
|
+
'unicorn/error-message': 2,
|
|
298
|
+
'unicorn/no-zero-fractions': 2,
|
|
299
|
+
'unicorn/prefer-array-some': 2,
|
|
300
|
+
'unicorn/prefer-math-trunc': 2,
|
|
301
|
+
'unicorn/prefer-includes': 2,
|
|
302
|
+
'unicorn/prefer-response-static-json': 2,
|
|
303
|
+
'import/no-named-default': 2,
|
|
304
|
+
'import/consistent-type-specifier-style': 2,
|
|
305
|
+
'unicorn/no-new-array': 0, // it's actually ok
|
|
306
|
+
'unicorn/catch-error-name': [
|
|
307
|
+
2,
|
|
308
|
+
{
|
|
309
|
+
name: 'err',
|
|
310
|
+
ignore: [String.raw`^err\d*$`, '^_'],
|
|
311
|
+
},
|
|
312
|
+
],
|
|
313
|
+
'unicorn/no-accessor-recursion': 2,
|
|
314
|
+
'unicorn/prefer-string-slice': 2,
|
|
315
|
+
'unicorn/no-unnecessary-array-flat-depth': 2,
|
|
316
|
+
'unicorn/no-unnecessary-slice-end': 2,
|
|
317
|
+
'unicorn/no-unreadable-array-destructuring': 2,
|
|
318
|
+
'unicorn/no-unreadable-iife': 2,
|
|
319
|
+
'unicorn/no-useless-collection-argument': 2,
|
|
320
|
+
'unicorn/no-useless-promise-resolve-reject': 2,
|
|
321
|
+
'unicorn/numeric-separators-style': [
|
|
322
|
+
2,
|
|
323
|
+
{
|
|
324
|
+
binary: {
|
|
325
|
+
groupLength: 4,
|
|
326
|
+
minimumDigits: 0,
|
|
327
|
+
},
|
|
328
|
+
hexadecimal: {
|
|
329
|
+
groupLength: 2,
|
|
330
|
+
minimumDigits: 0,
|
|
331
|
+
},
|
|
332
|
+
number: {
|
|
333
|
+
groupLength: 3,
|
|
334
|
+
minimumDigits: 5,
|
|
335
|
+
},
|
|
336
|
+
octal: {
|
|
337
|
+
groupLength: 4,
|
|
338
|
+
minimumDigits: 0,
|
|
339
|
+
},
|
|
340
|
+
onlyIfContainsSeparator: true,
|
|
341
|
+
},
|
|
342
|
+
],
|
|
343
|
+
'unicorn/prefer-add-event-listener': 2,
|
|
344
|
+
'unicorn/prefer-array-index-of': 2,
|
|
345
|
+
'unicorn/prefer-bigint-literals': 2,
|
|
346
|
+
'unicorn/prefer-blob-reading-methods': 2,
|
|
347
|
+
'unicorn/prefer-dom-node-append': 2,
|
|
348
|
+
'unicorn/prefer-dom-node-dataset': 2,
|
|
349
|
+
'unicorn/prefer-dom-node-remove': 2,
|
|
350
|
+
'unicorn/prefer-dom-node-text-content': 2,
|
|
351
|
+
'unicorn/prefer-event-target': 2,
|
|
352
|
+
'unicorn/prefer-logical-operator-over-ternary': 2,
|
|
353
|
+
'unicorn/prefer-modern-dom-apis': 2,
|
|
354
|
+
'unicorn/prefer-native-coercion-functions': 2,
|
|
355
|
+
'unicorn/prefer-object-from-entries': 2,
|
|
356
|
+
'unicorn/prefer-optional-catch-binding': 2,
|
|
357
|
+
'unicorn/prefer-reflect-apply': 2,
|
|
358
|
+
'unicorn/prefer-string-raw': 2,
|
|
359
|
+
'unicorn/prefer-string-trim-start-end': 2,
|
|
360
|
+
'unicorn/prefer-type-error': 2,
|
|
361
|
+
'unicorn/require-array-join-separator': 2,
|
|
362
|
+
'unicorn/switch-case-braces': [2, 'always'],
|
|
363
|
+
'unicorn/text-encoding-identifier-case': [
|
|
364
|
+
2,
|
|
365
|
+
{
|
|
366
|
+
withDash: false,
|
|
367
|
+
},
|
|
368
|
+
],
|
|
369
|
+
'vitest/no-duplicate-hooks': 2,
|
|
370
|
+
'vitest/consistent-vitest-vi': 2,
|
|
371
|
+
'vitest/no-focused-tests': 2,
|
|
372
|
+
'vitest/no-identical-title': 2,
|
|
373
|
+
'vitest/no-test-return-statement': 2,
|
|
374
|
+
'vitest/prefer-hooks-in-order': 2,
|
|
375
|
+
'vitest/prefer-hooks-on-top': 2,
|
|
376
|
+
'vitest/prefer-mock-promise-shorthand': 2,
|
|
377
|
+
'vitest/prefer-to-have-length': 2,
|
|
378
|
+
'vitest/require-to-throw-message': 2,
|
|
379
|
+
'vitest/valid-describe-callback': 0,
|
|
380
|
+
'vitest/valid-expect': 0,
|
|
381
|
+
'vitest/no-import-node-test': 2,
|
|
382
|
+
'vitest/no-mocks-import': 2,
|
|
383
|
+
'vitest/prefer-spy-on': 2,
|
|
384
|
+
'vitest/prefer-to-be': 2,
|
|
385
|
+
'vitest/prefer-to-contain': 2,
|
|
386
|
+
'vitest/consistent-test-filename': 2,
|
|
387
|
+
'vitest/warn-todo': 0,
|
|
388
|
+
'jest/consistent-test-it': [
|
|
389
|
+
2,
|
|
390
|
+
{
|
|
391
|
+
fn: 'test',
|
|
392
|
+
withinDescribe: 'test',
|
|
393
|
+
},
|
|
394
|
+
],
|
|
395
|
+
'jest/max-nested-describe': [0, { max: 4 }], // not good
|
|
396
|
+
'jest/no-alias-methods': 2,
|
|
397
|
+
'jest/prefer-mock-return-shorthand': 2,
|
|
398
|
+
'vue/no-multiple-slot-args': 2,
|
|
399
|
+
'vue/no-deprecated-destroyed-lifecycle': 2,
|
|
400
|
+
'vue/define-emits-declaration': [2, 'type-based'],
|
|
401
|
+
'vue/define-props-declaration': 2,
|
|
402
|
+
},
|
|
403
|
+
settings: {
|
|
404
|
+
jsdoc: {
|
|
405
|
+
tagNamePreference: {
|
|
406
|
+
experimental: 'experimental',
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
},
|
|
410
|
+
}
|
package/dist/check.util.js
CHANGED
|
@@ -196,7 +196,7 @@ function runESLint(extensions = eslintExtensions.split(','), fix = true) {
|
|
|
196
196
|
*/
|
|
197
197
|
export function runOxlint(fix = true) {
|
|
198
198
|
if (!hasOxlintConfig()) {
|
|
199
|
-
console.log('.
|
|
199
|
+
console.log('oxlint.config.ts is not found, skipping to run oxlint');
|
|
200
200
|
return false;
|
|
201
201
|
}
|
|
202
202
|
const oxlintPath = findPackageBinPath('oxlint', 'oxlint');
|
|
@@ -212,7 +212,7 @@ export function runOxlint(fix = true) {
|
|
|
212
212
|
*/
|
|
213
213
|
export function runOxfmt(fix = true) {
|
|
214
214
|
if (!hasOxfmtConfig()) {
|
|
215
|
-
console.log('.
|
|
215
|
+
console.log('oxfmt.config.ts is not found, skipping to run oxfmt');
|
|
216
216
|
return false;
|
|
217
217
|
}
|
|
218
218
|
const oxlintPath = findPackageBinPath('oxfmt', 'oxfmt');
|
|
@@ -224,14 +224,14 @@ export function runOxfmt(fix = true) {
|
|
|
224
224
|
return true;
|
|
225
225
|
}
|
|
226
226
|
export function requireOxlintConfig() {
|
|
227
|
-
_assert(hasOxlintConfig(), '.
|
|
227
|
+
_assert(hasOxlintConfig(), 'oxlint.config.ts config is not found');
|
|
228
228
|
}
|
|
229
229
|
export function hasOxlintConfig() {
|
|
230
|
-
const oxlintConfigPath =
|
|
230
|
+
const oxlintConfigPath = `oxlint.config.ts`;
|
|
231
231
|
return existsSync(oxlintConfigPath);
|
|
232
232
|
}
|
|
233
233
|
export function hasOxfmtConfig() {
|
|
234
|
-
return ['.
|
|
234
|
+
return ['oxfmt.config.ts'].some(existsSync);
|
|
235
235
|
}
|
|
236
236
|
const stylelintPaths = [
|
|
237
237
|
// Everything inside these folders
|
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.41.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"prompts": "^2",
|
|
7
7
|
"@naturalcycles/js-lib": "^15",
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
"exports": {
|
|
54
54
|
"./cfg/": "./cfg/",
|
|
55
55
|
"./cfg/eslint.config.js": "./cfg/eslint.config.js",
|
|
56
|
-
"./cfg/
|
|
56
|
+
"./cfg/oxfmt.config.js": "./cfg/oxfmt.config.js",
|
|
57
|
+
"./cfg/oxlint.config.js": "./cfg/oxlint.config.js",
|
|
57
58
|
"./cfg/stylelint.config.js": "./cfg/stylelint.config.js",
|
|
58
59
|
"./cfg/tsconfig.src.json": "./cfg/tsconfig.src.json",
|
|
59
60
|
"./cfg/tsconfig.scripts.json": "./cfg/tsconfig.scripts.json",
|
package/cfg/oxlint.config.json
DELETED
|
@@ -1,375 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "../node_modules/oxlint/configuration_schema.json",
|
|
3
|
-
"plugins": [
|
|
4
|
-
"oxc",
|
|
5
|
-
"eslint",
|
|
6
|
-
"typescript",
|
|
7
|
-
"unicorn",
|
|
8
|
-
"import",
|
|
9
|
-
"jsdoc",
|
|
10
|
-
"node",
|
|
11
|
-
"promise",
|
|
12
|
-
// enable as needed
|
|
13
|
-
// "react",
|
|
14
|
-
// "react-perf",
|
|
15
|
-
// "jsx-a11y",
|
|
16
|
-
// "vue",
|
|
17
|
-
"vitest"
|
|
18
|
-
],
|
|
19
|
-
"jsPlugins": ["./oxlint-plugin-stylistic.mjs"],
|
|
20
|
-
"options": {
|
|
21
|
-
"reportUnusedDisableDirectives": "deny",
|
|
22
|
-
"maxWarnings": 0,
|
|
23
|
-
"denyWarnings": true,
|
|
24
|
-
"typeAware": true,
|
|
25
|
-
"typeCheck": true
|
|
26
|
-
},
|
|
27
|
-
"rules": {
|
|
28
|
-
"no-unused-vars": [
|
|
29
|
-
"error",
|
|
30
|
-
{
|
|
31
|
-
"fix": {
|
|
32
|
-
"imports": "fix",
|
|
33
|
-
"variables": "suggestion"
|
|
34
|
-
},
|
|
35
|
-
"varsIgnorePattern": "^(_$|__)",
|
|
36
|
-
"argsIgnorePattern": "^_",
|
|
37
|
-
"destructuredArrayIgnorePattern": "^_"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"@stylistic/padding-line-between-statements": [
|
|
41
|
-
2,
|
|
42
|
-
{ "blankLine": "always", "prev": "function", "next": "*" },
|
|
43
|
-
{ "blankLine": "always", "prev": "*", "next": "function" },
|
|
44
|
-
{ "blankLine": "always", "prev": "class", "next": "*" },
|
|
45
|
-
{ "blankLine": "always", "prev": "*", "next": "class" }
|
|
46
|
-
],
|
|
47
|
-
"@stylistic/lines-between-class-members": [2, "always", { "exceptAfterSingleLine": true }],
|
|
48
|
-
"complexity": [2, { "max": 40 }],
|
|
49
|
-
"no-this-alias": 0,
|
|
50
|
-
"no-shadow": 0, // too many shadows in the codebase already
|
|
51
|
-
"no-async-promise-executor": 0,
|
|
52
|
-
"no-standalone-expect": 0,
|
|
53
|
-
"no-conditional-expect": 0,
|
|
54
|
-
"expect-expect": 0,
|
|
55
|
-
"no-disabled-tests": 0,
|
|
56
|
-
"valid-expect": 0,
|
|
57
|
-
"valid-title": 0,
|
|
58
|
-
"valid-describe-callback": 0,
|
|
59
|
-
"jsdoc/require-yields": 0,
|
|
60
|
-
"no-new-wrappers": 2,
|
|
61
|
-
"no-useless-call": 2,
|
|
62
|
-
"no-accumulating-spread": 2,
|
|
63
|
-
"no-map-spread": 0, // todo: consider, check the effect
|
|
64
|
-
"prefer-array-find": 2,
|
|
65
|
-
"prefer-array-flat-map": 2,
|
|
66
|
-
"prefer-set-has": 2,
|
|
67
|
-
"prefer-const": [2, { "destructuring": "all" }],
|
|
68
|
-
"no-array-constructor": 2,
|
|
69
|
-
"no-useless-return": 0, // not useful
|
|
70
|
-
"no-bitwise": 2,
|
|
71
|
-
"no-empty": [2, { "allowEmptyCatch": true }],
|
|
72
|
-
"no-regex-spaces": 2,
|
|
73
|
-
"no-sequences": 2,
|
|
74
|
-
"no-implicit-coercion": [2, { "allow": ["!!"] }],
|
|
75
|
-
"no-restricted-globals": [2, "event", "__dirname", "__filename"],
|
|
76
|
-
"no-unused-expressions": 2,
|
|
77
|
-
"no-var": 2,
|
|
78
|
-
"unicode-bom": 2,
|
|
79
|
-
"no-extend-native": 2,
|
|
80
|
-
"no-extra-bind": 2,
|
|
81
|
-
"no-new": 2,
|
|
82
|
-
"no-unexpected-multiline": 2,
|
|
83
|
-
"no-unneeded-ternary": 2,
|
|
84
|
-
"no-useless-concat": 2,
|
|
85
|
-
"no-useless-constructor": 2,
|
|
86
|
-
"preserve-caught-error": 2,
|
|
87
|
-
"eqeqeq": [2, "smart"],
|
|
88
|
-
"curly": [2, "multi-line"],
|
|
89
|
-
"guard-for-in": 2,
|
|
90
|
-
"max-params": [2, { "max": 5 }],
|
|
91
|
-
"prefer-spread": 2,
|
|
92
|
-
"import/extensions": [0, "always", { "ignorePackages": true }], // disabled as it's buggy; would be nice to enable eventually
|
|
93
|
-
"import/no-amd": 2,
|
|
94
|
-
"import/no-commonjs": 2,
|
|
95
|
-
"import/no-cycle": 2,
|
|
96
|
-
"import/no-default-export": 2,
|
|
97
|
-
"import/no-webpack-loader-syntax": 2,
|
|
98
|
-
"import/no-duplicates": [2, { "prefer-inline": false }],
|
|
99
|
-
// "import/export": 2, // todo: adopt when it graduates
|
|
100
|
-
"import/no-empty-named-blocks": 2,
|
|
101
|
-
"import/no-absolute-path": 2,
|
|
102
|
-
"import/no-named-as-default": 2,
|
|
103
|
-
"import/no-named-as-default-member": 0,
|
|
104
|
-
"import/no-self-import": 2,
|
|
105
|
-
"import/no-unassigned-import": 0,
|
|
106
|
-
"oxc/bad-bitwise-operator": 2,
|
|
107
|
-
"oxc/no-const-enum": 2,
|
|
108
|
-
"oxc/approx-constant": 2,
|
|
109
|
-
"oxc/misrefactored-assign-op": 2,
|
|
110
|
-
"promise/spec-only": 2,
|
|
111
|
-
"typescript/class-literal-property-style": 2,
|
|
112
|
-
"typescript/explicit-function-return-type": [2, { "allowExpressions": true }],
|
|
113
|
-
// "typescript/explicit-module-boundary-types": [2, {"allowArgumentsExplicitlyTypedAsAny": true}]
|
|
114
|
-
"typescript/no-empty-object-type": [2, { "allowInterfaces": "always" }],
|
|
115
|
-
"typescript/no-import-type-side-effects": 2,
|
|
116
|
-
// "typescript/no-namespace": 2,
|
|
117
|
-
"typescript/no-non-null-asserted-nullish-coalescing": 2,
|
|
118
|
-
"typescript/no-require-imports": 2,
|
|
119
|
-
"typescript/no-var-requires": 2,
|
|
120
|
-
"typescript/no-unnecessary-template-expression": 2,
|
|
121
|
-
"typescript/no-unnecessary-type-arguments": 0, // not good in the end
|
|
122
|
-
"typescript/no-unnecessary-type-constraint": 2,
|
|
123
|
-
// "typescript/no-unsafe-argument": 2, // looks good, but too strict for now
|
|
124
|
-
// "typescript/no-dynamic-delete": 2,
|
|
125
|
-
"typescript/prefer-optional-chain": 0, // buggy
|
|
126
|
-
"typescript/non-nullable-type-assertion-style": 2,
|
|
127
|
-
"typescript/prefer-literal-enum-member": 2,
|
|
128
|
-
"typescript/prefer-reduce-type-parameter": 2,
|
|
129
|
-
"typescript/promise-function-async": [
|
|
130
|
-
2,
|
|
131
|
-
{
|
|
132
|
-
"checkArrowFunctions": false,
|
|
133
|
-
"checkFunctionDeclarations": true,
|
|
134
|
-
"checkFunctionExpressions": true,
|
|
135
|
-
"checkMethodDeclarations": true
|
|
136
|
-
}
|
|
137
|
-
],
|
|
138
|
-
"typescript/prefer-for-of": 2,
|
|
139
|
-
"typescript/no-confusing-non-null-assertion": 2,
|
|
140
|
-
"typescript/ban-ts-comment": [
|
|
141
|
-
2,
|
|
142
|
-
{
|
|
143
|
-
"minimumDescriptionLength": 2,
|
|
144
|
-
"ts-expect-error": "allow-with-description",
|
|
145
|
-
"ts-nocheck": "allow-with-description",
|
|
146
|
-
"ts-check": false,
|
|
147
|
-
"ts-ignore": true
|
|
148
|
-
}
|
|
149
|
-
],
|
|
150
|
-
"typescript/ban-tslint-comment": 2,
|
|
151
|
-
"typescript/prefer-function-type": 2,
|
|
152
|
-
"typescript/prefer-namespace-keyword": 2,
|
|
153
|
-
"typescript/consistent-generic-constructors": [2, "constructor"],
|
|
154
|
-
"typescript/consistent-type-definitions": [2, "interface"],
|
|
155
|
-
"typescript/consistent-type-imports": 2,
|
|
156
|
-
"typescript/consistent-type-assertions": [
|
|
157
|
-
2,
|
|
158
|
-
{
|
|
159
|
-
"assertionStyle": "as"
|
|
160
|
-
}
|
|
161
|
-
],
|
|
162
|
-
"typescript/no-inferrable-types": [
|
|
163
|
-
2,
|
|
164
|
-
{
|
|
165
|
-
"ignoreParameters": true
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
"typescript/adjacent-overload-signatures": 2,
|
|
169
|
-
"typescript/array-type": 2,
|
|
170
|
-
"typescript/prefer-enum-initializers": 2,
|
|
171
|
-
"typescript/prefer-promise-reject-errors": 2,
|
|
172
|
-
"typescript/prefer-ts-expect-error": 2,
|
|
173
|
-
"typescript/require-await": 0, // not good yet
|
|
174
|
-
"typescript/restrict-plus-operands": 2,
|
|
175
|
-
"typescript/return-await": [2, "error-handling-correctness-only"],
|
|
176
|
-
"typescript/only-throw-error": 2,
|
|
177
|
-
"typescript/no-unsafe-function-type": 2,
|
|
178
|
-
"typescript/no-misused-promises": [
|
|
179
|
-
2,
|
|
180
|
-
{
|
|
181
|
-
"checksVoidReturn": {
|
|
182
|
-
// "variables": false,
|
|
183
|
-
// "inheritedMethods": false,
|
|
184
|
-
// "returns": false
|
|
185
|
-
"arguments": false,
|
|
186
|
-
"properties": false
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
],
|
|
190
|
-
"typescript/no-mixed-enums": 2,
|
|
191
|
-
"typescript/no-unnecessary-type-assertion": 2,
|
|
192
|
-
"typescript/no-unnecessary-boolean-literal-compare": 2,
|
|
193
|
-
"typescript/no-base-to-string": 2,
|
|
194
|
-
// disabled, as it fails on legit unit test patterns
|
|
195
|
-
"typescript/unbound-method": [
|
|
196
|
-
0,
|
|
197
|
-
{
|
|
198
|
-
"ignoreStatic": true
|
|
199
|
-
}
|
|
200
|
-
],
|
|
201
|
-
"typescript/switch-exhaustiveness-check": 0, // not good
|
|
202
|
-
"typescript/require-array-sort-compare": 0, // not good
|
|
203
|
-
"typescript/restrict-template-expressions": 0, // not good
|
|
204
|
-
"typescript/no-redundant-type-constituents": 0, // `'a' | string` is still useful for DX
|
|
205
|
-
"typescript/no-restricted-types": [
|
|
206
|
-
2,
|
|
207
|
-
{
|
|
208
|
-
"types": {
|
|
209
|
-
"Boolean": {
|
|
210
|
-
"message": "Avoid using the `Boolean` type. Did you mean `boolean`?"
|
|
211
|
-
},
|
|
212
|
-
"Number": {
|
|
213
|
-
"message": "Avoid using the `Number` type. Did you mean `number`?"
|
|
214
|
-
},
|
|
215
|
-
"object": {
|
|
216
|
-
"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."
|
|
217
|
-
},
|
|
218
|
-
"Object": {
|
|
219
|
-
"message": "Avoid using the `Object` type. Did you mean `object`? Consider using Record<string, any> instead"
|
|
220
|
-
},
|
|
221
|
-
"String": {
|
|
222
|
-
"message": "Avoid using the `String` type. Did you mean `string`?"
|
|
223
|
-
},
|
|
224
|
-
"Symbol": {
|
|
225
|
-
"message": "Avoid using the `Symbol` type. Did you mean `symbol`?"
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
],
|
|
230
|
-
"unicorn/no-anonymous-default-export": 2,
|
|
231
|
-
"unicorn/no-immediate-mutation": 2,
|
|
232
|
-
"unicorn/no-array-reduce": 2,
|
|
233
|
-
"unicorn/no-document-cookie": 2,
|
|
234
|
-
"unicorn/no-length-as-slice-end": 2,
|
|
235
|
-
"unicorn/no-magic-array-flat-depth": 2,
|
|
236
|
-
"unicorn/prefer-modern-math-apis": 2,
|
|
237
|
-
"unicorn/prefer-node-protocol": 2,
|
|
238
|
-
"unicorn/require-module-specifiers": 2,
|
|
239
|
-
"unicorn/require-module-attributes": 2,
|
|
240
|
-
"unicorn/prefer-classlist-toggle": 2,
|
|
241
|
-
"unicorn/no-unnecessary-array-splice-count": 2,
|
|
242
|
-
"unicorn/no-useless-error-capture-stack-trace": 2,
|
|
243
|
-
"unicorn/prefer-top-level-await": 2,
|
|
244
|
-
"unicorn/prefer-class-fields": 2,
|
|
245
|
-
"unicorn/consistent-assert": 2,
|
|
246
|
-
"unicorn/consistent-date-clone": 2,
|
|
247
|
-
"unicorn/consistent-empty-array-spread": 2,
|
|
248
|
-
"unicorn/consistent-existence-index-check": 2,
|
|
249
|
-
"unicorn/escape-case": 2,
|
|
250
|
-
"unicorn/prefer-keyboard-event-key": 2,
|
|
251
|
-
"unicorn/prefer-default-parameters": 2,
|
|
252
|
-
"unicorn/no-console-spaces": 2,
|
|
253
|
-
"unicorn/no-hex-escape": 2,
|
|
254
|
-
"unicorn/no-instanceof-builtins": 2,
|
|
255
|
-
"unicorn/no-lonely-if": 2,
|
|
256
|
-
"unicorn/no-negation-in-equality-check": 2,
|
|
257
|
-
"unicorn/no-new-buffer": 2,
|
|
258
|
-
"unicorn/prefer-string-replace-all": 2,
|
|
259
|
-
"unicorn/prefer-math-min-max": 2,
|
|
260
|
-
"unicorn/prefer-code-point": 2,
|
|
261
|
-
"unicorn/prefer-global-this": 2,
|
|
262
|
-
"unicorn/error-message": 2,
|
|
263
|
-
"unicorn/no-zero-fractions": 2,
|
|
264
|
-
"unicorn/prefer-array-some": 2,
|
|
265
|
-
"unicorn/prefer-math-trunc": 2,
|
|
266
|
-
"unicorn/prefer-includes": 2,
|
|
267
|
-
"unicorn/prefer-response-static-json": 2,
|
|
268
|
-
"import/no-named-default": 2,
|
|
269
|
-
"import/consistent-type-specifier-style": 2,
|
|
270
|
-
"unicorn/no-new-array": 0, // it's actually ok
|
|
271
|
-
"unicorn/catch-error-name": [
|
|
272
|
-
2,
|
|
273
|
-
{
|
|
274
|
-
"name": "err",
|
|
275
|
-
"ignore": ["^err\\d*$", "^_"]
|
|
276
|
-
}
|
|
277
|
-
],
|
|
278
|
-
"unicorn/no-accessor-recursion": 2,
|
|
279
|
-
"unicorn/prefer-string-slice": 2,
|
|
280
|
-
"unicorn/no-unnecessary-array-flat-depth": 2,
|
|
281
|
-
"unicorn/no-unnecessary-slice-end": 2,
|
|
282
|
-
"unicorn/no-unreadable-array-destructuring": 2,
|
|
283
|
-
"unicorn/no-unreadable-iife": 2,
|
|
284
|
-
"unicorn/no-useless-collection-argument": 2,
|
|
285
|
-
"unicorn/no-useless-promise-resolve-reject": 2,
|
|
286
|
-
"unicorn/numeric-separators-style": [
|
|
287
|
-
2,
|
|
288
|
-
{
|
|
289
|
-
"binary": {
|
|
290
|
-
"groupLength": 4,
|
|
291
|
-
"minimumDigits": 0
|
|
292
|
-
},
|
|
293
|
-
"hexadecimal": {
|
|
294
|
-
"groupLength": 2,
|
|
295
|
-
"minimumDigits": 0
|
|
296
|
-
},
|
|
297
|
-
"number": {
|
|
298
|
-
"groupLength": 3,
|
|
299
|
-
"minimumDigits": 5
|
|
300
|
-
},
|
|
301
|
-
"octal": {
|
|
302
|
-
"groupLength": 4,
|
|
303
|
-
"minimumDigits": 0
|
|
304
|
-
},
|
|
305
|
-
"onlyIfContainsSeparator": true
|
|
306
|
-
}
|
|
307
|
-
],
|
|
308
|
-
"unicorn/prefer-add-event-listener": 2,
|
|
309
|
-
"unicorn/prefer-array-index-of": 2,
|
|
310
|
-
"unicorn/prefer-bigint-literals": 2,
|
|
311
|
-
"unicorn/prefer-blob-reading-methods": 2,
|
|
312
|
-
"unicorn/prefer-dom-node-append": 2,
|
|
313
|
-
"unicorn/prefer-dom-node-dataset": 2,
|
|
314
|
-
"unicorn/prefer-dom-node-remove": 2,
|
|
315
|
-
"unicorn/prefer-dom-node-text-content": 2,
|
|
316
|
-
"unicorn/prefer-event-target": 2,
|
|
317
|
-
"unicorn/prefer-logical-operator-over-ternary": 2,
|
|
318
|
-
"unicorn/prefer-modern-dom-apis": 2,
|
|
319
|
-
"unicorn/prefer-native-coercion-functions": 2,
|
|
320
|
-
"unicorn/prefer-object-from-entries": 2,
|
|
321
|
-
"unicorn/prefer-optional-catch-binding": 2,
|
|
322
|
-
"unicorn/prefer-reflect-apply": 2,
|
|
323
|
-
"unicorn/prefer-string-raw": 2,
|
|
324
|
-
"unicorn/prefer-string-trim-start-end": 2,
|
|
325
|
-
"unicorn/prefer-type-error": 2,
|
|
326
|
-
"unicorn/require-array-join-separator": 2,
|
|
327
|
-
"unicorn/switch-case-braces": [2, "always"],
|
|
328
|
-
"unicorn/text-encoding-identifier-case": [
|
|
329
|
-
2,
|
|
330
|
-
{
|
|
331
|
-
"withDash": false
|
|
332
|
-
}
|
|
333
|
-
],
|
|
334
|
-
"vitest/no-duplicate-hooks": 2,
|
|
335
|
-
"vitest/consistent-vitest-vi": 2,
|
|
336
|
-
"vitest/no-focused-tests": 2,
|
|
337
|
-
"vitest/no-identical-title": 2,
|
|
338
|
-
"vitest/no-test-return-statement": 2,
|
|
339
|
-
"vitest/prefer-hooks-in-order": 2,
|
|
340
|
-
"vitest/prefer-hooks-on-top": 2,
|
|
341
|
-
"vitest/prefer-mock-promise-shorthand": 2,
|
|
342
|
-
"vitest/prefer-to-have-length": 2,
|
|
343
|
-
"vitest/require-to-throw-message": 2,
|
|
344
|
-
"vitest/valid-describe-callback": 0,
|
|
345
|
-
"vitest/valid-expect": 0,
|
|
346
|
-
"vitest/no-import-node-test": 2,
|
|
347
|
-
"vitest/no-mocks-import": 2,
|
|
348
|
-
"vitest/prefer-spy-on": 2,
|
|
349
|
-
"vitest/prefer-to-be": 2,
|
|
350
|
-
"vitest/prefer-to-contain": 2,
|
|
351
|
-
"vitest/consistent-test-filename": 2,
|
|
352
|
-
"vitest/warn-todo": 0,
|
|
353
|
-
"jest/consistent-test-it": [
|
|
354
|
-
2,
|
|
355
|
-
{
|
|
356
|
-
"fn": "test",
|
|
357
|
-
"withinDescribe": "test"
|
|
358
|
-
}
|
|
359
|
-
],
|
|
360
|
-
"jest/max-nested-describe": [0, { "max": 4 }], // not good
|
|
361
|
-
"jest/no-alias-methods": 2,
|
|
362
|
-
"jest/prefer-mock-return-shorthand": 2,
|
|
363
|
-
"vue/no-multiple-slot-args": 2,
|
|
364
|
-
"vue/no-deprecated-destroyed-lifecycle": 2,
|
|
365
|
-
"vue/define-emits-declaration": [2, "type-based"],
|
|
366
|
-
"vue/define-props-declaration": 2
|
|
367
|
-
},
|
|
368
|
-
"settings": {
|
|
369
|
-
"jsdoc": {
|
|
370
|
-
"tagNamePreference": {
|
|
371
|
-
"experimental": "experimental"
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
}
|