-
Notifications
You must be signed in to change notification settings - Fork 29
/
.eslintrc
85 lines (80 loc) · 2.31 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
77
78
79
80
81
82
83
84
85
{
//配置解析器
"parser": "babel-eslint",
"extends": ["standard", "eslint:recommended"],
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"jsx": true
}
},
"env": {//脚本目标的运行环境
"browser": true,
"node": true,
"es6": true,
"commonjs": true
},
"globals": {
"__DEV__": true,
"App": true,
"Page": true,
"getApp", true
},
"settings": {
"import/resolver": {
"webpack": {
"config": "webpack.config.babel.js"
}
}
},
//规则,只用插件:插件名/规则
"rules": {
"strict": 0,
"import/no-unresolved": [2, {"commonjs": true, "amd": true}],
"max-len": ["error", 300], //每行最长字符数
"no-debugger": 1,
"no-constant-condition": 2,
"no-extra-boolean-cast": 2,
"use-isnan": 2,
"no-undef-init": 2,
"camelcase": 2,
"no-mixed-spaces-and-tabs": 2,
"no-const-assign":2,
"no-func-assign": 2,
"no-else-return": 1,
"no-obj-calls": 2,
"valid-typeof": 2,
"no-unused-vars": 1,
"quotes": 0,
"object-curly-spacing": 0,
"block-spacing": 1,
"semi": 0,
"no-extra-semi": 0,
"keyword-spacing": 1,
"comma-dangle": 0,
"array-bracket-spacing": 1,
"space-before-function-paren": 0,
"no-extra-bind": 1,
"no-var": 2,
"one-var": 0,
"no-redeclare": 2,
"no-new": 0,
"no-new-func": 2,
"no-new-wrappers": 0,
"indent": 0,
"arrow-spacing": ["error", { "before": true, "after": true }],
"arrow-body-style": 0,
"no-global-assign": 0,
"no-unsafe-negation": 0,
"no-empty-function": ["error", { "allow": ["arrowFunctions", "constructors"] }],
"radix": ["error", "as-needed"],
"no-underscore-dangle": ["error", { "allow": ["object_", "_objects", "_store"] }],
"no-param-reassign": ["error", { "props": false }],
"no-alert": 0,
"no-shadow": 0,
"global-require": 0,
"no-unused-expressions": ["error", { "allowShortCircuit": true }],
"linebreak-style": [0, "windows"],
"no-console": 0,
}
}