-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
48 lines (48 loc) · 1.16 KB
/
Copy path.eslintrc.js
File metadata and controls
48 lines (48 loc) · 1.16 KB
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
module.exports = {
root: true,
env: {
browser: true,
node: true,
es6: true,
jest: true
},
extends: ['standard', 'plugin:vue/essential', '@vue/prettier', 'plugin:prettier/recommended'],
rules: {
// 修复es6字符串拼接babel报错
indent: [
'error',
2,
{
SwitchCase: 1,
ignoredNodes: ['TemplateLiteral']
}
],
'template-curly-spacing': 0,
// 部分规则
'no-console': 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'space-before-function-paren': 'off',
'no-unused-vars': 'off',
'vue/html-self-closing': 'off',
'vue/no-v-html': 'off',
'vue/attributes-order': 'off',
'vue/order-in-components': 'off',
'vue/require-component-is': 'off',
'vue/no-unused-components': 'off',
'no-undef': 'off',
'prettier/prettier': [
'error',
{
tabWidth: 2,
printWidth: 120,
useTabs: false,
semi: false,
singleQuote: true,
trailingComma: 'none',
endOfLine: 'auto',
htmlWhitespaceSensitivity: 'ignore'
}
],
'no-template-curly-in-string': 'off'
}
}