|
| 1 | +import { defineConfig } from "eslint/config"; |
| 2 | +import byscriptsPlugins from "@byscripts/eslint-plugin"; |
| 3 | + |
| 4 | +export default defineConfig([ |
| 5 | + { |
| 6 | + plugins: { |
| 7 | + byscripts: { |
| 8 | + rules: { |
| 9 | + "vue-block-attribute-order": byscriptsPlugins.blockAttributeOrder, |
| 10 | + }, |
| 11 | + }, |
| 12 | + }, |
| 13 | + rules: { |
| 14 | + "vue/block-order": ["error", { order: ["script", "template", "style"] }], |
| 15 | + "vue/block-lang": [ |
| 16 | + "error", |
| 17 | + { |
| 18 | + script: { lang: "ts" }, |
| 19 | + style: { lang: "postcss" }, |
| 20 | + }, |
| 21 | + ], |
| 22 | + "vue/block-tag-newline": [ |
| 23 | + "error", |
| 24 | + { |
| 25 | + singleline: "consistent", |
| 26 | + multiline: "always", |
| 27 | + maxEmptyLines: 0, |
| 28 | + }, |
| 29 | + ], |
| 30 | + "vue/component-api-style": ["error", ["script-setup"]], |
| 31 | + "vue/component-name-in-template-casing": [ |
| 32 | + "error", |
| 33 | + "PascalCase", |
| 34 | + { registeredComponentsOnly: false }, |
| 35 | + ], |
| 36 | + "vue/custom-event-name-casing": ["error", "camelCase"], |
| 37 | + "vue/define-emits-declaration": ["error", "type-literal"], |
| 38 | + "vue/define-macros-order": [ |
| 39 | + "error", |
| 40 | + { |
| 41 | + order: [ |
| 42 | + "defineOptions", |
| 43 | + "defineProps", |
| 44 | + "defineEmits", |
| 45 | + "defineModel", |
| 46 | + "defineSlots", |
| 47 | + ], |
| 48 | + defineExposeLast: true, |
| 49 | + }, |
| 50 | + ], |
| 51 | + "vue/define-props-declaration": ["error", "type-based"], |
| 52 | + "vue/enforce-style-attribute": ["error", { allow: ["scoped", "module"] }], |
| 53 | + "vue/html-button-has-type": "error", |
| 54 | + "vue/html-comment-content-newline": [ |
| 55 | + "error", |
| 56 | + { |
| 57 | + singleline: "never", |
| 58 | + multiline: "always", |
| 59 | + }, |
| 60 | + ], |
| 61 | + "vue/html-comment-content-spacing": ["error", "always"], |
| 62 | + "vue/no-duplicate-attr-inheritance": "error", |
| 63 | + "vue/no-empty-component-block": "error", |
| 64 | + "vue/no-multiple-objects-in-class": "error", |
| 65 | + "vue/no-ref-object-reactivity-loss": "error", |
| 66 | + "vue/no-static-inline-styles": "error", |
| 67 | + "vue/no-template-target-blank": "error", |
| 68 | + "vue/no-undef-components": [ |
| 69 | + "error", |
| 70 | + { ignorePatterns: ["RouterLink", "RouterView", "I18nT"] }, |
| 71 | + ], |
| 72 | + "vue/no-undef-properties": "error", |
| 73 | + "vue/no-unused-refs": "error", |
| 74 | + "vue/no-use-v-else-with-v-for": "error", |
| 75 | + "vue/no-useless-mustaches": "error", |
| 76 | + "vue/no-useless-v-bind": "error", |
| 77 | + "vue/no-v-text": "error", |
| 78 | + "vue/padding-line-between-blocks": "error", |
| 79 | + "vue/prefer-define-options": "error", |
| 80 | + "vue/prefer-separate-static-class": "error", |
| 81 | + "vue/prefer-true-attribute-shorthand": "error", |
| 82 | + "vue/require-macro-variable-name": "error", |
| 83 | + "vue/valid-define-options": "error", |
| 84 | + "byscripts/vue-block-attribute-order": "error", |
| 85 | + }, |
| 86 | + }, |
| 87 | +]); |
0 commit comments