@cabloy/lint 5.0.20 → 5.0.22

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