-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.json
126 lines (126 loc) · 3.4 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
{
"env": {
"browser": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:jsx-a11y/recommended",
"plugin:react/recommended",
"plugin:react/jsx-runtime",
"plugin:promise/recommended",
"plugin:import/recommended",
"prettier"
],
"plugins": [
"jest",
"react",
"react-hooks",
"import",
"promise",
"jsx-a11y"
],
"settings": {
"react": {
"version": "detect"// React version. "detect" automatically picks the version you have installed.
// You can also use `16.0`, `16.3`, etc, if you want to override the detected value.
// It will default to "latest" and warn if missing, and to "detect" in the future
}
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"camelcase": ["off"],
"semi": ["error"],
"comma-dangle": [
"error",
{
"arrays": "always-multiline",
"objects": "always-multiline",
"imports": "never",
"exports": "never",
"functions": "ignore"
}
],
"no-case-declarations": "off",
"no-prototype-builtins": "off",
"no-unused-vars": [
"error",
{
"ignoreRestSiblings": true
}
],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "off",
"react/prefer-stateless-function": "off",
"react/no-multi-comp": "off",
"react/forbid-prop-types": "off",
"react/jsx-boolean-value": [
"error",
"always"
],
"react/jsx-one-expression-per-line": "off",
"no-else-return": "off",
"arrow-body-style": "off",
"dot-notation": "error",
"import/newline-after-import": [
"error",
{
"count": 1
}
],
"no-multiple-empty-lines": [
"error",
{
"max": 1
}
],
"no-undef": "error",
"no-console": ["error", {"allow": ["assert", "error"]}],
"import/order": [
"error",
{
"groups": [
["builtin", "external"]
],
"newlines-between": "always-and-inside-groups"
}
],
"no-duplicate-imports": "error"
},
"overrides": [
{
"extends": [
"plugin:jest/recommended"
],
"globals": {
"JSDOM": true,
"formMacros": true,
"expect": true,
"proxyquire": true,
"sinon": true,
"nock": true,
"rootPath": true,
"globalReq": true,
"globalRes": true
},
"rules": {
"no-unused-expressions": 0
},
"files": [
"**.test.{js,jsx}"
],
"env": {
"jest/globals": true,
"browser": true
}
}
]
}