forked from LuRenJiasWorld/WP-Editor.md
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
39 lines (32 loc) · 1.01 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
module.exports = {
"root": true,
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2017
},
"env": {
"browser": true,
},
"rules": {
// 两个空格的缩进
"indent": ["error", 2, { "SwitchCase": 1 }],
// 必须使用双引号
"quotes": ["error", "double"],
// 每行结尾必须带分号
"semi": ["error", "always"],
// 操作符左右必须加空格
"space-infix-ops": ["error", {"int32Hint": false}],
// 必须使用严格模式
"strict": ["error", "global"],
// 规范逗号使用
"comma-spacing": ["error", {"before": false, "after": true}],
// 规范空格使用
"block-spacing": ["error", "always"],
"func-call-spacing": ["error", "never"],
"no-trailing-spaces": ["error"],
// 去除推荐规则中用不上的规则
"no-useless-escape": ["off"],
"no-unused-vars": ["warn"]
},
"extends": ["eslint:recommended"]
}