@wistia/oxlint-config 0.5.1 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/rules/react.mjs CHANGED
@@ -5,232 +5,232 @@ export const reactRules = {
5
5
  jsPlugins: [{ name: '@eslint-react', specifier: '@eslint-react/eslint-plugin' }],
6
6
  rules: {
7
7
  // Enforce that button elements have an explicit type attribute
8
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md
8
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/button-has-type.html
9
9
  'react/button-has-type': 'error',
10
10
 
11
11
  // Enforce boolean attributes notation in JSX (require explicit ={true})
12
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value
12
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-boolean-value.html
13
13
  'react/jsx-boolean-value': ['error', 'always'],
14
14
 
15
15
  // Enforce curly braces or disallow unnecessary curly braces in JSX props and children
16
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
16
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-curly-brace-presence.html
17
17
  // decision: stylistic choice best left for formatter
18
18
  'react/jsx-curly-brace-presence': 'off',
19
19
 
20
20
  // Enforce shorthand or standard form for React fragments
21
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
21
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-fragments.html
22
22
  'react/jsx-fragments': 'error',
23
23
 
24
24
  // Enforce missing key props in iterators/collection literals
25
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
25
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-key.html
26
26
  'react/jsx-key': 'error',
27
27
 
28
28
  // Enforce a maximum depth that JSX can be nested
29
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-max-depth.md
29
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-max-depth.html
30
30
  // decision: not useful enough to justify the performance cost
31
31
  'react/jsx-max-depth': 'off',
32
32
 
33
33
  // Disallow comments from being inserted as text nodes
34
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md
34
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-no-comment-textnodes.html
35
35
  'react/jsx-no-comment-textnodes': 'error',
36
36
 
37
37
  // Disallow JSX context values from taking values that will cause needless rerenders
38
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-constructed-context-values.md
38
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-no-constructed-context-values.html
39
39
  'react/jsx-no-constructed-context-values': 'error',
40
40
 
41
41
  // Disallow duplicate properties in JSX
42
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md
42
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-no-duplicate-props.html
43
43
  // decision: stylistic choice best left for formatter
44
44
  'react/jsx-no-duplicate-props': 'off',
45
45
 
46
46
  // Disallow javascript: URLs
47
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
47
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-no-script-url.html
48
48
  'react/jsx-no-script-url': 'error',
49
49
 
50
50
  // Disallow target="_blank" attribute without rel="noreferrer"
51
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md
51
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-no-target-blank.html
52
52
  'react/jsx-no-target-blank': 'error',
53
53
 
54
54
  // Disallow undeclared variables in JSX
55
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
55
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-no-undef.html
56
56
  // decision: stylistic choice best left for formatter
57
57
  'react/jsx-no-undef': 'off',
58
58
 
59
59
  // Disallow unnecessary fragments
60
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
60
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-no-useless-fragment.html
61
61
  // decision: disabled — oxlint's implementation differs from @eslint-react/no-useless-fragment
62
62
  // and produces false positives on valid patterns
63
63
  'react/jsx-no-useless-fragment': 'off',
64
64
 
65
65
  // Enforce PascalCase for user-defined JSX components
66
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
66
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-pascal-case.html
67
67
  // decision: stylistic choice best left for formatter
68
68
  'react/jsx-pascal-case': 'off',
69
69
 
70
70
  // Disallow spreading props on multiple JSX elements (and merging objects)
71
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spread-multi.md
71
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-props-no-spread-multi.html
72
72
  // decision: stylistic choice best left for formatter
73
73
  'react/jsx-props-no-spread-multi': 'off',
74
74
 
75
75
  // Disallow JSX prop spreading
76
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
76
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-props-no-spreading.html
77
77
  // decision: this is a decision best left to the implementer
78
78
  'react/jsx-props-no-spreading': 'off',
79
79
 
80
80
  // Disallow Array.prototype.map() key from being an array index
81
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
81
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-array-index-key.html
82
82
  'react/no-array-index-key': 'error',
83
83
 
84
84
  // Disallow passing of children as props
85
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md
85
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-children-prop.html
86
86
  'react/no-children-prop': 'error',
87
87
 
88
88
  // Disallow usage of dangerous JSX properties
89
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger.md
89
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-danger.html
90
90
  'react/no-danger': 'error',
91
91
 
92
92
  // Report when a DOM element is using both children and dangerouslySetInnerHTML
93
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md
93
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-danger-with-children.html
94
94
  'react/no-danger-with-children': 'error',
95
95
 
96
96
  // Disallow direct mutation of this.state
97
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md
97
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-direct-mutation-state.html
98
98
  'react/no-direct-mutation-state': 'error',
99
99
 
100
100
  // Disallow usage of findDOMNode
101
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
101
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-find-dom-node.html
102
102
  'react/no-find-dom-node': 'error',
103
103
 
104
104
  // Disallow usage of isMounted
105
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md
105
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-is-mounted.html
106
106
  // decision: stylistic choice best left for formatter
107
107
  'react/no-is-mounted': 'off',
108
108
 
109
109
  // Disallow defining multiple components in a single file (allow colocated stateless helpers)
110
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
110
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-multi-comp.html
111
111
  // decision: stylistic choice best left for formatter
112
112
  'react/no-multi-comp': 'off',
113
113
 
114
114
  // Disallow usage of the return value of ReactDOM.render
115
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md
115
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-render-return-value.html
116
116
  'react/no-render-return-value': 'error',
117
117
 
118
118
  // Disallow usage of setState
119
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-set-state.md
119
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-set-state.html
120
120
  // decision: stylistic choice best left for formatter
121
121
  'react/no-set-state': 'off',
122
122
 
123
123
  // Disallow using string references
124
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md
124
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-string-refs.html
125
125
  // decision: stylistic choice best left for formatter
126
126
  'react/no-string-refs': 'off',
127
127
 
128
128
  // Disallow this from being used in stateless functional components
129
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-this-in-sfc.md
129
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-this-in-sfc.html
130
130
  // decision: stylistic choice best left for formatter
131
131
  'react/no-this-in-sfc': 'off',
132
132
 
133
133
  // Disallow unescaped HTML entities from appearing in markup
134
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md
134
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-unescaped-entities.html
135
135
  // decision: stylistic choice best left for formatter
136
136
  'react/no-unescaped-entities': 'off',
137
137
 
138
138
  // Disallow usage of unknown DOM property
139
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md
139
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-unknown-property.html
140
140
  'react/no-unknown-property': 'error',
141
141
 
142
142
  // Disallow usage of unsafe lifecycle methods
143
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unsafe.md
143
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-unsafe.html
144
144
  // decision: stylistic choice best left for formatter
145
145
  'react/no-unsafe': 'off',
146
146
 
147
147
  // Disallow usage of deprecated methods
148
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.md
148
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-redundant-should-component-update.html
149
149
  'react/no-redundant-should-component-update': 'error',
150
150
 
151
151
  // Disallow creating unstable components inside components
152
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-namespace.md
152
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-namespace.html
153
153
  'react/no-namespace': 'error',
154
154
 
155
155
  // Disallow usage of setState in componentDidMount
156
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
156
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-did-mount-set-state.html
157
157
  'react/no-did-mount-set-state': 'error',
158
158
 
159
159
  // Disallow usage of setState in componentWillUpdate
160
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md
160
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-will-update-set-state.html
161
161
  'react/no-will-update-set-state': 'error',
162
162
 
163
163
  // Disallow usage of React.Children APIs
164
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-react-children.md
164
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-react-children.html
165
165
  // decision: stylistic choice best left for formatter
166
166
  'react/no-react-children': 'off',
167
167
 
168
168
  // Disallow usage of cloneElement
169
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-clone-element.md
169
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/no-clone-element.html
170
170
  'react/no-clone-element': 'error',
171
171
 
172
172
  // Enforce ES5 or ES6 class for React Components
173
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
173
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/prefer-es6-class.html
174
174
  // decision: stylistic choice best left for formatter
175
175
  'react/prefer-es6-class': 'off',
176
176
 
177
177
  // Enforce that components that only export from react can only export components
178
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/only-export-components.md
178
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/only-export-components.html
179
179
  // decision: stylistic choice best left for formatter
180
180
  'react/only-export-components': 'off',
181
181
 
182
182
  // Prevent missing displayName in a React component definition
183
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md
183
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/display-name.html
184
184
  // decision: stylistic choice best left for formatter (equivalent @eslint-react/no-missing-component-display-name is "off")
185
185
  'react/display-name': 'off',
186
186
 
187
187
  // Enforce a specific function type for function components
188
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forward-ref-uses-ref.md
188
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/forward-ref-uses-ref.html
189
189
  // decision: stylistic choice best left for formatter
190
190
  'react/forward-ref-uses-ref': 'off',
191
191
 
192
192
  // Enforce sandbox attribute on iframe elements
193
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/iframe-missing-sandbox.md
193
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/iframe-missing-sandbox.html
194
194
  'react/iframe-missing-sandbox': 'error',
195
195
 
196
196
  // Enforce checked/onChange or readonly for checkboxes
197
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md
197
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/checked-requires-onchange-or-readonly.html
198
198
  // decision: stylistic choice best left for formatter
199
199
  'react/checked-requires-onchange-or-readonly': 'off',
200
200
 
201
201
  // Disallow void DOM elements from receiving children
202
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md
202
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/void-dom-elements-no-children.html
203
203
  'react/void-dom-elements-no-children': 'error',
204
204
 
205
205
  // Enforce component methods order
206
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-render-return.md
206
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/require-render-return.html
207
207
  // decision: stylistic choice best left for formatter
208
208
  'react/require-render-return': 'off',
209
209
 
210
210
  // Enforce Rules of Hooks
211
- // https://reactjs.org/docs/hooks-rules.html
211
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/rules-of-hooks.html
212
212
  'react/rules-of-hooks': 'error',
213
213
 
214
214
  // Verify the list of the dependencies for Hooks like useEffect and similar
215
- // https://github.com/facebook/react/issues/14920
215
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/exhaustive-deps.html
216
216
  'react/exhaustive-deps': 'error',
217
217
 
218
218
  // Enforce JSX filename extension (allow .jsx and .tsx)
219
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
219
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-filename-extension.html
220
220
  // decision: stylistic choice best left for formatter
221
221
  'react/jsx-filename-extension': 'off',
222
222
 
223
223
  // Enforce self-closing tags for components without children
224
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
224
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/self-closing-comp.html
225
225
  // decision: stylistic choice best left for formatter
226
226
  'react/self-closing-comp': 'off',
227
227
 
228
228
  // Enforce style prop value is an object
229
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md
229
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/style-prop-object.html
230
230
  'react/style-prop-object': 'error',
231
231
 
232
232
  // Enforce event handler naming conventions in JSX
233
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
233
+ // https://oxc.rs/docs/guide/usage/linter/rules/react/jsx-handler-names.html
234
234
  // decision: stylistic choice best left for formatter
235
235
  'react/jsx-handler-names': 'off',
236
236