/* eslint-env node */ require('@rushstack/eslint-patch/modern-module-resolution') module.exports = { root: true, extends: [ 'plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript', '@vue/eslint-config-prettier/skip-formatting', 'plugin:prettier/recommended' ], parserOptions: { ecmaVersion: 'latest' }, rules: { // Vue 'vue/no-v-html': 'off', 'vue/require-default-prop': 'off', 'vue/require-explicit-emits': 'off', 'vue/multi-word-component-names': [ 'error', { ignores: ['index', 'main'] //需要忽略的组件名 } ], 'vue/html-self-closing': [ 'error', { html: { void: 'always', normal: 'always', component: 'always' }, svg: 'always', math: 'always' } ], 'vue/attributes-order': [ 'warn', { order: [ 'DEFINITION', 'LIST_RENDERING', 'CONDITIONALS', 'RENDER_MODIFIERS', 'GLOBAL', 'UNIQUE', 'TWO_WAY_BINDING', 'OTHER_DIRECTIVES', 'OTHER_ATTR', 'EVENTS', 'CONTENT' ], alphabetical: true //字母顺序 } ] } }