-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.react.js
45 lines (38 loc) · 1.08 KB
/
.eslintrc.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
/* eslint-env node */
module.exports = {
"extends": ["plugin:react/recommended", "plugin:react-hooks/recommended"],
"globals": {
React: "readonly",
ReactDOM: "readonly"
},
"rules": {
// [React-Specific Changes]
// For neater conditional rendering
"operator-linebreak": 0, // Was 1
// [React Recommended]
"react/display-name": 1,
"react/jsx-key": 1,
"react/jsx-no-comment-textnodes": 1,
"react/jsx-no-duplicate-props": 1,
"react/jsx-no-target-blank": 1,
"react/jsx-no-undef": 1,
"react/jsx-uses-react": 1,
"react/jsx-uses-vars": 1,
"react/no-children-prop": 1,
"react/no-danger-with-children": 1,
"react/no-deprecated": 1,
"react/no-direct-mutation-state": 1,
"react/no-find-dom-node": 1,
"react/no-is-mounted": 1,
"react/no-render-return-value": 1,
"react/no-string-refs": 1,
"react/no-unescaped-entities": 1,
"react/no-unknown-property": 1,
"react/prop-types": 1,
"react/react-in-jsx-scope": 1,
"react/require-render-return": 1,
// [React Hooks Recommended]
"react-hooks/rules-of-hooks": 1,
"react-hooks/exhaustive-deps": 1
}
};