-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.json
72 lines (72 loc) · 1.97 KB
/
.eslintrc.json
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
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"react-app",
"react-app/jest",
"eslint:recommended"
],
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
},
"sourceType": "module",
"babelOptions": {
"presets": [
[ "babel-preset-react-app", false ],
"babel-preset-react-app/prod"
]
}
},
"plugins": [
"react",
"jsx-a11y"
],
"rules": {
// enbale console.log
"no-console": "off",
// enable declare variable in if
"no-cond-assign": "off",
// enable declare variable width var
"no-var": "off",
// enable declare in case
"no-case-declarations": "off",
// enable redeclare variable
"no-redeclare": "off",
"indent": ["warn", 2, {
"SwitchCase": 1,
"ignoreComments": false
}],
"linebreak-style": ["warn", "unix"],
"quotes": ["warn", "single"],
"semi": ["warn", "always"],
"no-unreachable": "warn",
"no-class-assign": "warn",
"no-unused-vars": "warn",
"no-useless-escape": "off",
"eqeqeq": "off",
"no-irregular-whitespace": "warn",
"no-trailing-spaces": "warn",
"react/jsx-indent": ["warn", 2],
"eol-last": "error",
"space-before-function-paren": ["warn", {"named": "never"}],
"array-bracket-spacing": ["warn", "never"],
"object-curly-spacing": ["warn", "always"],
"spaced-comment": "warn",
"keyword-spacing": ["warn", {"before": true}],
"space-infix-ops": "error",
"key-spacing": ["error", { "beforeColon": false }],
"arrow-spacing": ["error", { "before": true, "after": true }],
"comma-spacing": ["error", { "before": false, "after": true }],
"no-duplicate-imports": "error",
"one-var": ["error", "never"],
"brace-style": "error",
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 1 }],
"no-multi-spaces": "error",
"react/jsx-closing-tag-location": "error"
}
}