|
1 | 1 | module.exports = { |
2 | | - root: true, |
3 | | - |
4 | | - env: { |
5 | | - node: true |
6 | | - }, |
7 | | - |
8 | | - plugins: ['pug'], |
9 | | - |
10 | | - 'extends': [ |
11 | | - 'plugin:vue/recommended' |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + node: true |
| 5 | + }, |
| 6 | + extends: [ |
| 7 | + 'plugin:vue/vue3-essential', |
| 8 | + '@vue/standard', |
| 9 | + // '@vue/typescript/recommended' |
| 10 | + ], |
| 11 | + parserOptions: { |
| 12 | + ecmaVersion: 2020 |
| 13 | + }, |
| 14 | + rules: { |
| 15 | + 'indent': ['off'], |
| 16 | + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', |
| 17 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', |
| 18 | + 'vue/script-indent': ['error', 2, { baseIndent: 1, switchCase: 1 }], |
| 19 | + 'vue/html-closing-bracket-spacing': ['error', { selfClosingTag: 'never' }], |
| 20 | + // 'vue/component-definition-name-casing': ['error', 'kebab-case'], |
| 21 | + 'vue/singleline-html-element-content-newline': ['off'], |
| 22 | + 'vue/require-default-prop': ['off'], |
| 23 | + 'vue/max-attributes-per-line': ['off'], |
| 24 | + 'vue/no-unused-components': ['warn'], |
| 25 | + 'no-unused-vars': ['warn'], |
| 26 | + 'vue/html-self-closing': ['warn', { html: { void: 'always' } }], |
| 27 | + 'curly': ['error', 'multi-line'], |
| 28 | + 'arrow-parens': ['warn', 'as-needed'], |
| 29 | + 'no-return-assign': ['off'], |
| 30 | + 'require-await': ['off'], |
| 31 | + 'vue/no-v-html': ['off'], |
| 32 | + 'quote-props': ['warn', 'consistent-as-needed'], |
| 33 | + 'vue/order-in-components': ['error', { |
| 34 | + order: [ |
| 35 | + 'el', |
| 36 | + 'name', |
| 37 | + 'key', |
| 38 | + 'parent', |
| 39 | + 'functional', |
| 40 | + ['delimiters', 'comments'], |
| 41 | + ['components', 'directives', 'filters'], |
| 42 | + 'icons', |
| 43 | + 'extends', |
| 44 | + 'mixins', |
| 45 | + ['provide', 'inject'], |
| 46 | + 'ROUTER_GUARDS', |
| 47 | + 'layout', |
| 48 | + 'middleware', |
| 49 | + 'validations', |
| 50 | + 'validationConfig', |
| 51 | + 'scrollToTop', |
| 52 | + 'transition', |
| 53 | + 'loading', |
| 54 | + 'inheritAttrs', |
| 55 | + 'model', |
| 56 | + ['props', 'propsData'], |
| 57 | + 'emits', |
| 58 | + 'setup', |
| 59 | + 'asyncData', |
| 60 | + 'head', |
| 61 | + 'data', |
| 62 | + 'fetch', |
| 63 | + 'computed', |
| 64 | + 'watch', |
| 65 | + 'watchQuery', |
| 66 | + 'LIFECYCLE_HOOKS', |
| 67 | + 'methods', |
| 68 | + ['template', 'render'], |
| 69 | + 'renderError' |
| 70 | + ] |
| 71 | + }] |
| 72 | + }, |
| 73 | + overrides: [ |
| 74 | + { |
| 75 | + files: [ |
| 76 | + '**/__tests__/*.{j,t}s?(x)', |
| 77 | + '**/tests/unit/**/*.spec.{j,t}s?(x)' |
| 78 | + ], |
| 79 | + env: { |
| 80 | + jest: true |
| 81 | + } |
| 82 | + } |
12 | 83 | ], |
13 | | - |
14 | | - rules: { |
15 | | - 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
16 | | - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
17 | | - 'no-multiple-empty-lines': [2, { 'max': 2, 'maxEOF': 1 }], |
18 | | - 'no-tabs': 0, |
19 | | - // 'indent': [2, 'tab'], |
20 | | - 'indent': 'off', |
21 | | - 'vue/script-indent': ['error', 'tab', { |
22 | | - 'baseIndent': 1, |
23 | | - 'switchCase': 1 |
24 | | - }], |
25 | | - 'vue/html-indent': ['error', 'tab', { |
26 | | - 'attribute': 1, |
27 | | - 'baseIndent': 1, |
28 | | - 'closeBracket': 0, |
29 | | - 'alignAttributesVertically': true, |
30 | | - 'ignores': [] |
31 | | - }], |
32 | | - 'vue/component-name-in-template-casing': 'error', |
33 | | - // single quotes |
34 | | - 'quotes': [2, 'single'], |
35 | | - // allow paren-less arrow functions |
36 | | - 'arrow-parens': 0, |
37 | | - // allow async-await |
38 | | - 'generator-star-spacing': 0 |
39 | | - }, |
40 | | - |
41 | | - parserOptions: { |
42 | | - parser: 'babel-eslint' |
43 | | - }, |
44 | | - |
45 | | - overrides: [ |
46 | | - { |
47 | | - files: [ |
48 | | - '**/__tests__/*.{j,t}s?(x)', |
49 | | - '**/tests/unit/**/*.spec.{j,t}s?(x)' |
50 | | - ], |
51 | | - env: { |
52 | | - jest: true |
53 | | - } |
54 | | - } |
55 | | - ] |
56 | 84 | } |
0 commit comments