|
| 1 | +// @ts-check |
| 2 | + |
| 3 | +module.exports = { |
| 4 | + root: true, |
| 5 | + parser: 'vue-eslint-parser', |
| 6 | + parserOptions: { |
| 7 | + parser: '@typescript-eslint/parser', |
| 8 | + sourceType: 'module', |
| 9 | + }, |
| 10 | + plugins: ['@typescript-eslint'], |
| 11 | + extends: ['plugin:vue/vue3-recommended'], |
| 12 | + rules: { |
| 13 | + 'no-debugger': 'error', |
| 14 | + 'no-console': ['error', { allow: ['warn', 'error', 'info', 'clear'] }], |
| 15 | + 'sort-imports': ['error', { ignoreDeclarationSort: true }], |
| 16 | + |
| 17 | + // This rule enforces the preference for using '@ts-expect-error' comments in TypeScript |
| 18 | + // code to indicate intentional type errors, improving code clarity and maintainability. |
| 19 | + '@typescript-eslint/prefer-ts-expect-error': 'error', |
| 20 | + // Enforce the use of 'import type' for importing types |
| 21 | + '@typescript-eslint/consistent-type-imports': [ |
| 22 | + 'error', |
| 23 | + { |
| 24 | + fixStyle: 'inline-type-imports', |
| 25 | + disallowTypeAnnotations: false, |
| 26 | + }, |
| 27 | + ], |
| 28 | + // Enforce the use of top-level import type qualifier when an import only has specifiers with inline type qualifiers |
| 29 | + '@typescript-eslint/no-import-type-side-effects': 'error', |
| 30 | + |
| 31 | + 'vue/max-attributes-per-line': 'off', |
| 32 | + 'vue/singleline-html-element-content-newline': 'off', |
| 33 | + 'vue/multi-word-component-names': 'off', |
| 34 | + 'vue/html-self-closing': [ |
| 35 | + 'error', |
| 36 | + { |
| 37 | + html: { component: 'always', normal: 'always', void: 'any' }, |
| 38 | + math: 'always', |
| 39 | + svg: 'always', |
| 40 | + }, |
| 41 | + ], |
| 42 | + }, |
| 43 | + overrides: [], |
| 44 | +} |
0 commit comments