-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
76 lines (76 loc) · 3.11 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
//ignored some files
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"es6": true
},
"globals": {
"mocha": true,
"chai": true,
"describe": true,
"it": true,
"expect": true,
"context": true,
"specify": true,
"before": true,
"after": true,
"beforeEach": true,
"afterEach": true,
"suit": true,
"_": true,
"$": true,
"__uri": true,
"__inline": true,
"fis": true,
"__NAPI_SOURCE__": true,
"createUnitStore": true,
"StateTypes": true,
"require": true,
"define": true,
"module": true,
"MZ": true,
"DW": true,
"console": true,
"window": true,
"$Cookie": true,
"$D": true,
"$Html": true,
"$JSON": true,
"$Mobile": true,
"$T": true,
"$TextUtils": true,
"$Url": true,
"$Xml": true,
"Vue": true
},
"rules": {
"block-scoped-var": 0, //把 var 语句看作是在块级作用域范围之内
"comma-dangle": 0, // 不对数组或对象末尾逗号做强制要求
"curly": 1, //为所有控制语句指定花括号约定,警告
"eol-last": 0, //强制文件最后一行为空行,关闭
"eqeqeq": [1, "allow-null"], //要求使用 === 和 !==,但允许 == null
"dot-notation": 2, //尽可能的使用点符号
"no-console": 0, //不允许存在 console。关闭
"no-empty": 1, //空的代码块
"no-multi-spaces": 1, //不允许多个空格
"no-self-compare": 1, //禁止自身比较
"no-shadow": 1, //不允许声明在外层作用域下已声明过的变量
"no-undef": 2, //不允许使用未申明变量
"no-underscore-dangle": 0, //禁止标识符中有悬空下划线。关闭
"no-unused-expressions": [1, { allowShortCircuit: true }], // 禁止在语句的位置使用表达式,但允许a && a()
"no-unused-vars": 2, //变量定义后未使用
"no-use-before-define": 1, //不允许在变量定义之前使用它们
"quotes": [0, "single", "avoid-escape"] //使用单引号,除非为了避免转义
},
"extends": "eslint:recommended",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
},
"plugins": [
//"react",
//"vue"
]
}