@cabloy/lint 5.0.21 → 5.0.23

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/oxc/lintVue.js ADDED
@@ -0,0 +1,1429 @@
1
+ export const _configDefault = {
2
+ plugins: ['import', 'unicorn'],
3
+ jsPlugins: [
4
+ 'eslint-plugin-antfu',
5
+ 'eslint-plugin-unused-imports',
6
+ 'eslint-plugin-eslint-comments',
7
+ 'eslint-plugin-command',
8
+ 'eslint-plugin-perfectionist',
9
+ '@e18e/eslint-plugin',
10
+ '@stylistic/eslint-plugin',
11
+ 'eslint-plugin-regexp',
12
+ ],
13
+ categories: {
14
+ correctness: 'off',
15
+ },
16
+ env: {
17
+ builtin: true,
18
+ es2026: true,
19
+ browser: true,
20
+ node: true,
21
+ },
22
+ rules: {
23
+ 'accessor-pairs': [
24
+ 'error',
25
+ {
26
+ enforceForClassMembers: true,
27
+ setWithoutGet: true,
28
+ },
29
+ ],
30
+ 'antfu/no-top-level-await': 'error',
31
+ 'array-callback-return': 'error',
32
+ 'block-scoped-var': 'error',
33
+ 'constructor-super': 'error',
34
+ 'default-case-last': 'error',
35
+ 'eqeqeq': ['error', 'smart'],
36
+ 'new-cap': [
37
+ 'error',
38
+ {
39
+ capIsNew: false,
40
+ newIsCap: true,
41
+ properties: true,
42
+ },
43
+ ],
44
+ 'no-alert': 'error',
45
+ 'no-array-constructor': 'error',
46
+ 'no-async-promise-executor': 'error',
47
+ 'no-caller': 'error',
48
+ 'no-case-declarations': 'error',
49
+ 'no-class-assign': 'error',
50
+ 'no-compare-neg-zero': 'error',
51
+ 'no-cond-assign': ['error', 'always'],
52
+ 'no-console': [
53
+ 'error',
54
+ {
55
+ allow: ['warn', 'error'],
56
+ },
57
+ ],
58
+ 'no-const-assign': 'error',
59
+ 'no-control-regex': 'error',
60
+ 'no-debugger': 'error',
61
+ 'no-delete-var': 'error',
62
+ 'no-dupe-class-members': 'error',
63
+ 'no-dupe-keys': 'error',
64
+ 'no-duplicate-case': 'error',
65
+ 'no-empty': [
66
+ 'error',
67
+ {
68
+ allowEmptyCatch: true,
69
+ },
70
+ ],
71
+ 'no-empty-pattern': 'error',
72
+ 'no-eval': 'error',
73
+ 'no-ex-assign': 'error',
74
+ 'no-extend-native': 'error',
75
+ 'no-extra-bind': 'error',
76
+ 'no-extra-boolean-cast': 'error',
77
+ 'no-fallthrough': 'error',
78
+ 'no-func-assign': 'error',
79
+ 'no-global-assign': 'error',
80
+ 'no-import-assign': 'error',
81
+ 'no-irregular-whitespace': 'error',
82
+ 'no-iterator': 'error',
83
+ 'no-labels': [
84
+ 'error',
85
+ {
86
+ allowLoop: false,
87
+ allowSwitch: false,
88
+ },
89
+ ],
90
+ 'no-lone-blocks': 'error',
91
+ 'no-loss-of-precision': 'error',
92
+ 'no-misleading-character-class': 'error',
93
+ 'no-multi-str': 'error',
94
+ 'no-new': 'error',
95
+ 'no-new-func': 'error',
96
+ 'no-new-native-nonconstructor': 'error',
97
+ 'no-new-wrappers': 'error',
98
+ 'no-obj-calls': 'error',
99
+ 'no-proto': 'error',
100
+ 'no-prototype-builtins': 'error',
101
+ 'no-redeclare': [
102
+ 'error',
103
+ {
104
+ builtinGlobals: false,
105
+ },
106
+ ],
107
+ 'no-regex-spaces': 'error',
108
+ 'no-restricted-globals': [
109
+ 'error',
110
+ {
111
+ message: 'Use `globalThis` instead.',
112
+ name: 'global',
113
+ },
114
+ {
115
+ message: 'Use `globalThis` instead.',
116
+ name: 'self',
117
+ },
118
+ ],
119
+ 'no-self-assign': [
120
+ 'error',
121
+ {
122
+ props: true,
123
+ },
124
+ ],
125
+ 'no-self-compare': 'error',
126
+ 'no-sequences': 'error',
127
+ 'no-shadow-restricted-names': 'error',
128
+ 'no-sparse-arrays': 'error',
129
+ 'no-template-curly-in-string': 'error',
130
+ 'no-this-before-super': 'error',
131
+ 'no-throw-literal': 'error',
132
+ 'no-unexpected-multiline': 'error',
133
+ 'no-unmodified-loop-condition': 'error',
134
+ 'no-unneeded-ternary': [
135
+ 'error',
136
+ {
137
+ defaultAssignment: false,
138
+ },
139
+ ],
140
+ 'no-unsafe-finally': 'error',
141
+ 'no-unsafe-negation': 'error',
142
+ 'no-unused-expressions': [
143
+ 'error',
144
+ {
145
+ allowShortCircuit: true,
146
+ allowTaggedTemplates: true,
147
+ allowTernary: true,
148
+ },
149
+ ],
150
+ 'no-unused-vars': [
151
+ 'error',
152
+ {
153
+ args: 'none',
154
+ caughtErrors: 'none',
155
+ ignoreRestSiblings: true,
156
+ vars: 'all',
157
+ },
158
+ ],
159
+ 'no-use-before-define': [
160
+ 'error',
161
+ {
162
+ classes: false,
163
+ functions: false,
164
+ variables: true,
165
+ },
166
+ ],
167
+ 'no-useless-call': 'error',
168
+ 'no-useless-catch': 'error',
169
+ 'no-useless-computed-key': 'error',
170
+ 'no-useless-constructor': 'error',
171
+ 'no-useless-rename': 'error',
172
+ 'no-useless-return': 'error',
173
+ 'no-var': 'error',
174
+ 'no-with': 'error',
175
+ 'prefer-const': [
176
+ 'error',
177
+ {
178
+ destructuring: 'all',
179
+ ignoreReadBeforeAssign: true,
180
+ },
181
+ ],
182
+ 'prefer-exponentiation-operator': 'error',
183
+ 'prefer-promise-reject-errors': 'error',
184
+ 'prefer-rest-params': 'error',
185
+ 'prefer-spread': 'error',
186
+ 'prefer-template': 'error',
187
+ 'symbol-description': 'error',
188
+ 'unicode-bom': ['error', 'never'],
189
+ 'unused-imports/no-unused-imports': 'error',
190
+ 'unused-imports/no-unused-vars': [
191
+ 'error',
192
+ {
193
+ args: 'after-used',
194
+ argsIgnorePattern: '^_',
195
+ ignoreRestSiblings: true,
196
+ vars: 'all',
197
+ varsIgnorePattern: '^_',
198
+ },
199
+ ],
200
+ 'use-isnan': [
201
+ 'error',
202
+ {
203
+ enforceForIndexOf: true,
204
+ enforceForSwitchCase: true,
205
+ },
206
+ ],
207
+ 'valid-typeof': [
208
+ 'error',
209
+ {
210
+ requireStringLiterals: true,
211
+ },
212
+ ],
213
+ 'vars-on-top': 'error',
214
+ 'yoda': ['error', 'never'],
215
+ 'eslint-comments/no-aggregating-enable': 'error',
216
+ 'eslint-comments/no-duplicate-disable': 'error',
217
+ 'eslint-comments/no-unlimited-disable': 'error',
218
+ 'eslint-comments/no-unused-enable': 'error',
219
+ 'command/command': 'error',
220
+ 'perfectionist/sort-exports': [
221
+ 'error',
222
+ {
223
+ order: 'asc',
224
+ type: 'natural',
225
+ },
226
+ ],
227
+ 'perfectionist/sort-named-exports': [
228
+ 'error',
229
+ {
230
+ order: 'asc',
231
+ type: 'natural',
232
+ },
233
+ ],
234
+ 'perfectionist/sort-named-imports': [
235
+ 'error',
236
+ {
237
+ order: 'asc',
238
+ type: 'natural',
239
+ },
240
+ ],
241
+ 'antfu/import-dedupe': 'error',
242
+ 'antfu/no-import-dist': 'error',
243
+ 'antfu/no-import-node-modules-by-path': 'error',
244
+ 'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
245
+ 'import/first': 'error',
246
+ 'import/no-duplicates': 'error',
247
+ 'import/no-mutable-exports': 'error',
248
+ 'import/no-named-default': 'error',
249
+ 'e18e/prefer-array-at': 'error',
250
+ 'e18e/prefer-array-fill': 'error',
251
+ 'e18e/prefer-includes': 'error',
252
+ 'e18e/prefer-array-to-reversed': 'error',
253
+ 'e18e/prefer-array-to-sorted': 'error',
254
+ 'e18e/prefer-array-to-spliced': 'error',
255
+ 'e18e/prefer-nullish-coalescing': 'error',
256
+ 'e18e/prefer-object-has-own': 'error',
257
+ 'e18e/prefer-spread-syntax': 'off',
258
+ 'e18e/prefer-url-canparse': 'error',
259
+ 'e18e/prefer-array-from-map': 'error',
260
+ 'e18e/prefer-timer-args': 'error',
261
+ 'e18e/prefer-date-now': 'error',
262
+ 'e18e/prefer-regex-test': 'error',
263
+ 'e18e/prefer-array-some': 'error',
264
+ 'e18e/prefer-static-regex': 'error',
265
+ 'unicorn/consistent-empty-array-spread': 'error',
266
+ 'unicorn/error-message': 'error',
267
+ 'unicorn/escape-case': 'error',
268
+ 'unicorn/new-for-builtins': 'error',
269
+ 'unicorn/no-instanceof-builtins': 'error',
270
+ 'unicorn/no-new-array': 'error',
271
+ 'unicorn/no-new-buffer': 'error',
272
+ 'unicorn/number-literal-case': 'off',
273
+ 'unicorn/prefer-dom-node-text-content': 'error',
274
+ 'unicorn/prefer-includes': 'error',
275
+ 'unicorn/prefer-node-protocol': 'error',
276
+ 'unicorn/prefer-number-properties': 'error',
277
+ 'unicorn/prefer-string-starts-ends-with': 'error',
278
+ 'unicorn/prefer-type-error': 'error',
279
+ 'unicorn/throw-new-error': 'error',
280
+ '@stylistic/array-bracket-spacing': ['error', 'never'],
281
+ '@stylistic/arrow-parens': ['error', 'as-needed'],
282
+ '@stylistic/arrow-spacing': [
283
+ 'error',
284
+ {
285
+ after: true,
286
+ before: true,
287
+ },
288
+ ],
289
+ '@stylistic/block-spacing': ['error', 'always'],
290
+ '@stylistic/brace-style': 'off',
291
+ '@stylistic/comma-dangle': ['error', 'always-multiline'],
292
+ '@stylistic/comma-spacing': [
293
+ 'error',
294
+ {
295
+ after: true,
296
+ before: false,
297
+ },
298
+ ],
299
+ '@stylistic/comma-style': ['error', 'last'],
300
+ '@stylistic/computed-property-spacing': [
301
+ 'error',
302
+ 'never',
303
+ {
304
+ enforceForClassMembers: true,
305
+ },
306
+ ],
307
+ '@stylistic/dot-location': ['error', 'property'],
308
+ '@stylistic/eol-last': 'error',
309
+ '@stylistic/generator-star-spacing': [
310
+ 'error',
311
+ {
312
+ after: true,
313
+ before: false,
314
+ },
315
+ ],
316
+ '@stylistic/indent': 'off',
317
+ '@stylistic/indent-binary-ops': 'off',
318
+ '@stylistic/key-spacing': [
319
+ 'error',
320
+ {
321
+ afterColon: true,
322
+ beforeColon: false,
323
+ },
324
+ ],
325
+ '@stylistic/keyword-spacing': 'off',
326
+ '@stylistic/lines-between-class-members': [
327
+ 'error',
328
+ 'always',
329
+ {
330
+ exceptAfterSingleLine: true,
331
+ },
332
+ ],
333
+ '@stylistic/max-statements-per-line': [
334
+ 'error',
335
+ {
336
+ max: 1,
337
+ },
338
+ ],
339
+ '@stylistic/member-delimiter-style': [
340
+ 'error',
341
+ {
342
+ multiline: {
343
+ delimiter: 'semi',
344
+ requireLast: true,
345
+ },
346
+ multilineDetection: 'brackets',
347
+ overrides: {
348
+ interface: {
349
+ multiline: {
350
+ delimiter: 'semi',
351
+ requireLast: true,
352
+ },
353
+ },
354
+ },
355
+ singleline: {
356
+ delimiter: 'semi',
357
+ },
358
+ },
359
+ ],
360
+ '@stylistic/multiline-ternary': 'off',
361
+ '@stylistic/new-parens': 'error',
362
+ '@stylistic/no-extra-parens': ['error', 'functions'],
363
+ '@stylistic/no-floating-decimal': 'error',
364
+ '@stylistic/no-mixed-operators': [
365
+ 'error',
366
+ {
367
+ allowSamePrecedence: true,
368
+ groups: [
369
+ ['==', '!=', '===', '!==', '>', '>=', '<', '<='],
370
+ ['&&', '||'],
371
+ ['in', 'instanceof'],
372
+ ],
373
+ },
374
+ ],
375
+ '@stylistic/no-mixed-spaces-and-tabs': 'error',
376
+ '@stylistic/no-multi-spaces': 'error',
377
+ '@stylistic/no-multiple-empty-lines': [
378
+ 'error',
379
+ {
380
+ max: 1,
381
+ maxBOF: 0,
382
+ maxEOF: 0,
383
+ },
384
+ ],
385
+ '@stylistic/no-tabs': 'error',
386
+ '@stylistic/no-trailing-spaces': 'error',
387
+ '@stylistic/no-whitespace-before-property': 'error',
388
+ '@stylistic/object-curly-spacing': ['error', 'always'],
389
+ '@stylistic/operator-linebreak': [
390
+ 'error',
391
+ 'after',
392
+ {
393
+ overrides: {
394
+ '?': 'before',
395
+ ':': 'before',
396
+ '|': 'before',
397
+ },
398
+ },
399
+ ],
400
+ '@stylistic/padded-blocks': [
401
+ 'error',
402
+ {
403
+ blocks: 'never',
404
+ classes: 'never',
405
+ switches: 'never',
406
+ },
407
+ ],
408
+ '@stylistic/quote-props': ['error', 'consistent-as-needed'],
409
+ '@stylistic/quotes': [
410
+ 'error',
411
+ 'single',
412
+ {
413
+ avoidEscape: true,
414
+ },
415
+ ],
416
+ '@stylistic/rest-spread-spacing': ['error', 'never'],
417
+ '@stylistic/semi': ['error', 'always'],
418
+ '@stylistic/semi-spacing': [
419
+ 'error',
420
+ {
421
+ after: true,
422
+ before: false,
423
+ },
424
+ ],
425
+ '@stylistic/space-before-blocks': ['error', 'always'],
426
+ '@stylistic/space-before-function-paren': [
427
+ 'error',
428
+ {
429
+ anonymous: 'always',
430
+ asyncArrow: 'always',
431
+ named: 'never',
432
+ },
433
+ ],
434
+ '@stylistic/space-in-parens': ['error', 'never'],
435
+ '@stylistic/space-infix-ops': 'error',
436
+ '@stylistic/space-unary-ops': [
437
+ 'error',
438
+ {
439
+ nonwords: false,
440
+ words: true,
441
+ },
442
+ ],
443
+ '@stylistic/spaced-comment': [
444
+ 'error',
445
+ 'always',
446
+ {
447
+ block: {
448
+ balanced: true,
449
+ exceptions: ['*'],
450
+ markers: ['!'],
451
+ },
452
+ line: {
453
+ exceptions: ['/', '#'],
454
+ markers: ['/'],
455
+ },
456
+ },
457
+ ],
458
+ '@stylistic/template-curly-spacing': 'error',
459
+ '@stylistic/template-tag-spacing': ['error', 'never'],
460
+ '@stylistic/type-annotation-spacing': ['error', {}],
461
+ '@stylistic/type-generic-spacing': 'off',
462
+ '@stylistic/type-named-tuple-spacing': 'error',
463
+ '@stylistic/wrap-iife': [
464
+ 'error',
465
+ 'any',
466
+ {
467
+ functionPrototypeMethods: true,
468
+ },
469
+ ],
470
+ '@stylistic/yield-star-spacing': [
471
+ 'error',
472
+ {
473
+ after: true,
474
+ before: false,
475
+ },
476
+ ],
477
+ '@stylistic/jsx-closing-bracket-location': 'error',
478
+ '@stylistic/jsx-closing-tag-location': 'off',
479
+ '@stylistic/jsx-curly-brace-presence': [
480
+ 'error',
481
+ {
482
+ propElementValues: 'always',
483
+ },
484
+ ],
485
+ '@stylistic/jsx-curly-newline': 'error',
486
+ '@stylistic/jsx-curly-spacing': ['error', 'never'],
487
+ '@stylistic/jsx-equals-spacing': 'error',
488
+ '@stylistic/jsx-first-prop-new-line': 'error',
489
+ '@stylistic/jsx-function-call-newline': ['error', 'multiline'],
490
+ '@stylistic/jsx-indent-props': ['error', 2],
491
+ '@stylistic/jsx-max-props-per-line': [
492
+ 'error',
493
+ {
494
+ maximum: 1,
495
+ when: 'multiline',
496
+ },
497
+ ],
498
+ '@stylistic/jsx-one-expression-per-line': [
499
+ 'error',
500
+ {
501
+ allow: 'single-child',
502
+ },
503
+ ],
504
+ '@stylistic/jsx-quotes': 'error',
505
+ '@stylistic/jsx-tag-spacing': [
506
+ 'error',
507
+ {
508
+ afterOpening: 'never',
509
+ beforeClosing: 'never',
510
+ beforeSelfClosing: 'always',
511
+ closingSlash: 'never',
512
+ },
513
+ ],
514
+ '@stylistic/jsx-wrap-multilines': [
515
+ 'error',
516
+ {
517
+ arrow: 'parens-new-line',
518
+ assignment: 'parens-new-line',
519
+ condition: 'parens-new-line',
520
+ declaration: 'parens-new-line',
521
+ logical: 'parens-new-line',
522
+ prop: 'ignore',
523
+ propertyValue: 'parens-new-line',
524
+ return: 'parens-new-line',
525
+ },
526
+ ],
527
+ 'antfu/consistent-list-newline': 'off',
528
+ 'antfu/consistent-chaining': 'error',
529
+ 'antfu/curly': 'error',
530
+ 'antfu/if-newline': 'off',
531
+ 'antfu/top-level-function': 'error',
532
+ 'regexp/confusing-quantifier': 'warn',
533
+ 'regexp/control-character-escape': 'error',
534
+ 'regexp/match-any': 'error',
535
+ 'regexp/negation': 'error',
536
+ 'regexp/no-contradiction-with-assertion': 'error',
537
+ 'regexp/no-dupe-characters-character-class': 'error',
538
+ 'regexp/no-dupe-disjunctions': 'error',
539
+ 'regexp/no-empty-alternative': 'warn',
540
+ 'regexp/no-empty-capturing-group': 'error',
541
+ 'regexp/no-empty-character-class': 'error',
542
+ 'regexp/no-empty-group': 'error',
543
+ 'regexp/no-empty-lookarounds-assertion': 'error',
544
+ 'regexp/no-empty-string-literal': 'error',
545
+ 'regexp/no-escape-backspace': 'error',
546
+ 'regexp/no-extra-lookaround-assertions': 'error',
547
+ 'regexp/no-invalid-regexp': 'error',
548
+ 'regexp/no-invisible-character': 'error',
549
+ 'regexp/no-lazy-ends': 'warn',
550
+ 'regexp/no-legacy-features': 'error',
551
+ 'regexp/no-misleading-capturing-group': 'error',
552
+ 'regexp/no-misleading-unicode-character': 'error',
553
+ 'regexp/no-missing-g-flag': 'error',
554
+ 'regexp/no-non-standard-flag': 'error',
555
+ 'regexp/no-obscure-range': 'error',
556
+ 'regexp/no-optional-assertion': 'error',
557
+ 'regexp/no-potentially-useless-backreference': 'warn',
558
+ 'regexp/no-super-linear-backtracking': 'error',
559
+ 'regexp/no-trivially-nested-assertion': 'error',
560
+ 'regexp/no-trivially-nested-quantifier': 'error',
561
+ 'regexp/no-unused-capturing-group': 'error',
562
+ 'regexp/no-useless-assertions': 'error',
563
+ 'regexp/no-useless-backreference': 'error',
564
+ 'regexp/no-useless-character-class': 'error',
565
+ 'regexp/no-useless-dollar-replacements': 'error',
566
+ 'regexp/no-useless-escape': 'error',
567
+ 'regexp/no-useless-flag': 'warn',
568
+ 'regexp/no-useless-lazy': 'error',
569
+ 'regexp/no-useless-non-capturing-group': 'error',
570
+ 'regexp/no-useless-quantifier': 'error',
571
+ 'regexp/no-useless-range': 'error',
572
+ 'regexp/no-useless-set-operand': 'error',
573
+ 'regexp/no-useless-string-literal': 'error',
574
+ 'regexp/no-useless-two-nums-quantifier': 'error',
575
+ 'regexp/no-zero-quantifier': 'error',
576
+ 'regexp/optimal-lookaround-quantifier': 'warn',
577
+ 'regexp/optimal-quantifier-concatenation': 'error',
578
+ 'regexp/prefer-character-class': 'error',
579
+ 'regexp/prefer-d': 'error',
580
+ 'regexp/prefer-plus-quantifier': 'error',
581
+ 'regexp/prefer-predefined-assertion': 'error',
582
+ 'regexp/prefer-question-quantifier': 'error',
583
+ 'regexp/prefer-range': 'error',
584
+ 'regexp/prefer-set-operation': 'error',
585
+ 'regexp/prefer-star-quantifier': 'error',
586
+ 'regexp/prefer-unicode-codepoint-escapes': 'error',
587
+ 'regexp/prefer-w': 'error',
588
+ 'regexp/simplify-set-operations': 'error',
589
+ 'regexp/sort-flags': 'error',
590
+ 'regexp/strict': 'error',
591
+ 'regexp/use-ignore-case': 'error',
592
+ },
593
+ overrides: [
594
+ {
595
+ files: ['**/*.?([cm])[jt]s?(x)'],
596
+ rules: {
597
+ 'node/handle-callback-err': ['error', '^(err|error)$'],
598
+ 'node/no-exports-assign': 'error',
599
+ 'node/no-new-require': 'error',
600
+ 'node/no-path-concat': 'error',
601
+ 'jsdoc/check-access': 'warn',
602
+ 'jsdoc/check-property-names': 'warn',
603
+ 'jsdoc/empty-tags': 'warn',
604
+ 'jsdoc/implements-on-classes': 'warn',
605
+ 'jsdoc/no-defaults': 'warn',
606
+ 'jsdoc/require-param-name': 'warn',
607
+ 'jsdoc/require-property': 'warn',
608
+ 'jsdoc/require-property-description': 'warn',
609
+ 'jsdoc/require-property-name': 'warn',
610
+ 'jsdoc/require-returns-description': 'warn',
611
+ },
612
+ plugins: ['node', 'jsdoc'],
613
+ },
614
+ {
615
+ files: ['**/*.?([cm])ts', '**/*.?([cm])tsx', '**/*.vue'],
616
+ rules: {
617
+ 'constructor-super': 'off',
618
+ 'no-class-assign': 'off',
619
+ 'no-const-assign': 'off',
620
+ 'no-dupe-keys': 'off',
621
+ 'no-func-assign': 'off',
622
+ 'no-import-assign': 'off',
623
+ 'no-new-native-nonconstructor': 'off',
624
+ 'no-obj-calls': 'off',
625
+ 'no-redeclare': [
626
+ 'error',
627
+ {
628
+ builtinGlobals: false,
629
+ },
630
+ ],
631
+ 'no-setter-return': 'off',
632
+ 'no-this-before-super': 'off',
633
+ 'no-unsafe-negation': 'off',
634
+ 'no-with': 'off',
635
+ 'prefer-const': [
636
+ 'error',
637
+ {
638
+ destructuring: 'all',
639
+ ignoreReadBeforeAssign: true,
640
+ },
641
+ ],
642
+ '@typescript-eslint/ban-ts-comment': [
643
+ 'error',
644
+ {
645
+ 'ts-expect-error': 'allow-with-description',
646
+ },
647
+ ],
648
+ '@typescript-eslint/no-duplicate-enum-values': 'error',
649
+ '@typescript-eslint/no-dynamic-delete': 'off',
650
+ '@typescript-eslint/no-empty-object-type': [
651
+ 'error',
652
+ {
653
+ allowInterfaces: 'always',
654
+ },
655
+ ],
656
+ '@typescript-eslint/no-explicit-any': 'off',
657
+ '@typescript-eslint/no-extra-non-null-assertion': 'error',
658
+ '@typescript-eslint/no-extraneous-class': 'off',
659
+ '@typescript-eslint/no-invalid-void-type': 'off',
660
+ '@typescript-eslint/no-misused-new': 'error',
661
+ '@typescript-eslint/no-namespace': 'error',
662
+ '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
663
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
664
+ '@typescript-eslint/no-non-null-assertion': 'off',
665
+ '@typescript-eslint/no-require-imports': 'error',
666
+ '@typescript-eslint/no-this-alias': 'error',
667
+ '@typescript-eslint/no-unnecessary-type-constraint': 'error',
668
+ '@typescript-eslint/no-unsafe-declaration-merging': 'error',
669
+ '@typescript-eslint/no-unsafe-function-type': 'error',
670
+ 'no-unused-expressions': [
671
+ 'error',
672
+ {
673
+ allowShortCircuit: true,
674
+ allowTaggedTemplates: true,
675
+ allowTernary: true,
676
+ },
677
+ ],
678
+ 'no-unused-vars': 'off',
679
+ 'no-useless-constructor': 'off',
680
+ '@typescript-eslint/no-wrapper-object-types': 'error',
681
+ '@typescript-eslint/prefer-as-const': 'error',
682
+ '@typescript-eslint/prefer-literal-enum-member': 'error',
683
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
684
+ '@typescript-eslint/triple-slash-reference': 'off',
685
+ '@typescript-eslint/unified-signatures': 'off',
686
+ 'no-use-before-define': [
687
+ 'error',
688
+ {
689
+ classes: false,
690
+ functions: false,
691
+ variables: true,
692
+ },
693
+ ],
694
+ '@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
695
+ '@typescript-eslint/consistent-type-imports': [
696
+ 'error',
697
+ {
698
+ disallowTypeAnnotations: false,
699
+ fixStyle: 'separate-type-imports',
700
+ prefer: 'type-imports',
701
+ },
702
+ ],
703
+ '@typescript-eslint/no-import-type-side-effects': 'error',
704
+ },
705
+ plugins: ['typescript'],
706
+ },
707
+ {
708
+ files: [
709
+ '**/__tests__/**/*.?([cm])[jt]s?(x)',
710
+ '**/*.spec.?([cm])[jt]s?(x)',
711
+ '**/*.test.?([cm])[jt]s?(x)',
712
+ '**/*.bench.?([cm])[jt]s?(x)',
713
+ '**/*.benchmark.?([cm])[jt]s?(x)',
714
+ ],
715
+ rules: {
716
+ 'vitest/consistent-test-it': [
717
+ 'error',
718
+ {
719
+ fn: 'it',
720
+ withinDescribe: 'it',
721
+ },
722
+ ],
723
+ 'vitest/no-identical-title': 'error',
724
+ 'vitest/no-import-node-test': 'error',
725
+ 'vitest/prefer-hooks-in-order': 'error',
726
+ 'vitest/prefer-lowercase-title': 'error',
727
+ 'antfu/no-top-level-await': 'off',
728
+ 'e18e/prefer-static-regex': 'off',
729
+ 'no-unused-expressions': 'off',
730
+ '@typescript-eslint/explicit-function-return-type': 'off',
731
+ },
732
+ jsPlugins: ['eslint-plugin-antfu', '@e18e/eslint-plugin'],
733
+ plugins: ['vitest', 'typescript'],
734
+ },
735
+ {
736
+ files: ['**/*.vue'],
737
+ rules: {
738
+ 'vue/no-arrow-functions-in-watch': 'error',
739
+ 'vue/no-deprecated-destroyed-lifecycle': 'error',
740
+ 'vue/no-export-in-script-setup': 'error',
741
+ 'vue/no-lifecycle-after-await': 'error',
742
+ 'vue/prefer-import-from-vue': 'error',
743
+ 'vue/valid-define-emits': 'error',
744
+ 'vue/valid-define-props': 'error',
745
+ 'vue/no-multiple-slot-args': 'warn',
746
+ 'antfu/no-top-level-await': 'off',
747
+ '@typescript-eslint/explicit-function-return-type': 'off',
748
+ },
749
+ jsPlugins: ['eslint-plugin-antfu'],
750
+ plugins: ['vue', 'typescript'],
751
+ },
752
+ {
753
+ files: ['**/*.json', '**/*.json5', '**/*.jsonc'],
754
+ rules: {
755
+ 'jsonc/no-bigint-literals': 'error',
756
+ 'jsonc/no-binary-expression': 'error',
757
+ 'jsonc/no-binary-numeric-literals': 'error',
758
+ 'jsonc/no-dupe-keys': 'error',
759
+ 'jsonc/no-escape-sequence-in-identifier': 'error',
760
+ 'jsonc/no-floating-decimal': 'error',
761
+ 'jsonc/no-hexadecimal-numeric-literals': 'error',
762
+ 'jsonc/no-infinity': 'error',
763
+ 'jsonc/no-multi-str': 'error',
764
+ 'jsonc/no-nan': 'error',
765
+ 'jsonc/no-number-props': 'error',
766
+ 'jsonc/no-numeric-separators': 'error',
767
+ 'jsonc/no-octal': 'error',
768
+ 'jsonc/no-octal-escape': 'error',
769
+ 'jsonc/no-octal-numeric-literals': 'error',
770
+ 'jsonc/no-parenthesized': 'error',
771
+ 'jsonc/no-plus-sign': 'error',
772
+ 'jsonc/no-regexp-literals': 'error',
773
+ 'jsonc/no-sparse-arrays': 'error',
774
+ 'jsonc/no-template-literals': 'error',
775
+ 'jsonc/no-undefined-value': 'error',
776
+ 'jsonc/no-unicode-codepoint-escapes': 'error',
777
+ 'jsonc/no-useless-escape': 'error',
778
+ 'jsonc/space-unary-ops': 'error',
779
+ 'jsonc/valid-json-number': 'error',
780
+ 'jsonc/vue-custom-block/no-parsing-error': 'error',
781
+ 'jsonc/array-bracket-spacing': ['error', 'never'],
782
+ 'jsonc/comma-dangle': ['error', 'never'],
783
+ 'jsonc/comma-style': ['error', 'last'],
784
+ 'jsonc/indent': ['error', 2],
785
+ 'jsonc/key-spacing': [
786
+ 'error',
787
+ {
788
+ afterColon: true,
789
+ beforeColon: false,
790
+ },
791
+ ],
792
+ 'jsonc/object-curly-newline': [
793
+ 'error',
794
+ {
795
+ consistent: true,
796
+ multiline: true,
797
+ },
798
+ ],
799
+ 'jsonc/object-curly-spacing': ['error', 'always'],
800
+ 'jsonc/object-property-newline': [
801
+ 'error',
802
+ {
803
+ allowAllPropertiesOnSameLine: true,
804
+ },
805
+ ],
806
+ 'jsonc/quote-props': 'error',
807
+ 'jsonc/quotes': 'error',
808
+ },
809
+ jsPlugins: ['eslint-plugin-jsonc'],
810
+ },
811
+ {
812
+ files: ['**/package.json'],
813
+ rules: {
814
+ 'jsonc/sort-array-values': [
815
+ 'error',
816
+ {
817
+ order: {
818
+ type: 'asc',
819
+ },
820
+ pathPattern: '^files$',
821
+ },
822
+ ],
823
+ 'jsonc/sort-keys': [
824
+ 'error',
825
+ {
826
+ order: [
827
+ 'publisher',
828
+ 'name',
829
+ 'displayName',
830
+ 'type',
831
+ 'version',
832
+ 'private',
833
+ 'packageManager',
834
+ 'description',
835
+ 'author',
836
+ 'contributors',
837
+ 'license',
838
+ 'funding',
839
+ 'homepage',
840
+ 'repository',
841
+ 'bugs',
842
+ 'keywords',
843
+ 'categories',
844
+ 'sideEffects',
845
+ 'imports',
846
+ 'exports',
847
+ 'main',
848
+ 'module',
849
+ 'unpkg',
850
+ 'jsdelivr',
851
+ 'types',
852
+ 'typesVersions',
853
+ 'bin',
854
+ 'icon',
855
+ 'files',
856
+ 'engines',
857
+ 'activationEvents',
858
+ 'contributes',
859
+ 'scripts',
860
+ 'peerDependencies',
861
+ 'peerDependenciesMeta',
862
+ 'dependencies',
863
+ 'optionalDependencies',
864
+ 'devDependencies',
865
+ 'pnpm',
866
+ 'overrides',
867
+ 'resolutions',
868
+ 'husky',
869
+ 'simple-git-hooks',
870
+ 'lint-staged',
871
+ 'eslintConfig',
872
+ ],
873
+ pathPattern: '^$',
874
+ },
875
+ {
876
+ order: {
877
+ type: 'asc',
878
+ },
879
+ pathPattern: '^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$',
880
+ },
881
+ {
882
+ order: {
883
+ type: 'asc',
884
+ },
885
+ pathPattern: '^(?:resolutions|overrides|pnpm.overrides)$',
886
+ },
887
+ {
888
+ order: {
889
+ type: 'asc',
890
+ },
891
+ pathPattern: '^workspaces\\.catalog$',
892
+ },
893
+ {
894
+ order: {
895
+ type: 'asc',
896
+ },
897
+ pathPattern: '^workspaces\\.catalogs\\.[^.]+$',
898
+ },
899
+ {
900
+ order: ['types', 'import', 'require', 'default'],
901
+ pathPattern: '^exports.*$',
902
+ },
903
+ {
904
+ order: [
905
+ 'pre-commit',
906
+ 'prepare-commit-msg',
907
+ 'commit-msg',
908
+ 'post-commit',
909
+ 'pre-rebase',
910
+ 'post-rewrite',
911
+ 'post-checkout',
912
+ 'post-merge',
913
+ 'pre-push',
914
+ 'pre-auto-gc',
915
+ ],
916
+ pathPattern: '^(?:gitHooks|husky|simple-git-hooks)$',
917
+ },
918
+ ],
919
+ },
920
+ jsPlugins: ['eslint-plugin-jsonc'],
921
+ },
922
+ {
923
+ files: ['**/[jt]sconfig.json', '**/[jt]sconfig.*.json'],
924
+ rules: {
925
+ 'jsonc/sort-keys': [
926
+ 'error',
927
+ {
928
+ order: ['extends', 'compilerOptions', 'references', 'files', 'include', 'exclude'],
929
+ pathPattern: '^$',
930
+ },
931
+ {
932
+ order: [
933
+ 'incremental',
934
+ 'composite',
935
+ 'tsBuildInfoFile',
936
+ 'disableSourceOfProjectReferenceRedirect',
937
+ 'disableSolutionSearching',
938
+ 'disableReferencedProjectLoad',
939
+ 'target',
940
+ 'jsx',
941
+ 'jsxFactory',
942
+ 'jsxFragmentFactory',
943
+ 'jsxImportSource',
944
+ 'lib',
945
+ 'moduleDetection',
946
+ 'noLib',
947
+ 'reactNamespace',
948
+ 'useDefineForClassFields',
949
+ 'emitDecoratorMetadata',
950
+ 'experimentalDecorators',
951
+ 'libReplacement',
952
+ 'baseUrl',
953
+ 'rootDir',
954
+ 'rootDirs',
955
+ 'customConditions',
956
+ 'module',
957
+ 'moduleResolution',
958
+ 'moduleSuffixes',
959
+ 'noResolve',
960
+ 'paths',
961
+ 'resolveJsonModule',
962
+ 'resolvePackageJsonExports',
963
+ 'resolvePackageJsonImports',
964
+ 'typeRoots',
965
+ 'types',
966
+ 'allowArbitraryExtensions',
967
+ 'allowImportingTsExtensions',
968
+ 'allowUmdGlobalAccess',
969
+ 'allowJs',
970
+ 'checkJs',
971
+ 'maxNodeModuleJsDepth',
972
+ 'strict',
973
+ 'strictBindCallApply',
974
+ 'strictFunctionTypes',
975
+ 'strictNullChecks',
976
+ 'strictPropertyInitialization',
977
+ 'allowUnreachableCode',
978
+ 'allowUnusedLabels',
979
+ 'alwaysStrict',
980
+ 'exactOptionalPropertyTypes',
981
+ 'noFallthroughCasesInSwitch',
982
+ 'noImplicitAny',
983
+ 'noImplicitOverride',
984
+ 'noImplicitReturns',
985
+ 'noImplicitThis',
986
+ 'noPropertyAccessFromIndexSignature',
987
+ 'noUncheckedIndexedAccess',
988
+ 'noUnusedLocals',
989
+ 'noUnusedParameters',
990
+ 'useUnknownInCatchVariables',
991
+ 'declaration',
992
+ 'declarationDir',
993
+ 'declarationMap',
994
+ 'downlevelIteration',
995
+ 'emitBOM',
996
+ 'emitDeclarationOnly',
997
+ 'importHelpers',
998
+ 'importsNotUsedAsValues',
999
+ 'inlineSourceMap',
1000
+ 'inlineSources',
1001
+ 'mapRoot',
1002
+ 'newLine',
1003
+ 'noEmit',
1004
+ 'noEmitHelpers',
1005
+ 'noEmitOnError',
1006
+ 'outDir',
1007
+ 'outFile',
1008
+ 'preserveConstEnums',
1009
+ 'preserveValueImports',
1010
+ 'removeComments',
1011
+ 'sourceMap',
1012
+ 'sourceRoot',
1013
+ 'stripInternal',
1014
+ 'allowSyntheticDefaultImports',
1015
+ 'esModuleInterop',
1016
+ 'forceConsistentCasingInFileNames',
1017
+ 'isolatedDeclarations',
1018
+ 'isolatedModules',
1019
+ 'preserveSymlinks',
1020
+ 'verbatimModuleSyntax',
1021
+ 'erasableSyntaxOnly',
1022
+ 'skipDefaultLibCheck',
1023
+ 'skipLibCheck',
1024
+ ],
1025
+ pathPattern: '^compilerOptions$',
1026
+ },
1027
+ ],
1028
+ },
1029
+ jsPlugins: ['eslint-plugin-jsonc'],
1030
+ },
1031
+ {
1032
+ files: ['package.json', '**/package.json'],
1033
+ rules: {
1034
+ 'pnpm/json-prefer-workspace-settings': [
1035
+ 'error',
1036
+ {
1037
+ autofix: true,
1038
+ },
1039
+ ],
1040
+ 'pnpm/json-valid-catalog': [
1041
+ 'error',
1042
+ {
1043
+ autofix: true,
1044
+ },
1045
+ ],
1046
+ },
1047
+ jsPlugins: ['eslint-plugin-pnpm'],
1048
+ },
1049
+ {
1050
+ files: ['pnpm-workspace.yaml'],
1051
+ rules: {
1052
+ 'pnpm/yaml-enforce-settings': [
1053
+ 'error',
1054
+ {
1055
+ settings: {
1056
+ shellEmulator: true,
1057
+ trustPolicy: 'no-downgrade',
1058
+ },
1059
+ },
1060
+ ],
1061
+ 'pnpm/yaml-no-duplicate-catalog-item': 'error',
1062
+ 'pnpm/yaml-no-unused-catalog-item': 'error',
1063
+ 'yml/sort-keys': [
1064
+ 'error',
1065
+ {
1066
+ order: [
1067
+ 'cacheDir',
1068
+ 'catalogMode',
1069
+ 'cleanupUnusedCatalogs',
1070
+ 'dedupeDirectDeps',
1071
+ 'deployAllFiles',
1072
+ 'enablePrePostScripts',
1073
+ 'engineStrict',
1074
+ 'extendNodePath',
1075
+ 'hoist',
1076
+ 'hoistPattern',
1077
+ 'hoistWorkspacePackages',
1078
+ 'ignoreCompatibilityDb',
1079
+ 'ignoreDepScripts',
1080
+ 'ignoreScripts',
1081
+ 'ignoreWorkspaceRootCheck',
1082
+ 'managePackageManagerVersions',
1083
+ 'minimumReleaseAge',
1084
+ 'minimumReleaseAgeExclude',
1085
+ 'modulesDir',
1086
+ 'nodeLinker',
1087
+ 'nodeVersion',
1088
+ 'optimisticRepeatInstall',
1089
+ 'packageManagerStrict',
1090
+ 'packageManagerStrictVersion',
1091
+ 'preferSymlinkedExecutables',
1092
+ 'preferWorkspacePackages',
1093
+ 'publicHoistPattern',
1094
+ 'registrySupportsTimeField',
1095
+ 'requiredScripts',
1096
+ 'resolutionMode',
1097
+ 'savePrefix',
1098
+ 'scriptShell',
1099
+ 'shamefullyHoist',
1100
+ 'shellEmulator',
1101
+ 'stateDir',
1102
+ 'supportedArchitectures',
1103
+ 'symlink',
1104
+ 'tag',
1105
+ 'trustPolicy',
1106
+ 'trustPolicyExclude',
1107
+ 'updateNotifier',
1108
+ 'packages',
1109
+ 'overrides',
1110
+ 'patchedDependencies',
1111
+ 'catalog',
1112
+ 'catalogs',
1113
+ 'allowedDeprecatedVersions',
1114
+ 'allowNonAppliedPatches',
1115
+ 'configDependencies',
1116
+ 'ignoredBuiltDependencies',
1117
+ 'ignoredOptionalDependencies',
1118
+ 'neverBuiltDependencies',
1119
+ 'onlyBuiltDependencies',
1120
+ 'onlyBuiltDependenciesFile',
1121
+ 'packageExtensions',
1122
+ 'peerDependencyRules',
1123
+ ],
1124
+ pathPattern: '^$',
1125
+ },
1126
+ {
1127
+ order: {
1128
+ type: 'asc',
1129
+ },
1130
+ pathPattern: '.*',
1131
+ },
1132
+ ],
1133
+ },
1134
+ jsPlugins: ['eslint-plugin-pnpm', 'eslint-plugin-yml'],
1135
+ },
1136
+ {
1137
+ files: ['**/*.y?(a)ml'],
1138
+ rules: {
1139
+ '@stylistic/spaced-comment': 'off',
1140
+ 'yml/block-mapping': 'error',
1141
+ 'yml/block-sequence': 'error',
1142
+ 'yml/no-empty-key': 'error',
1143
+ 'yml/no-empty-sequence-entry': 'error',
1144
+ 'yml/no-irregular-whitespace': 'error',
1145
+ 'yml/plain-scalar': 'error',
1146
+ 'yml/vue-custom-block/no-parsing-error': 'error',
1147
+ 'yml/block-mapping-question-indicator-newline': 'error',
1148
+ 'yml/block-sequence-hyphen-indicator-newline': 'error',
1149
+ 'yml/flow-mapping-curly-newline': 'error',
1150
+ 'yml/flow-mapping-curly-spacing': 'error',
1151
+ 'yml/flow-sequence-bracket-newline': 'error',
1152
+ 'yml/flow-sequence-bracket-spacing': 'error',
1153
+ 'yml/indent': ['error', 2],
1154
+ 'yml/key-spacing': 'error',
1155
+ 'yml/no-tab-indent': 'error',
1156
+ 'yml/quotes': [
1157
+ 'error',
1158
+ {
1159
+ avoidEscape: true,
1160
+ prefer: 'single',
1161
+ },
1162
+ ],
1163
+ 'yml/spaced-comment': 'error',
1164
+ },
1165
+ jsPlugins: ['@stylistic/eslint-plugin', 'eslint-plugin-yml'],
1166
+ },
1167
+ {
1168
+ files: ['**/*.toml'],
1169
+ rules: {
1170
+ '@stylistic/spaced-comment': 'off',
1171
+ 'toml/comma-style': 'error',
1172
+ 'toml/keys-order': 'error',
1173
+ 'toml/no-space-dots': 'error',
1174
+ 'toml/no-unreadable-number-separator': 'error',
1175
+ 'toml/precision-of-fractional-seconds': 'error',
1176
+ 'toml/precision-of-integer': 'error',
1177
+ 'toml/tables-order': 'error',
1178
+ 'toml/vue-custom-block/no-parsing-error': 'error',
1179
+ 'toml/array-bracket-newline': 'error',
1180
+ 'toml/array-bracket-spacing': 'error',
1181
+ 'toml/array-element-newline': 'error',
1182
+ 'toml/indent': ['error', 2],
1183
+ 'toml/inline-table-curly-spacing': 'error',
1184
+ 'toml/key-spacing': 'error',
1185
+ 'toml/padding-line-between-pairs': 'error',
1186
+ 'toml/padding-line-between-tables': 'error',
1187
+ 'toml/quoted-keys': 'error',
1188
+ 'toml/spaced-comment': 'error',
1189
+ 'toml/table-bracket-spacing': 'error',
1190
+ },
1191
+ jsPlugins: ['@stylistic/eslint-plugin', 'eslint-plugin-toml'],
1192
+ },
1193
+ {
1194
+ files: ['**/*.md/**/*.?([cm])[jt]s?(x)', '**/*.md/**/*.vue'],
1195
+ rules: {
1196
+ 'antfu/no-top-level-await': 'off',
1197
+ 'e18e/prefer-static-regex': 'off',
1198
+ 'no-alert': 'off',
1199
+ 'no-console': 'off',
1200
+ 'no-labels': 'off',
1201
+ 'no-lone-blocks': 'off',
1202
+ 'no-unused-expressions': 'off',
1203
+ 'no-unused-labels': 'off',
1204
+ 'no-unused-vars': 'off',
1205
+ '@stylistic/comma-dangle': 'off',
1206
+ '@stylistic/eol-last': 'off',
1207
+ '@stylistic/padding-line-between-statements': 'off',
1208
+ '@typescript-eslint/consistent-type-imports': 'off',
1209
+ '@typescript-eslint/explicit-function-return-type': 'off',
1210
+ '@typescript-eslint/no-namespace': 'off',
1211
+ '@typescript-eslint/no-require-imports': 'off',
1212
+ 'unicode-bom': 'off',
1213
+ 'unused-imports/no-unused-imports': 'off',
1214
+ 'unused-imports/no-unused-vars': 'off',
1215
+ 'no-redeclare': 'off',
1216
+ 'no-use-before-define': 'off',
1217
+ },
1218
+ jsPlugins: ['eslint-plugin-antfu', '@e18e/eslint-plugin', '@stylistic/eslint-plugin', 'eslint-plugin-unused-imports'],
1219
+ plugins: ['typescript'],
1220
+ },
1221
+ {
1222
+ files: ['**/scripts/**/*.?([cm])[jt]s?(x)'],
1223
+ rules: {
1224
+ 'antfu/no-top-level-await': 'off',
1225
+ 'no-console': 'off',
1226
+ '@typescript-eslint/explicit-function-return-type': 'off',
1227
+ },
1228
+ jsPlugins: ['eslint-plugin-antfu'],
1229
+ plugins: ['typescript'],
1230
+ },
1231
+ {
1232
+ files: ['**/cli/**/*.?([cm])[jt]s?(x)', '**/cli.?([cm])[jt]s?(x)'],
1233
+ rules: {
1234
+ 'antfu/no-top-level-await': 'off',
1235
+ 'no-console': 'off',
1236
+ },
1237
+ jsPlugins: ['eslint-plugin-antfu'],
1238
+ },
1239
+ {
1240
+ files: ['**/bin/**/*', '**/bin.?([cm])[jt]s?(x)'],
1241
+ rules: {
1242
+ 'antfu/no-import-dist': 'off',
1243
+ 'antfu/no-import-node-modules-by-path': 'off',
1244
+ },
1245
+ jsPlugins: ['eslint-plugin-antfu'],
1246
+ },
1247
+ {
1248
+ files: ['**/*.d.?([cm])ts'],
1249
+ rules: {
1250
+ 'eslint-comments/no-unlimited-disable': 'off',
1251
+ 'unused-imports/no-unused-vars': 'off',
1252
+ },
1253
+ jsPlugins: ['eslint-plugin-eslint-comments', 'eslint-plugin-unused-imports'],
1254
+ },
1255
+ {
1256
+ files: ['**/*.js', '**/*.cjs'],
1257
+ rules: {
1258
+ '@typescript-eslint/no-require-imports': 'off',
1259
+ },
1260
+ plugins: ['typescript'],
1261
+ },
1262
+ {
1263
+ files: ['**/*.config.?([cm])[jt]s?(x)', '**/*.config.*.?([cm])[jt]s?(x)'],
1264
+ rules: {
1265
+ 'antfu/no-top-level-await': 'off',
1266
+ 'no-console': 'off',
1267
+ '@typescript-eslint/explicit-function-return-type': 'off',
1268
+ },
1269
+ jsPlugins: ['eslint-plugin-antfu'],
1270
+ plugins: ['typescript'],
1271
+ },
1272
+ {
1273
+ files: ['**/*.ts', '**/*.tsx'],
1274
+ rules: {
1275
+ 'e18e/prefer-object-has-own': 'off',
1276
+ 'e18e/prefer-static-regex': 'off',
1277
+ 'e18e/prefer-array-at': 'off',
1278
+ 'e18e/prefer-regex-test': 'off',
1279
+ 'regexp/no-unused-capturing-group': 'off',
1280
+ 'vitest/no-import-node-test': 'off',
1281
+ 'no-extend-native': [
1282
+ 'error',
1283
+ {
1284
+ exceptions: ['Set'],
1285
+ },
1286
+ ],
1287
+ 'no-new-func': 'off',
1288
+ 'regexp/no-super-linear-backtracking': 'off',
1289
+ 'no-template-curly-in-string': 'off',
1290
+ 'unicorn/error-message': 'off',
1291
+ 'antfu/if-newline': 'off',
1292
+ 'antfu/no-top-level-await': 'off',
1293
+ 'antfu/top-level-function': 'off',
1294
+ 'import/no-duplicates': 'off',
1295
+ 'eslint-comments/no-unlimited-disable': 'off',
1296
+ 'prefer-promise-reject-errors': 'off',
1297
+ 'no-console': [
1298
+ 'warn',
1299
+ {
1300
+ allow: ['warn', 'error'],
1301
+ },
1302
+ ],
1303
+ 'no-debugger': 'warn',
1304
+ 'prefer-const': [
1305
+ 'error',
1306
+ {
1307
+ destructuring: 'all',
1308
+ ignoreReadBeforeAssign: true,
1309
+ },
1310
+ ],
1311
+ 'no-empty': [
1312
+ 'error',
1313
+ {
1314
+ allowEmptyCatch: true,
1315
+ },
1316
+ ],
1317
+ 'no-empty-function': [
1318
+ 'error',
1319
+ {
1320
+ allow: [
1321
+ 'functions',
1322
+ 'arrowFunctions',
1323
+ 'generatorFunctions',
1324
+ 'methods',
1325
+ 'generatorMethods',
1326
+ 'getters',
1327
+ 'setters',
1328
+ 'constructors',
1329
+ 'asyncFunctions',
1330
+ 'asyncMethods',
1331
+ ],
1332
+ },
1333
+ ],
1334
+ 'no-constant-condition': [
1335
+ 'error',
1336
+ {
1337
+ checkLoops: false,
1338
+ },
1339
+ ],
1340
+ 'prefer-rest-params': 'off',
1341
+ 'method-signature-style': 'off',
1342
+ 'no-redeclare': 'off',
1343
+ 'consistent-type-imports': [
1344
+ 'error',
1345
+ {
1346
+ fixStyle: 'separate-type-imports',
1347
+ prefer: 'type-imports',
1348
+ },
1349
+ ],
1350
+ 'explicit-function-return-type': 'off',
1351
+ 'no-namespace': 'off',
1352
+ 'no-explicit-any': 'off',
1353
+ 'no-var-requires': 'off',
1354
+ 'unused-imports/no-unused-vars': [
1355
+ 'error',
1356
+ {
1357
+ args: 'all',
1358
+ argsIgnorePattern: '^_',
1359
+ caughtErrors: 'all',
1360
+ caughtErrorsIgnorePattern: '^_',
1361
+ destructuredArrayIgnorePattern: '^_',
1362
+ varsIgnorePattern: '^_',
1363
+ ignoreRestSiblings: true,
1364
+ },
1365
+ ],
1366
+ 'no-unused-vars': [
1367
+ 'error',
1368
+ {
1369
+ args: 'all',
1370
+ argsIgnorePattern: '^_',
1371
+ caughtErrors: 'all',
1372
+ caughtErrorsIgnorePattern: '^_',
1373
+ destructuredArrayIgnorePattern: '^_',
1374
+ varsIgnorePattern: '^_',
1375
+ ignoreRestSiblings: true,
1376
+ },
1377
+ ],
1378
+ 'no-this-alias': 'off',
1379
+ 'no-unsafe-declaration-merging': 'off',
1380
+ 'ban-ts-comment': [
1381
+ 'error',
1382
+ {
1383
+ 'ts-expect-error': 'allow-with-description',
1384
+ 'ts-ignore': 'allow-with-description',
1385
+ },
1386
+ ],
1387
+ 'no-empty-object-type': 'off',
1388
+ 'no-unsafe-function-type': 'off',
1389
+ 'no-use-before-define': [
1390
+ 'error',
1391
+ {
1392
+ functions: false,
1393
+ },
1394
+ ],
1395
+ 'max-len': [
1396
+ 'error',
1397
+ {
1398
+ code: 150,
1399
+ tabWidth: 2,
1400
+ ignoreComments: true,
1401
+ ignoreTrailingComments: true,
1402
+ ignoreUrls: true,
1403
+ ignoreStrings: true,
1404
+ ignoreTemplateLiterals: true,
1405
+ ignoreRegExpLiterals: true,
1406
+ },
1407
+ ],
1408
+ },
1409
+ jsPlugins: [
1410
+ '@e18e/eslint-plugin',
1411
+ 'eslint-plugin-regexp',
1412
+ 'eslint-plugin-antfu',
1413
+ 'eslint-plugin-eslint-comments',
1414
+ 'eslint-plugin-unused-imports',
1415
+ ],
1416
+ globals: {
1417
+ NodeJS: 'writable',
1418
+ },
1419
+ plugins: ['vitest'],
1420
+ env: {
1421
+ jest: true,
1422
+ },
1423
+ },
1424
+ ],
1425
+ };
1426
+
1427
+ export function oxcLintConfigVue(configCustom) {
1428
+ return Object.assign({}, _configDefault, configCustom);
1429
+ }