-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
56 lines (56 loc) · 1.69 KB
/
.eslintrc
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
{
"parser": "babel-eslint",
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
//是否支持实验阶段的语法
"experimentalObjectRestSpread": true,
"jsx": true
}
},
"rules": {
// 使console不报error, build的时候会自动去除
"no-console": 0,
"indent": [0, 4],
"max-len": [
"error",
{ "code": 150, "ignoreStrings": true, "ignoreComments": true }
],
"no-new": [0],
// 允许单个参数的函数不加括号
"arrow-parens": [0],
// 允许匿名函数
"func-names": [0],
// 允许使用表达式
"no-unused-expressions": [0],
// 允许括号中换行
"function-paren-newline": [0],
// 允许在switch的case中生命
"no-case-declarations": [0],
// 允许函数里不返回结果
"consistent-return": [0],
// 允许单个export的时候采用非default形式
"import/prefer-default-export": [0],
// 允许使用_
"no-underscore-dangle": [0],
"no-plusplus": [0],
"no-use-before-define": [0],
"no-self-compare": [0],
"no-unused-vars": [0],
"prefer-destructuring": [0],
// 允许不写全路径
"import/no-unresolved": [0],
// 允许不写全后缀
"import/extensions": [0],
// 因为涉及到dom的内容修改,允许修改参数
"no-param-reassign": [0]
},
"extends": "eslint-config-airbnb"
}