forked from alibaba/BizCharts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
51 lines (51 loc) · 1.36 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
{
"extends": "eslint-config-airbnb",
"parser": "babel-eslint",
"globals": {
"it": true,
"describe": true,
"require": true,
"process": true,
"before": true,
"after" : true,
"sinon": true,
"expect" : true,
"beforeEach": true,
"afterEach": true
},
"env":{
"es6": true,
"node": true,
"browser": true
},
"parserOptions": {
"sourceType": "module"
},
"rules": {
// 低版本 nodejs 需要在 strict 模式下支持 es6 语法
"strict": "off",
// 经常需要打印东西
"no-console" : "off",
// 不希望参数使用解构,低版本 nodejs 不支持
"prefer-spread" : "off",
// 会有很多地方需要直接使用 arguments
"prefer-rest-params": "off",
// 有动态引入的需求
"import/no-dynamic-require": "off",
// 有些函数对外需要暴露 generator 类型函数,但里面确实只有同步代码
"require-yield": "off",
// 一些正则表达式需要用到
"no-useless-escape": "off",
// 感觉这样写简洁一些
"no-mixed-operators" : "warn",
"no-lonely-if" : "off",
"class-methods-use-this" : "off",
"no-restricted-syntax" : "off",
"no-param-reassign" : "off",
"linebreak-style" : "off",
"arrow-body-style" : "off",
"no-unused-vars" : "warn",
"guard-for-in" : "off",
"react/no-unused-prop-types": "off"
}
}