|
1 | 1 | module.exports = { |
2 | | - root: true, |
3 | | - env: { |
4 | | - browser: true, |
5 | | - node: true, |
6 | | - }, |
7 | | - extends: [ |
8 | | - 'plugin:vue/essential', |
9 | | - 'plugin:prettier/recommended', |
10 | | - 'prettier', |
11 | | - 'prettier/vue', |
| 2 | + root: true, |
| 3 | + env: { |
| 4 | + node: true, |
| 5 | + }, |
| 6 | + extends: [ |
| 7 | + /* 'plugin:vue/vue3-essential', */ |
| 8 | + 'eslint:recommended', |
| 9 | + '@vue/typescript/recommended', |
| 10 | + '@vue/prettier', |
| 11 | + '@vue/prettier/@typescript-eslint', |
| 12 | + ], |
| 13 | + parserOptions: { |
| 14 | + ecmaVersion: 2020, |
| 15 | + }, |
| 16 | + rules: { |
| 17 | + 'vue/valid-v-slot': 'off', |
| 18 | + 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', |
| 19 | + 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off', |
| 20 | + '@typescript-eslint/no-this-alias': [ |
| 21 | + 'error', |
| 22 | + { |
| 23 | + allowDestructuring: true, // Allow `const { props, state } = this`; false by default |
| 24 | + allowedNames: ['self', 'vdf'], // Allow `const self = this`; `[]` by default |
| 25 | + }, |
12 | 26 | ], |
13 | | - plugins: ['prettier'], |
14 | | - rules: { |
15 | | - 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
16 | | - 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', |
17 | | - 'prettier/prettier': [ |
18 | | - 'error', |
19 | | - { |
20 | | - htmlWhitespaceSensitivity: 'ignore', |
21 | | - singleQuote: true, |
22 | | - semi: true, |
23 | | - trailingComma: 'all', |
24 | | - }, |
| 27 | + }, |
| 28 | + overrides: [ |
| 29 | + { |
| 30 | + files: [ |
| 31 | + '**/__tests__/*.{j,t}s?(x)', |
| 32 | + '**/tests/unit/**/*.spec.{j,t}s?(x)', |
25 | 33 | ], |
| 34 | + env: { |
| 35 | + jest: true, |
| 36 | + }, |
26 | 37 | }, |
27 | | - parserOptions: { |
28 | | - parser: 'babel-eslint', |
29 | | - }, |
30 | | - settings: { |
31 | | - 'import/resolver': { |
32 | | - alias: [['@', './src']], |
| 38 | + { |
| 39 | + files: [ |
| 40 | + '**/__tests__/*.{j,t}s?(x)', |
| 41 | + '**/tests/unit/**/*.spec.{j,t}s?(x)', |
| 42 | + ], |
| 43 | + env: { |
| 44 | + jest: true, |
33 | 45 | }, |
34 | 46 | }, |
35 | | - } |
| 47 | + ], |
| 48 | +}; |
0 commit comments