forked from ant-move/Antmove
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
51 lines (51 loc) · 1.27 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
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true
},
"extends": "eslint:recommended",
"globals": {
Buffer: true,
wx: true,
my: true,
getApp: true,
App: true,
Page: true,
Component: true,
process: true,
__dirname: true,
getCurrentPages: true
},
"parserOptions": {
"ecmaVersion": 2018
},
"rules": {
"indent": ["error", 4],
"semi": [2, "always"], // 强制语句分号结尾
"keyword-spacing": [2, {
"before": true,
"after": true
}],
"space-before-blocks": [2, "always"],
"space-before-function-paren": [2, "always"],
"key-spacing": [2, {
"beforeColon": false,
"afterColon": true
}],
"spaced-comment": [2, "always", { "markers": ["*!"] }],
'no-console': 0,
'no-empty': 2,
'use-isnan': 2,
'consistent-return': 0,
'default-case': 2,
'eqeqeq': 2,
'no-else-return': 2,
'no-extra-bind': 2,
'no-implicit-coercion': 2,
'no-new-wrappers': 2,
'no-redeclare': 2,
'no-return-assign': 2,
'no-useless-call': 2
}
};