-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathreact.js
More file actions
145 lines (143 loc) · 6.22 KB
/
Copy pathreact.js
File metadata and controls
145 lines (143 loc) · 6.22 KB
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
import reactPlugin from 'eslint-plugin-react';
import hooksPlugin from 'eslint-plugin-react-hooks';
export const reactConfig = {
plugins: {
react: reactPlugin,
'react-hooks': hooksPlugin
},
rules: {
'react/boolean-prop-naming': 'off',
'react/button-has-type': 'error',
'react/default-props-match-prop-types': 'off',
'react/destructuring-assignment': 'off',
'react/display-name': 'error',
'react/forbid-component-props': 'off',
'react/forbid-dom-props': 'off',
'react/forbid-elements': 'off',
'react/forbid-foreign-prop-types': 'off',
'react/forbid-prop-types': 'off',
'react/function-component-definition': 'off',
'react/jsx-boolean-value': 'off',
'react/jsx-child-element-spacing': 'off',
'react/jsx-closing-bracket-location': 'off',
'react/jsx-closing-tag-location': 'off',
'react/jsx-curly-spacing': 'off',
'react/jsx-curly-newline': 'off',
'react/jsx-equals-spacing': 'off',
'react/jsx-filename-extension': 'off',
'react/jsx-first-prop-new-line': 'off',
'react/jsx-handler-names': 'off',
'react/jsx-indent': 'off',
'react/jsx-indent-props': 'off',
'react/jsx-key': 'off',
'react/jsx-max-depth': 'off',
'react/jsx-max-props-per-line': 'off',
'react/jsx-newline': 'off',
'react/jsx-no-bind': 'off',
'react/jsx-no-comment-textnodes': 'off',
'react/jsx-no-duplicate-props': 'off',
'react/jsx-no-literals': 'off',
'react/jsx-no-script-url': 'off',
'react/jsx-no-target-blank': 'off',
'react/jsx-no-useless-fragment': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-no-undef': 'off',
'react/jsx-curly-brace-presence': 'off',
'react/jsx-pascal-case': 'off',
'react/jsx-fragments': 'off',
'react/jsx-props-no-multi-spaces': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-tag-spacing': 'off',
'react/jsx-uses-react': 'off',
'react/jsx-uses-vars': 'off',
'react/jsx-wrap-multilines': 'off',
'react/no-access-state-in-setstate': 'error',
'react/no-adjacent-inline-elements': 'off',
'react/no-array-index-key': 'off',
'react/no-children-prop': 'off',
'react/no-danger': 'error',
'react/no-danger-with-children': 'error',
'react/no-deprecated': 'error',
'react/no-did-mount-set-state': 'error',
'react/no-did-update-set-state': 'error',
'react/no-direct-mutation-state': 'error',
'react/no-find-dom-node': 'error',
'react/no-is-mounted': 'error',
'react/no-multi-comp': 'off',
'react/no-set-state': 'off',
'react/no-string-refs': 'error',
'react/no-redundant-should-component-update': 'error',
'react/no-render-return-value': 'error',
'react/no-this-in-sfc': 'error',
'react/no-typos': 'off',
'react/no-unescaped-entities': 'off',
'react/no-unknown-property': 'error',
'react/no-unsafe': 'error',
'react/no-unused-prop-types': 'off',
'react/no-unused-state': 'error',
'react/no-will-update-set-state': 'error',
'react/prefer-es6-class': 'off',
'react/prefer-read-only-props': 'off',
'react/prefer-stateless-function': 'error',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react/require-default-props': 'off',
'react/require-optimization': 'off',
'react/require-render-return': 'error',
'react/self-closing-comp': 'off',
'react/sort-comp': 'off',
'react/jsx-sort-props': 'off',
'react/sort-prop-types': 'off',
'react/state-in-constructor': 'off',
'react/static-property-placement': 'off',
'react/style-prop-object': 'off',
'react/void-dom-elements-no-children': 'error',
'react/jsx-no-constructed-context-values': 'off',
'react/no-unstable-nested-components': 'error',
'react/prefer-exact-props': 'off',
'react/no-namespace': 'error',
'react/no-invalid-html-attribute': 'off',
'react/no-arrow-function-lifecycle': 'off',
'react/no-unused-class-component-methods': 'off',
'react/hook-use-state': 'off',
'react/iframe-missing-sandbox': 'error',
'react/jsx-no-leaked-render': 'off',
'react/no-object-type-as-default-prop': 'warn',
'react/sort-default-props': 'off',
'react/checked-requires-onchange-or-readonly': 'off',
'react/jsx-props-no-spread-multi': 'error',
// Disabled: rule calls removed `context.getSourceCode()` and crashes on ESLint 10.
// Tracked upstream in jsx-eslint/eslint-plugin-react#3977; fix PR #3979 stalled.
// Low cost to leave off — React 19 deprecates `forwardRef` itself.
'react/forward-ref-uses-ref': 'off',
'react-hooks/automatic-effect-dependencies': 'off',
'react-hooks/capitalized-calls': 'off',
'react-hooks/config': 'error',
'react-hooks/component-hook-factories': 'error',
'react-hooks/fire': 'off',
'react-hooks/gating': 'error',
'react-hooks/globals': 'error',
'react-hooks/hooks': 'off',
'react-hooks/refs': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/error-boundaries': 'error',
'react-hooks/exhaustive-deps': 'error',
'react-hooks/fbt': 'off',
'react-hooks/immutability': 'error',
'react-hooks/incompatible-library': 'off',
'react-hooks/invariant': 'off',
'react-hooks/no-deriving-state-in-effects': 'off',
'react-hooks/memoized-effect-dependencies': 'off',
'react-hooks/preserve-manual-memoization': 'error',
'react-hooks/purity': 'error',
'react-hooks/rule-suppression': 'off',
'react-hooks/set-state-in-effect': 'off',
'react-hooks/set-state-in-render': 'error',
'react-hooks/static-components': 'error',
'react-hooks/syntax': 'off',
'react-hooks/todo': 'off',
'react-hooks/use-memo': 'error',
'react-hooks/unsupported-syntax': 'error',
'react-hooks/void-use-memo': 'error'
}
};