-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
27 lines (27 loc) · 1.15 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
{
"extends": "rackt",
"plugins": [
"react"
],
"rules": {
"jsx-quotes": [ 2, "prefer-single" ],
"react/display-name": 1,
"react/jsx-boolean-value": 1,
"react/prop-types": 1,
"no-extra-semi": 2, // 不允许多余的分号
"semi": [2, "never"], // 可以不使用分号的地方都不使用分号
"no-spaced-func": 2, // 调用函数(非声明函数)时括号与函数名之间不允许空格
"no-unreachable" : 2, // 不允许访问不到的语句
"no-console": 0, // 暂不启用
"indent": [2,4, {"SwitchCase":0, "VariableDeclarator": {"var":1, "let": 1, "const": 1}}],
"comma-dangle": [2], // 以下为 ie8 相关规则, 参考: https://github.com/sanctuary-js/sanctuary-style/blob/master/eslint-es3-only.json
"dot-notation": [2, {"allowKeywords": false}],
//"no-catch-shadow": [],
//"no-func-assign": [],
"no-inner-declarations": [2, "functions"],
// "no-invalid-regexp": [2, {"allowConstructorFlags": ["g", "i", "m"]}],
"no-redeclare": [2, {"builtinGlobals": true}],
"no-unused-vars": [1, {"vars": "all", "args": "none", "caughtErrors": "none"}],
"quote-props": [2, "consistent"]
}
}