-
Notifications
You must be signed in to change notification settings - Fork 18
/
.eslintrc.js
53 lines (53 loc) · 1.34 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
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/essential', 'eslint:recommended'],
/* plugins: [
'vue',
'standard'
], */
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
// allow different quotes
quotes: 0,
//
semi: 0,
// allow paren-less arrow functions
'arrow-parens': 0,
// allow async-await
'generator-star-spacing': 0,
// allow not only camel case
"camelcase": 0,
//no-useless-escape
'no-useless-escape': 0,
//在创建对象字面量时不允许键重复 {a:1,a:1}
'no-dupe-keys': 2,
//函数参数不能重复
'no-dupe-args': 2,
//不能用多余的空格
'no-multi-spaces': 1,
//空行最多不能超过2行
'no-multiple-empty-lines': [1, { max: 2 }],
// 相等判断
"eqeqeq": ['error', 'smart'],
// 允许扩展native
'no-extend-native': 0,
// 条件之前得空格
// disabled auto end-tag test
// "vue/no-parsing-error": [2, { "x-invalid-end-tag": false }],
"allowAllPropertiesOnSameLine": false,
"blocks": 'never'
},
parserOptions: {
parser: 'babel-eslint'
}
}