|
| 1 | +// @ts-check |
| 2 | +const { defineConfig } = require('eslint-define-config'); |
| 3 | +module.exports = defineConfig({ |
| 4 | + root: true, |
| 5 | + env: { |
| 6 | + browser: true, |
| 7 | + node: true, |
| 8 | + es6: true, |
| 9 | + }, |
| 10 | + parser: 'vue-eslint-parser', |
| 11 | + parserOptions: { |
| 12 | + parser: '@typescript-eslint/parser', |
| 13 | + ecmaVersion: 2020, |
| 14 | + sourceType: 'module', |
| 15 | + jsxPragma: 'React', |
| 16 | + ecmaFeatures: { |
| 17 | + jsx: true, |
| 18 | + }, |
| 19 | + }, |
| 20 | + extends: [ |
| 21 | + 'plugin:vue/vue3-recommended', |
| 22 | + 'plugin:@typescript-eslint/recommended', |
| 23 | + 'prettier', |
| 24 | + 'plugin:prettier/recommended', |
| 25 | + ], |
| 26 | + rules: { |
| 27 | + '@typescript-eslint/ban-ts-ignore': 'off', |
| 28 | + '@typescript-eslint/explicit-function-return-type': 'off', |
| 29 | + '@typescript-eslint/no-explicit-any': 'off', |
| 30 | + '@typescript-eslint/no-var-requires': 'off', |
| 31 | + '@typescript-eslint/no-empty-function': 'off', |
| 32 | + 'vue/custom-event-name-casing': 'off', |
| 33 | + 'no-use-before-define': 'off', |
| 34 | + '@typescript-eslint/no-use-before-define': 'off', |
| 35 | + '@typescript-eslint/ban-ts-comment': 'off', |
| 36 | + '@typescript-eslint/ban-types': 'off', |
| 37 | + '@typescript-eslint/no-non-null-assertion': 'off', |
| 38 | + '@typescript-eslint/explicit-module-boundary-types': 'off', |
| 39 | + '@typescript-eslint/no-unused-vars': [ |
| 40 | + 'error', |
| 41 | + { |
| 42 | + argsIgnorePattern: '^_', |
| 43 | + varsIgnorePattern: '^_', |
| 44 | + }, |
| 45 | + ], |
| 46 | + 'no-unused-vars': [ |
| 47 | + 'error', |
| 48 | + { |
| 49 | + argsIgnorePattern: '^_', |
| 50 | + varsIgnorePattern: '^_', |
| 51 | + }, |
| 52 | + ], |
| 53 | + 'space-before-function-paren': 'off', |
| 54 | + |
| 55 | + 'vue/attributes-order': 'off', |
| 56 | + 'vue/one-component-per-file': 'off', |
| 57 | + 'vue/html-closing-bracket-newline': 'off', |
| 58 | + 'vue/max-attributes-per-line': 'off', |
| 59 | + 'vue/multiline-html-element-content-newline': 'off', |
| 60 | + 'vue/singleline-html-element-content-newline': 'off', |
| 61 | + 'vue/attribute-hyphenation': 'off', |
| 62 | + 'vue/require-default-prop': 'off', |
| 63 | + 'vue/html-self-closing': [ |
| 64 | + 'error', |
| 65 | + { |
| 66 | + html: { |
| 67 | + void: 'always', |
| 68 | + normal: 'never', |
| 69 | + component: 'always', |
| 70 | + }, |
| 71 | + svg: 'always', |
| 72 | + math: 'always', |
| 73 | + }, |
| 74 | + ], |
| 75 | + }, |
| 76 | +}); |
0 commit comments