forked from TDesignOteam/eslint-config-tdesign
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.js
56 lines (54 loc) · 1.41 KB
/
vue.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
const vueRule = require('./rules/vue');
module.exports = {
extends: ['plugin:vue/essential', '@vue/typescript/recommended'],
parser: 'vue-eslint-parser',
plugins: ['vue'],
globals: {
cy: 'readonly',
__VERSION__: true,
},
settings: {
'import/resolver': {
node: {},
},
'import/extensions': ['.js', '.jsx', '.ts', '.tsx'],
},
rules: {
...vueRule,
},
overrides: [
{
files: ['*.vue'],
rules: {
indent: 2,
'vue/html-indent': [2, 2],
'vue/return-in-computed-property': 1,
'vue/order-in-components': 2,
'vue/component-name-in-template-casing': [2, 'kebab-case'],
'vue/require-default-prop': 0,
},
},
{
files: ['**/demos/*', 'script/**/*', 'script/*', '*.js', 'site/**/*', 'site/*'],
rules: {
'no-var-requires': 0,
'no-console': 0,
'no-unused-expressions': 0,
'no-alert': 0,
},
},
{
// enable the rule specifically for TypeScript files
files: ['*.js', '*.ts', '*.tsx'],
rules: {
'prefer-spread': 'off',
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/ban-types': 0,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/type-annotation-spacing': 1,
},
},
],
};