-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
48 lines (48 loc) · 1.37 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
{
"parser": "babel-eslint",
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
//是否支持实验阶段的语法
"experimentalObjectRestSpread": true,
"jsx": true
}
},
"rules": {
"no-console": 0,
"indent": [0, 4],
"max-len": [
"error",
{ "code": 230, "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],
// 允许使用_
"no-underscore-dangle": [0],
// 允许不写全路径
"import/no-unresolved": [0],
"prefer-arrow-callback": [0],
// 允许不写全后缀
"import/extensions": [0],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }]
},
"extends": "eslint-config-airbnb"
}