@wistia/oxlint-config 0.4.3 → 0.4.5
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/package.json +1 -1
- package/rules/react.mjs +58 -29
package/package.json
CHANGED
package/rules/react.mjs
CHANGED
|
@@ -246,7 +246,8 @@ export const reactRules = {
|
|
|
246
246
|
|
|
247
247
|
// Verify the list of the dependencies for Hooks like useEffect and similar
|
|
248
248
|
// https://eslint-react.xyz/docs/rules/exhaustive-deps
|
|
249
|
-
|
|
249
|
+
// redundant: covered by native react/exhaustive-deps
|
|
250
|
+
'@eslint-react/exhaustive-deps': 'off',
|
|
250
251
|
|
|
251
252
|
// Validates against mutating props, state, and other immutable values
|
|
252
253
|
// https://eslint-react.xyz/docs/rules/immutability
|
|
@@ -254,7 +255,8 @@ export const reactRules = {
|
|
|
254
255
|
|
|
255
256
|
// Prevent accidental JS comments from being injected into JSX as text
|
|
256
257
|
// https://eslint-react.xyz/docs/rules/jsx-no-comment-textnodes
|
|
257
|
-
|
|
258
|
+
// redundant: covered by native react/jsx-no-comment-textnodes
|
|
259
|
+
'@eslint-react/jsx-no-comment-textnodes': 'off',
|
|
258
260
|
|
|
259
261
|
// Prevents unintentional '$' sign before expression in JSX
|
|
260
262
|
// https://eslint-react.xyz/docs/rules/jsx-no-leaked-dollar
|
|
@@ -266,7 +268,8 @@ export const reactRules = {
|
|
|
266
268
|
|
|
267
269
|
// Prevent passing of children as props
|
|
268
270
|
// https://eslint-react.xyz/docs/rules/jsx-no-children-prop
|
|
269
|
-
|
|
271
|
+
// redundant: covered by native react/no-children-prop
|
|
272
|
+
'@eslint-react/jsx-no-children-prop': 'off',
|
|
270
273
|
|
|
271
274
|
// Prevent children prop used alongside children in JSX
|
|
272
275
|
// https://eslint-react.xyz/docs/rules/jsx-no-children-prop-with-children
|
|
@@ -282,7 +285,8 @@ export const reactRules = {
|
|
|
282
285
|
|
|
283
286
|
// Disallow namespace in JSX
|
|
284
287
|
// https://eslint-react.xyz/docs/rules/jsx-no-namespace
|
|
285
|
-
|
|
288
|
+
// redundant: covered by native react/no-namespace
|
|
289
|
+
'@eslint-react/jsx-no-namespace': 'off',
|
|
286
290
|
|
|
287
291
|
// Prevent using this.state within a this.setState
|
|
288
292
|
// https://eslint-react.xyz/docs/rules/no-access-state-in-setstate
|
|
@@ -290,7 +294,8 @@ export const reactRules = {
|
|
|
290
294
|
|
|
291
295
|
// Prevent usage of Array index in keys
|
|
292
296
|
// https://eslint-react.xyz/docs/rules/no-array-index-key
|
|
293
|
-
|
|
297
|
+
// redundant: covered by native react/no-array-index-key
|
|
298
|
+
'@eslint-react/no-array-index-key': 'off',
|
|
294
299
|
|
|
295
300
|
// Disallow usage of Children.count
|
|
296
301
|
// https://eslint-react.xyz/docs/rules/no-children-count
|
|
@@ -318,7 +323,8 @@ export const reactRules = {
|
|
|
318
323
|
|
|
319
324
|
// Disallow usage of cloneElement
|
|
320
325
|
// https://eslint-react.xyz/docs/rules/no-clone-element
|
|
321
|
-
|
|
326
|
+
// redundant: covered by native react/no-clone-element
|
|
327
|
+
'@eslint-react/no-clone-element': 'off',
|
|
322
328
|
|
|
323
329
|
// Disallow usage of componentWillMount
|
|
324
330
|
// https://eslint-react.xyz/docs/rules/no-component-will-mount
|
|
@@ -342,7 +348,8 @@ export const reactRules = {
|
|
|
342
348
|
|
|
343
349
|
// Prevent direct mutation of this.state
|
|
344
350
|
// https://eslint-react.xyz/docs/rules/no-direct-mutation-state
|
|
345
|
-
|
|
351
|
+
// redundant: covered by native react/no-direct-mutation-state
|
|
352
|
+
'@eslint-react/no-direct-mutation-state': 'off',
|
|
346
353
|
|
|
347
354
|
// Disallow duplicate keys in JSX arrays
|
|
348
355
|
// https://eslint-react.xyz/docs/rules/no-duplicate-key
|
|
@@ -354,19 +361,23 @@ export const reactRules = {
|
|
|
354
361
|
|
|
355
362
|
// Prevent implicitly passing the children prop
|
|
356
363
|
// https://eslint-react.xyz/docs/rules/no-implicit-children
|
|
357
|
-
|
|
364
|
+
// disabled: requires TypeScript type-checker services unavailable in oxlint's JS plugin runtime
|
|
365
|
+
'@eslint-react/no-implicit-children': 'off',
|
|
358
366
|
|
|
359
367
|
// Prevent implicitly passing the key prop
|
|
360
368
|
// https://eslint-react.xyz/docs/rules/no-implicit-key
|
|
361
|
-
|
|
369
|
+
// disabled: requires TypeScript type-checker services unavailable in oxlint's JS plugin runtime
|
|
370
|
+
'@eslint-react/no-implicit-key': 'off',
|
|
362
371
|
|
|
363
372
|
// Prevent implicitly passing the ref prop
|
|
364
373
|
// https://eslint-react.xyz/docs/rules/no-implicit-ref
|
|
365
|
-
|
|
374
|
+
// disabled: requires TypeScript type-checker services unavailable in oxlint's JS plugin runtime
|
|
375
|
+
'@eslint-react/no-implicit-ref': 'off',
|
|
366
376
|
|
|
367
377
|
// Prevent problematic leaked values from being rendered
|
|
368
378
|
// https://eslint-react.xyz/docs/rules/no-leaked-conditional-rendering
|
|
369
|
-
|
|
379
|
+
// disabled: requires TypeScript type-checker services unavailable in oxlint's JS plugin runtime
|
|
380
|
+
'@eslint-react/no-leaked-conditional-rendering': 'off',
|
|
370
381
|
|
|
371
382
|
// Enforce that components have a displayName for DevTools
|
|
372
383
|
// https://eslint-react.xyz/docs/rules/no-missing-component-display-name
|
|
@@ -378,7 +389,8 @@ export const reactRules = {
|
|
|
378
389
|
|
|
379
390
|
// Enforce that every JSX element in a list has a key prop
|
|
380
391
|
// https://eslint-react.xyz/docs/rules/no-missing-key
|
|
381
|
-
|
|
392
|
+
// redundant: covered by native react/jsx-key
|
|
393
|
+
'@eslint-react/no-missing-key': 'off',
|
|
382
394
|
|
|
383
395
|
// Disallow misusing captureOwnerStack
|
|
384
396
|
// https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
|
|
@@ -394,11 +406,13 @@ export const reactRules = {
|
|
|
394
406
|
|
|
395
407
|
// Prevent usage of shouldComponentUpdate when extending React.PureComponent
|
|
396
408
|
// https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
|
|
397
|
-
|
|
409
|
+
// redundant: covered by native react/no-redundant-should-component-update
|
|
410
|
+
'@eslint-react/no-redundant-should-component-update': 'off',
|
|
398
411
|
|
|
399
412
|
// Prevent usage of setState in componentDidMount
|
|
400
413
|
// https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
|
|
401
|
-
|
|
414
|
+
// redundant: covered by native react/no-did-mount-set-state
|
|
415
|
+
'@eslint-react/no-set-state-in-component-did-mount': 'off',
|
|
402
416
|
|
|
403
417
|
// Prevent usage of setState in componentDidUpdate
|
|
404
418
|
// https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
|
|
@@ -406,7 +420,8 @@ export const reactRules = {
|
|
|
406
420
|
|
|
407
421
|
// Prevent usage of setState in componentWillUpdate
|
|
408
422
|
// https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
|
|
409
|
-
|
|
423
|
+
// redundant: covered by native react/no-will-update-set-state
|
|
424
|
+
'@eslint-react/no-set-state-in-component-will-update': 'off',
|
|
410
425
|
|
|
411
426
|
// Disallow unnecessary useCallback hooks
|
|
412
427
|
// https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
|
|
@@ -434,7 +449,8 @@ export const reactRules = {
|
|
|
434
449
|
|
|
435
450
|
// Prevent non-stable values used as context values
|
|
436
451
|
// https://eslint-react.xyz/docs/rules/no-unstable-context-value
|
|
437
|
-
|
|
452
|
+
// redundant: covered by native react/jsx-no-constructed-context-values
|
|
453
|
+
'@eslint-react/no-unstable-context-value': 'off',
|
|
438
454
|
|
|
439
455
|
// Disallow referential-type variables as default props
|
|
440
456
|
// https://eslint-react.xyz/docs/rules/no-unstable-default-props
|
|
@@ -446,7 +462,8 @@ export const reactRules = {
|
|
|
446
462
|
|
|
447
463
|
// Warn about component props that are defined but never used
|
|
448
464
|
// https://eslint-react.xyz/docs/rules/no-unused-props
|
|
449
|
-
|
|
465
|
+
// disabled: requires TypeScript type-checker services unavailable in oxlint's JS plugin runtime
|
|
466
|
+
'@eslint-react/no-unused-props': 'off',
|
|
450
467
|
|
|
451
468
|
// Prevent unused state values
|
|
452
469
|
// https://eslint-react.xyz/docs/rules/no-unused-state
|
|
@@ -475,7 +492,8 @@ export const reactRules = {
|
|
|
475
492
|
|
|
476
493
|
// Enforce Rules of Hooks
|
|
477
494
|
// https://eslint-react.xyz/docs/rules/rules-of-hooks
|
|
478
|
-
|
|
495
|
+
// redundant: covered by native react/rules-of-hooks
|
|
496
|
+
'@eslint-react/rules-of-hooks': 'off',
|
|
479
497
|
|
|
480
498
|
// Validates against calling setState synchronously in an effect
|
|
481
499
|
// https://eslint-react.xyz/docs/rules/set-state-in-effect
|
|
@@ -501,15 +519,18 @@ export const reactRules = {
|
|
|
501
519
|
|
|
502
520
|
// Warn on usage of dangerouslySetInnerHTML
|
|
503
521
|
// https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
|
|
504
|
-
|
|
522
|
+
// redundant: covered by native react/no-danger
|
|
523
|
+
'@eslint-react/dom-no-dangerously-set-innerhtml': 'off',
|
|
505
524
|
|
|
506
525
|
// Prevent problem with children and dangerouslySetInnerHTML
|
|
507
526
|
// https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
|
|
508
|
-
|
|
527
|
+
// redundant: covered by native react/no-danger-with-children
|
|
528
|
+
'@eslint-react/dom-no-dangerously-set-innerhtml-with-children': 'off',
|
|
509
529
|
|
|
510
530
|
// Warn against using findDOMNode()
|
|
511
531
|
// https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
|
|
512
|
-
|
|
532
|
+
// redundant: covered by native react/no-find-dom-node
|
|
533
|
+
'@eslint-react/dom-no-find-dom-node': 'off',
|
|
513
534
|
|
|
514
535
|
// Disallow usage of flushSync
|
|
515
536
|
// https://eslint-react.xyz/docs/rules/dom-no-flush-sync
|
|
@@ -521,11 +542,13 @@ export const reactRules = {
|
|
|
521
542
|
|
|
522
543
|
// Enforce that buttons have an explicit type attribute
|
|
523
544
|
// https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
|
|
524
|
-
|
|
545
|
+
// redundant: covered by native react/button-has-type
|
|
546
|
+
'@eslint-react/dom-no-missing-button-type': 'off',
|
|
525
547
|
|
|
526
548
|
// Enforce sandbox attribute on iframe elements
|
|
527
549
|
// https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
|
|
528
|
-
|
|
550
|
+
// redundant: covered by native react/iframe-missing-sandbox
|
|
551
|
+
'@eslint-react/dom-no-missing-iframe-sandbox': 'off',
|
|
529
552
|
|
|
530
553
|
// Disallow usage of ReactDOM.render (use createRoot instead)
|
|
531
554
|
// https://eslint-react.xyz/docs/rules/dom-no-render
|
|
@@ -533,19 +556,23 @@ export const reactRules = {
|
|
|
533
556
|
|
|
534
557
|
// Disallow using ReactDOM.render return value
|
|
535
558
|
// https://eslint-react.xyz/docs/rules/dom-no-render-return-value
|
|
536
|
-
|
|
559
|
+
// redundant: covered by native react/no-render-return-value
|
|
560
|
+
'@eslint-react/dom-no-render-return-value': 'off',
|
|
537
561
|
|
|
538
562
|
// Prevent usage of javascript: URLs
|
|
539
563
|
// https://eslint-react.xyz/docs/rules/dom-no-script-url
|
|
540
|
-
|
|
564
|
+
// redundant: covered by native react/jsx-no-script-url
|
|
565
|
+
'@eslint-react/dom-no-script-url': 'off',
|
|
541
566
|
|
|
542
567
|
// Require style prop value be an object
|
|
543
568
|
// https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
|
|
544
|
-
|
|
569
|
+
// redundant: covered by native react/style-prop-object
|
|
570
|
+
'@eslint-react/dom-no-string-style-prop': 'off',
|
|
545
571
|
|
|
546
572
|
// Prevent usage of unknown DOM property
|
|
547
573
|
// https://eslint-react.xyz/docs/rules/dom-no-unknown-property
|
|
548
|
-
|
|
574
|
+
// redundant: covered by native react/no-unknown-property
|
|
575
|
+
'@eslint-react/dom-no-unknown-property': 'off',
|
|
549
576
|
|
|
550
577
|
// Enforce safe iframe sandbox attribute values
|
|
551
578
|
// https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
|
|
@@ -553,7 +580,8 @@ export const reactRules = {
|
|
|
553
580
|
|
|
554
581
|
// Disallow target="_blank" without rel="noreferrer"
|
|
555
582
|
// https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
556
|
-
|
|
583
|
+
// redundant: covered by native react/jsx-no-target-blank
|
|
584
|
+
'@eslint-react/dom-no-unsafe-target-blank': 'off',
|
|
557
585
|
|
|
558
586
|
// Disallow usage of deprecated useFormState (use useActionState instead)
|
|
559
587
|
// https://eslint-react.xyz/docs/rules/dom-no-use-form-state
|
|
@@ -561,7 +589,8 @@ export const reactRules = {
|
|
|
561
589
|
|
|
562
590
|
// Prevent void DOM elements from receiving children
|
|
563
591
|
// https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
|
|
564
|
-
|
|
592
|
+
// redundant: covered by native react/void-dom-elements-no-children
|
|
593
|
+
'@eslint-react/dom-no-void-elements-with-children': 'off',
|
|
565
594
|
|
|
566
595
|
// Enforce importing React DOM via a namespace import
|
|
567
596
|
// https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
|