-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
52 lines (51 loc) · 1.46 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
module.exports = {
root: true,
env: {
browser: true,
node: true
},
extends: [
'plugin:vue/vue3-recommended',
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'quotes': ['error', 'single'],
'semi': ['error', 'never'],
'comma-dangle': ['error', 'only-multiline'],
'space-before-function-paren': [2, { anonymous: 'always', named: 'never' }],
'indent': 'off',
'no-multiple-empty-lines': ['error', { 'max': 2, 'maxEOF': 1 }],
'no-unused-vars': ['warn'],
'prefer-const': ['warn'],
'require-await': ['warn'],
'no-unreachable': ['warn'],
// vue specific
'vue/max-attributes-per-line': ['warn', {
'singleline': 3,
'multiline': {
'max': 1,
'allowFirstLine': false
},
}],
'vue/html-self-closing': ['warn', {
'html': {
'void': 'always',
'normal': 'never',
'component': 'always'
},
'svg': 'always',
'math': 'never'
}],
'no-multi-spaces': ['error', {
'exceptions': { 'VariableDeclarator': true }
}],
'vue/no-unused-vars': ['warn'],
'vue/no-unused-components': ['warn'],
'vue/multiline-html-element-content-newline': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/html-closing-bracket-newline': 'off',
'vue/comment-directive': 'off',
'vue/no-mutating-props': ['warn']
}
}