-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
196 lines (196 loc) · 4.98 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
{
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
],
"settings": {
"import/extensions": [".js"],
"import/ignore": ["node_modules", "\\.(coffee|scss|css|less|hbs|svg|json)$"],
"react": {
"pragma": "React",
"version": "16.14"
}
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"@typescript-eslint",
"react",
"react-hooks",
"testing-library",
"jest-dom"
],
"rules": {
"@typescript-eslint/no-unused-vars": [
"warn",
{
"vars": "all",
"varsIgnorePattern": "^_",
"args": "after-used",
"argsIgnorePattern": "^_"
}
],
"brace-style": ["warn", "1tbs", {"allowSingleLine": true}],
"class-methods-use-this": [
"warn",
{
"exceptMethods": [
"render",
"getInitialState",
"getDefaultProps",
"getChildContext",
"componentWillMount",
"componentDidMount",
"componentWillReceiveProps",
"shouldComponentUpdate",
"componentWillUpdate",
"componentDidUpdate",
"componentWillUnmount"
]
}
],
"comma-style": ["error", "last"],
"comma-spacing": ["error", {"before": false, "after": true}],
"curly": "error",
"default-case": "warn",
"eqeqeq": ["error", "always"],
"jsx-quotes": ["error", "prefer-double"],
"keyword-spacing": ["warn", {"before": true, "after": true}],
"no-case-declarations": "off",
"no-cond-assign": ["error", "always"],
"no-console": ["warn", {"allow": ["warn", "error", "log"]}],
"no-empty": ["error", {"allowEmptyCatch": true}],
"no-eval": "error",
"no-extra-bind": "error",
"no-invalid-this": "warn",
"no-labels": "warn",
"no-multi-spaces": "error",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-unused-expressions": ["error", {"allowTernary": true}],
"no-useless-call": "error",
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-var": "error",
"object-shorthand": ["error", "properties"],
"prefer-const": "error",
"prefer-template": "error",
"radix": ["error", "always"],
"react/display-name": ["error", {"ignoreTranspilerName": false}],
"react/forbid-prop-types": ["error", {"forbid": ["any", "array", "object"]}],
"react/jsx-boolean-value": ["error", "never"],
"react/jsx-closing-bracket-location": [
"error",
{
"selfClosing": "tag-aligned",
"nonEmpty": "tag-aligned"
}
],
"react/jsx-curly-spacing": ["error", "never", {"allowMultiline": true}],
"react/jsx-equals-spacing": ["error", "never"],
"react/jsx-first-prop-new-line": ["warn", "multiline"],
"react/jsx-handler-names": [
"off",
{
"eventHandlerPrefix": "on",
"eventHandlerPropPrefix": "on"
}
],
"react/jsx-indent": ["off"],
"react/jsx-indent-props": ["off"],
"react/jsx-key": "error",
"react/jsx-max-props-per-line": ["off"],
"react/jsx-no-bind": [
"warn",
{
"ignoreRefs": true,
"allowArrowFunctions": true,
"allowBind": true
}
],
"react/jsx-no-comment-textnodes": "error",
"react/jsx-no-duplicate-props": ["error", {"ignoreCase": false}],
"react/jsx-no-literals": "off",
"react/jsx-no-target-blank": "off",
"react/jsx-no-undef": "warn",
"react/jsx-pascal-case": [
"warn",
{
"allowAllCaps": true,
"ignore": []
}
],
"react/jsx-sort-props": [
"off",
{
"ignoreCase": false,
"callbacksLast": false,
"shorthandFirst": false,
"shorthandLast": false
}
],
"react/jsx-tag-spacing": [
"warn",
{
"closingSlash": "never",
"beforeSelfClosing": "always",
"afterOpening": "never"
}
],
"react/jsx-uses-react": ["warn"],
"react/jsx-uses-vars": "warn",
"react/jsx-wrap-multilines": "off",
"react/no-danger": "off",
"react/no-danger-with-children": "off",
"react/no-deprecated": ["warn"],
"react/no-did-mount-set-state": ["off"],
"react/no-did-update-set-state": ["off"],
"react/no-direct-mutation-state": "warn",
"react/no-find-dom-node": "error",
"react/no-is-mounted": "error",
"react/no-multi-comp": ["off", {"ignoreStateless": true}],
"react/no-render-return-value": "warn",
"react/no-set-state": "off",
"react/no-string-refs": "warn",
"react/no-unescaped-entities": "off",
"react/no-unknown-property": "warn",
"react/prefer-es6-class": ["warn", "always"],
"react/prefer-stateless-function": "warn",
"react/prop-types": ["off", {"ignore": [], "customValidators": []}],
"react/react-in-jsx-scope": "error",
"react/require-optimization": ["off", {"allowDecorators": []}],
"react/require-render-return": "error",
"react/self-closing-comp": "warn",
"react/sort-comp": "off",
"react/sort-prop-types": [
"off",
{
"ignoreCase": false,
"callbacksLast": false,
"requiredFirst": false
}
],
"react-hooks/exhaustive-deps": [
"error",
{
"additionalHooks": "(useAsync)|(useSafeEffect)|(useSafeCallback)"
}
],
"react-hooks/rules-of-hooks": "error",
"yoda": ["warn", "never", {"exceptRange": true}]
},
"overrides": [
{
"files": ["*.test.tsx"],
"extends": ["plugin:testing-library/react", "plugin:jest-dom/recommended"]
}
]
}