-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
70 lines (70 loc) · 1.7 KB
/
.eslintrc.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
module.exports = {
root: true,
env: {
browser: true
},
parser: 'vue-eslint-parser',
parserOptions: {
// vue-eslint-parser uses the parser which is set by parserOptions.parser to parse scripts
parser: '@typescript-eslint/parser',
ecmaVersion: 2018,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true
}
},
plugins: [
'@typescript-eslint'
],
extends: [
// add more generic rulesets here, such as:
'standard',
'plugin:vue/strongly-recommended',
'plugin:@typescript-eslint/recommended'
],
rules: {
// vue rules
'vue/script-indent': ['error', 2, {
'baseIndent': 1,
'switchCase': 1,
'ignores': []
}],
'vue/html-indent': ['error', 2, {
'attribute': 1,
'closeBracket': 0,
'alignAttributesVertically': true,
'ignores': []
}],
'vue/html-closing-bracket-spacing': ['error', {
'selfClosingTag': 'never'
}],
'vue/max-attributes-per-line': ['error', {
'singleline': 2,
'multiline': {
'allowFirstLine': true
}
}],
'vue/singleline-html-element-content-newline': 0,
'vue/no-unused-components': 0,
'vue/html-self-closing': 0,
// typescript-eslint rules
'@typescript-eslint/indent': ['error', 2],
// once typescript-eslint support these rules, we will remove it
'space-before-function-paren': ['error', {
'anonymous': 'always',
'named': 'never',
'asyncArrow': 'ignore'
}],
'semi': ['error', 'always'],
'lines-between-class-members': 0
},
overrides: [
{
'files': ['*.vue'],
'rules': {
'no-trailing-spaces': 'off',
'@typescript-eslint/indent': 'off'
}
}
]
};