-
Notifications
You must be signed in to change notification settings - Fork 0
/
react.js
49 lines (47 loc) · 1.46 KB
/
react.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
module.exports = {
"react/jsx-wrap-multilines": "off",
"react/jsx-one-expression-per-line": "off",
"react/jsx-props-no-spreading": "off",
// handled by @emotion/babel-preset-css-prop
"react/react-in-jsx-scope": "off",
// No jsx extension: https://github.com/facebook/create-react-app/issues/87#issuecomment-234627904
"react/jsx-filename-extension": "off",
// irritating, TS handles this better
"react/static-property-placement": "off",
"react/prop-types": "off",
// see https://github.com/jsx-eslint/eslint-plugin-react/issues/3384#issuecomment-1236371796
"react/no-unknown-property": ["error", { ignore: ["css"] }],
// These cause typing conflicts
"react/require-default-props": ["off"],
"react/default-props-match-prop-types": [
"error",
{ allowRequiredDefaults: true },
],
"react/sort-comp": [
"error",
{
order: [
"static-methods",
"instance-variables",
"lifecycle",
"/^on.+$/",
"/^handle.+$/",
"getters",
"setters",
"/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/",
"everything-else",
"/^render.+$/",
"render",
],
},
],
"react/destructuring-assignment": [
"error",
"always",
{ ignoreClassFields: true },
],
"react/no-find-dom-node": "error",
"react/jsx-fragments": "error",
"react/jsx-no-useless-fragment": ["error", { allowExpressions: true }],
"@tablecheck/consistent-react-import": "error",
};