-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
executable file
·77 lines (65 loc) · 2.06 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
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
module.exports = {
"extends": "xurei/react",
"parser": "babel-eslint",
"plugins": [
"promise",
"jsx",
"react",
"react-hooks",
"security",
"xurei"
],
"settings": {
"react": {
"version": "detect",
}
},
"env": {
"es6": true
},
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module",
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
"jsx": true
}
},
"rules": {
"no-alert": "warn",
"no-eval": "error",
"no-const-assign": "error",
"semi": "warn",
"prefer-const": "error",
"no-unused-vars": ["warn", { "args": "none" }],
"strict": "error",
"eqeqeq": "error",
"curly": "error",
"complexity": ["error", 15],
//Code style rules
"quotes": ["error", "single", { "allowTemplateLiterals": true }],
"indent": ["warn", 4, { "SwitchCase": 1, "MemberExpression": 0 }],
"prefer-template": "error",
"jsx-quotes": ["warn", "prefer-double"],
"key-spacing": ["warn", { "beforeColon": false, "afterColon": true }],
"max-len": 0, //["warn", 160],
"space-before-function-paren": ["warn", "never"],
//Development remains rules
"no-warning-comments": ["error", { "terms": ["debug"] } ],
"promise/always-return": "error",
"promise/no-return-wrap": "error",
"promise/param-names": "error",
"promise/catch-or-return": "error",
"promise/no-native": "off",
"promise/no-nesting": "warn",
"promise/no-promise-in-callback": "warn",
"promise/no-callback-in-promise": "warn",
"react/jsx-uses-vars": "error",
"react/jsx-no-bind": "warn",
"react/prefer-es6-class": ["warn", "always"],
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"no-class-assign": 0,
"xurei/no-relative-parent-imports": ["warn"]
}
};