-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
47 lines (35 loc) · 997 Bytes
/
.eslintrc.js
File metadata and controls
47 lines (35 loc) · 997 Bytes
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
// https://eslint.org/docs/user-guide/configuring
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
ecmaVersion: 2017,
sourceType: 'module'
},
env: {
browser: true,
amd: true,
node: true
},
extends: ['eslint:recommended', 'plugin:vue/recommended'],
// required to lint *.vue files
plugins: ['vue'],
// add your custom rules here
rules: {
// 要求开发环境中允许使用 debugger
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-console': 'off',
// 要求尽可能地使用单引号
'quotes': ['error', 'single'],
// 要求缩进采用2个空格
'indent': ['error', 2],
// 要求缩进采用2个空格
'vue/html-indent': ['error', 2],
// 可以不强制使用自闭合标签
'vue/html-self-closing': 'off',
'vue/no-parsing-error': [2, {
'x-invalid-end-tag': false
}],
'vue/no-side-effects-in-computed-properties': 'off'
}
}