@cuiqg/eslint-config 2.8.10 → 2.8.11
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/dist/index.mjs +136 -128
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -445,10 +445,9 @@ async function unocss() {
|
|
|
445
445
|
//#endregion
|
|
446
446
|
//#region src/configs/vue.js
|
|
447
447
|
async function vue(options = {}) {
|
|
448
|
-
const { typescript: typescript$1 = false
|
|
448
|
+
const { typescript: typescript$1 = false } = options;
|
|
449
449
|
let parserOptions = null;
|
|
450
450
|
const files = [GLOB_VUE];
|
|
451
|
-
const { indent = 2 } = typeof stylistic$1 === "boolean" ? {} : stylistic$1;
|
|
452
451
|
const [pluginVue, parserVue] = await Promise.all([interopDefault(import("eslint-plugin-vue")), interopDefault(import("vue-eslint-parser"))]);
|
|
453
452
|
if (typescript$1) parserOptions = { parser: await interopDefault(import("@typescript-eslint/parser")) };
|
|
454
453
|
return [{
|
|
@@ -456,22 +455,6 @@ async function vue(options = {}) {
|
|
|
456
455
|
name: "cuiqg/vue",
|
|
457
456
|
plugins: { vue: pluginVue },
|
|
458
457
|
languageOptions: {
|
|
459
|
-
globals: {
|
|
460
|
-
computed: "readonly",
|
|
461
|
-
defineEmits: "readonly",
|
|
462
|
-
defineExpose: "readonly",
|
|
463
|
-
defineProps: "readonly",
|
|
464
|
-
onMounted: "readonly",
|
|
465
|
-
onUnmounted: "readonly",
|
|
466
|
-
reactive: "readonly",
|
|
467
|
-
ref: "readonly",
|
|
468
|
-
shallowReactive: "readonly",
|
|
469
|
-
shallowRef: "readonly",
|
|
470
|
-
toRef: "readonly",
|
|
471
|
-
toRefs: "readonly",
|
|
472
|
-
watch: "readonly",
|
|
473
|
-
watchEffect: "readonly"
|
|
474
|
-
},
|
|
475
458
|
parser: parserVue,
|
|
476
459
|
parserOptions: {
|
|
477
460
|
ecmaFeatures: { jsx: true },
|
|
@@ -483,125 +466,150 @@ async function vue(options = {}) {
|
|
|
483
466
|
},
|
|
484
467
|
processor: pluginVue.processors[".vue"],
|
|
485
468
|
rules: {
|
|
486
|
-
|
|
487
|
-
...vueVersion === 2 ? {
|
|
488
|
-
...pluginVue.configs["vue2-essential"].rules,
|
|
489
|
-
...pluginVue.configs["vue2-strongly-recommended"].rules,
|
|
490
|
-
...pluginVue.configs["vue2-recommended"].rules
|
|
491
|
-
} : {
|
|
492
|
-
...pluginVue.configs["flat/essential"].map((c) => c.rules).reduce((acc, c) => ({
|
|
493
|
-
...acc,
|
|
494
|
-
...c
|
|
495
|
-
}), {}),
|
|
496
|
-
...pluginVue.configs["flat/strongly-recommended"].map((c) => c.rules).reduce((acc, c) => ({
|
|
497
|
-
...acc,
|
|
498
|
-
...c
|
|
499
|
-
}), {}),
|
|
500
|
-
...pluginVue.configs["flat/recommended"].map((c) => c.rules).reduce((acc, c) => ({
|
|
501
|
-
...acc,
|
|
502
|
-
...c
|
|
503
|
-
}), {})
|
|
504
|
-
},
|
|
469
|
+
"vue/attribute-hyphenation": ["error", "always"],
|
|
505
470
|
"vue/block-order": ["error", { order: [
|
|
506
471
|
"script",
|
|
507
472
|
"template",
|
|
508
473
|
"style"
|
|
509
474
|
] }],
|
|
510
|
-
"vue/
|
|
511
|
-
"vue/component-
|
|
512
|
-
"vue/component-
|
|
513
|
-
"vue/
|
|
514
|
-
"vue/
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
] }],
|
|
520
|
-
"vue/
|
|
521
|
-
"vue/
|
|
522
|
-
"vue/
|
|
523
|
-
"vue/
|
|
524
|
-
"vue/
|
|
525
|
-
"vue/
|
|
526
|
-
"vue/
|
|
527
|
-
"vue/no-
|
|
528
|
-
"vue/no-
|
|
529
|
-
"vue/no-
|
|
530
|
-
"vue/no-
|
|
531
|
-
"vue/no-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
"vue/no-
|
|
538
|
-
"vue/no-
|
|
539
|
-
"vue/no-
|
|
540
|
-
"vue/no-
|
|
475
|
+
"vue/comment-directive": "error",
|
|
476
|
+
"vue/component-api-style": "error",
|
|
477
|
+
"vue/component-definition-name-casing": ["error", "kebab-case"],
|
|
478
|
+
"vue/component-name-in-template-casing": ["error", "kebab-case"],
|
|
479
|
+
"vue/component-options-name-casing": ["error", "kebab-case"],
|
|
480
|
+
"vue/custom-event-name-casing": ["error", "kebab-case"],
|
|
481
|
+
"vue/define-emits-declaration": "error",
|
|
482
|
+
"vue/define-props-declaration": "error",
|
|
483
|
+
"vue/define-props-destructuring": ["error", { destructure: "always" }],
|
|
484
|
+
"vue/enforce-style-attribute": ["error", { allow: ["scoped", "plain"] }],
|
|
485
|
+
"vue/html-button-has-type": "error",
|
|
486
|
+
"vue/html-end-tags": "error",
|
|
487
|
+
"vue/jsx-uses-vars": "error",
|
|
488
|
+
"vue/no-async-in-computed-properties": "error",
|
|
489
|
+
"vue/no-child-content": "error",
|
|
490
|
+
"vue/no-computed-properties-in-data": "error",
|
|
491
|
+
"vue/no-deprecated-data-object-declaration": "error",
|
|
492
|
+
"vue/no-deprecated-delete-set": "error",
|
|
493
|
+
"vue/no-deprecated-destroyed-lifecycle": "error",
|
|
494
|
+
"vue/no-deprecated-dollar-listeners-api": "error",
|
|
495
|
+
"vue/no-deprecated-dollar-scopedslots-api": "error",
|
|
496
|
+
"vue/no-deprecated-events-api": "error",
|
|
497
|
+
"vue/no-deprecated-filter": "error",
|
|
498
|
+
"vue/no-deprecated-functional-template": "error",
|
|
499
|
+
"vue/no-deprecated-html-element-is": "error",
|
|
500
|
+
"vue/no-deprecated-inline-template": "error",
|
|
501
|
+
"vue/no-deprecated-model-definition": "error",
|
|
502
|
+
"vue/no-deprecated-props-default-this": "error",
|
|
503
|
+
"vue/no-deprecated-router-link-tag-prop": "error",
|
|
504
|
+
"vue/no-deprecated-scope-attribute": "error",
|
|
505
|
+
"vue/no-deprecated-slot-attribute": "error",
|
|
506
|
+
"vue/no-deprecated-slot-scope-attribute": "error",
|
|
507
|
+
"vue/no-deprecated-v-bind-sync": "error",
|
|
508
|
+
"vue/no-deprecated-v-is": "error",
|
|
509
|
+
"vue/no-deprecated-v-on-native-modifier": "error",
|
|
510
|
+
"vue/no-deprecated-v-on-number-modifiers": "error",
|
|
511
|
+
"vue/no-deprecated-vue-config-keycodes": "error",
|
|
512
|
+
"vue/no-dupe-keys": "error",
|
|
513
|
+
"vue/no-dupe-v-else-if": "error",
|
|
514
|
+
"vue/no-duplicate-attr-inheritance": "error",
|
|
515
|
+
"vue/no-duplicate-attributes": "error",
|
|
516
|
+
"vue/no-duplicate-class-names": "error",
|
|
517
|
+
"vue/no-empty-component-block": "error",
|
|
518
|
+
"vue/no-export-in-script-setup": "error",
|
|
519
|
+
"vue/no-expose-after-await": "error",
|
|
520
|
+
"vue/no-lifecycle-after-await": "error",
|
|
521
|
+
"vue/no-lone-template": "error",
|
|
522
|
+
"vue/no-multiple-objects-in-class": "error",
|
|
523
|
+
"vue/no-multiple-slot-args": "error",
|
|
524
|
+
"vue/no-mutating-props": "error",
|
|
525
|
+
"vue/no-negated-condition": "error",
|
|
526
|
+
"vue/no-negated-v-if-condition": "error",
|
|
527
|
+
"vue/no-parsing-error": "error",
|
|
528
|
+
"vue/no-potential-component-option-typo": "error",
|
|
529
|
+
"vue/no-ref-as-operand": "error",
|
|
530
|
+
"vue/no-ref-object-reactivity-loss": "error",
|
|
531
|
+
"vue/no-required-prop-with-default": "error",
|
|
532
|
+
"vue/no-reserved-component-names": "error",
|
|
533
|
+
"vue/no-reserved-keys": "error",
|
|
534
|
+
"vue/no-reserved-props": "error",
|
|
535
|
+
"vue/no-setup-props-reactivity-loss": "error",
|
|
536
|
+
"vue/no-shared-component-data": "error",
|
|
537
|
+
"vue/no-side-effects-in-computed-properties": "error",
|
|
538
|
+
"vue/no-template-key": "error",
|
|
539
|
+
"vue/no-template-shadow": "error",
|
|
540
|
+
"vue/no-template-target-blank": "error",
|
|
541
|
+
"vue/no-textarea-mustache": "error",
|
|
542
|
+
"vue/no-this-in-before-route-enter": "error",
|
|
543
|
+
"vue/no-undef-components": "error",
|
|
544
|
+
"vue/no-undef-properties": "error",
|
|
545
|
+
"vue/no-unused-components": "error",
|
|
546
|
+
"vue/no-unused-emit-declarations": "error",
|
|
547
|
+
"vue/no-unused-vars": "error",
|
|
548
|
+
"vue/no-use-computed-property-like-method": "error",
|
|
549
|
+
"vue/no-use-v-else-with-v-for": "error",
|
|
550
|
+
"vue/no-use-v-if-with-v-for": "error",
|
|
551
|
+
"vue/no-useless-mustaches": "error",
|
|
552
|
+
"vue/no-useless-template-attributes": "error",
|
|
541
553
|
"vue/no-useless-v-bind": "error",
|
|
542
|
-
"vue/no-v-
|
|
543
|
-
"vue/
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
ignoreConstructors: false
|
|
549
|
-
}
|
|
550
|
-
],
|
|
554
|
+
"vue/no-v-for-template-key-on-child": "error",
|
|
555
|
+
"vue/no-v-html": "error",
|
|
556
|
+
"vue/no-v-text-v-html-on-component": "error",
|
|
557
|
+
"vue/no-watch-after-await": "error",
|
|
558
|
+
"vue/prefer-define-options": "error",
|
|
559
|
+
"vue/prefer-import-from-vue": "error",
|
|
551
560
|
"vue/prefer-separate-static-class": "error",
|
|
552
|
-
"vue/prefer-
|
|
561
|
+
"vue/prefer-true-attribute-shorthand": "error",
|
|
553
562
|
"vue/prop-name-casing": ["error", "camelCase"],
|
|
554
|
-
"vue/require-
|
|
555
|
-
"vue/require-prop
|
|
556
|
-
"vue/
|
|
557
|
-
"vue/
|
|
558
|
-
|
|
559
|
-
|
|
563
|
+
"vue/require-component-is": "error",
|
|
564
|
+
"vue/require-default-prop": "error",
|
|
565
|
+
"vue/require-emit-validator": "error",
|
|
566
|
+
"vue/require-explicit-emits": "error",
|
|
567
|
+
"vue/require-explicit-slots": "error",
|
|
568
|
+
"vue/require-macro-variable-name": ["error", {
|
|
569
|
+
defineEmits: "emit",
|
|
570
|
+
defineProps: "props",
|
|
571
|
+
defineSlots: "slots",
|
|
572
|
+
useAttrs: "attrs",
|
|
573
|
+
useSlots: "slots"
|
|
560
574
|
}],
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
"vue/operator-linebreak": ["error", "before"],
|
|
600
|
-
"vue/padding-line-between-blocks": ["error", "always"],
|
|
601
|
-
"vue/quote-props": ["error", "consistent-as-needed"],
|
|
602
|
-
"vue/space-in-parens": ["error", "never"],
|
|
603
|
-
"vue/template-curly-spacing": "error"
|
|
604
|
-
} : {}
|
|
575
|
+
"vue/require-name-property": "error",
|
|
576
|
+
"vue/require-prop-type-constructor": "error",
|
|
577
|
+
"vue/require-render-return": "error",
|
|
578
|
+
"vue/require-slots-as-functions": "error",
|
|
579
|
+
"vue/require-toggle-inside-transition": "error",
|
|
580
|
+
"vue/require-typed-ref": "error",
|
|
581
|
+
"vue/require-v-for-key": "error",
|
|
582
|
+
"vue/require-valid-default-prop": "error",
|
|
583
|
+
"vue/return-in-computed-property": "error",
|
|
584
|
+
"vue/return-in-emits-validator": "error",
|
|
585
|
+
"vue/this-in-template": "error",
|
|
586
|
+
"vue/use-v-on-exact": "error",
|
|
587
|
+
"vue/v-bind-style": "error",
|
|
588
|
+
"vue/v-on-event-hyphenation": "error",
|
|
589
|
+
"vue/v-on-style": "error",
|
|
590
|
+
"vue/v-slot-style": "error",
|
|
591
|
+
"vue/valid-attribute-name": "error",
|
|
592
|
+
"vue/valid-define-emits": "error",
|
|
593
|
+
"vue/valid-define-options": "error",
|
|
594
|
+
"vue/valid-define-props": "error",
|
|
595
|
+
"vue/valid-next-tick": "error",
|
|
596
|
+
"vue/valid-template-root": "error",
|
|
597
|
+
"vue/valid-v-bind": "error",
|
|
598
|
+
"vue/valid-v-cloak": "error",
|
|
599
|
+
"vue/valid-v-else": "error",
|
|
600
|
+
"vue/valid-v-else-if": "error",
|
|
601
|
+
"vue/valid-v-for": "error",
|
|
602
|
+
"vue/valid-v-html": "error",
|
|
603
|
+
"vue/valid-v-if": "error",
|
|
604
|
+
"vue/valid-v-is": "error",
|
|
605
|
+
"vue/valid-v-memo": "error",
|
|
606
|
+
"vue/valid-v-model": "error",
|
|
607
|
+
"vue/valid-v-on": "error",
|
|
608
|
+
"vue/valid-v-once": "error",
|
|
609
|
+
"vue/valid-v-pre": "error",
|
|
610
|
+
"vue/valid-v-show": "error",
|
|
611
|
+
"vue/valid-v-slot": "error",
|
|
612
|
+
"vue/valid-v-text": "error"
|
|
605
613
|
}
|
|
606
614
|
}];
|
|
607
615
|
}
|