@wistia/oxlint-config 0.4.4 → 0.4.6

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wistia/oxlint-config",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "description": "Wistia's Oxlint configurations",
5
5
  "packageManager": "yarn@4.14.1",
6
6
  "type": "module",
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
- '@eslint-react/exhaustive-deps': 'error',
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
- '@eslint-react/jsx-no-comment-textnodes': 'error',
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
- '@eslint-react/jsx-no-children-prop': 'error',
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
- '@eslint-react/jsx-no-namespace': 'error',
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
- '@eslint-react/no-array-index-key': 'error',
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
- '@eslint-react/no-clone-element': 'error',
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
- '@eslint-react/no-direct-mutation-state': 'error',
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
@@ -382,7 +389,8 @@ export const reactRules = {
382
389
 
383
390
  // Enforce that every JSX element in a list has a key prop
384
391
  // https://eslint-react.xyz/docs/rules/no-missing-key
385
- '@eslint-react/no-missing-key': 'error',
392
+ // redundant: covered by native react/jsx-key
393
+ '@eslint-react/no-missing-key': 'off',
386
394
 
387
395
  // Disallow misusing captureOwnerStack
388
396
  // https://eslint-react.xyz/docs/rules/no-misused-capture-owner-stack
@@ -398,11 +406,13 @@ export const reactRules = {
398
406
 
399
407
  // Prevent usage of shouldComponentUpdate when extending React.PureComponent
400
408
  // https://eslint-react.xyz/docs/rules/no-redundant-should-component-update
401
- '@eslint-react/no-redundant-should-component-update': 'error',
409
+ // redundant: covered by native react/no-redundant-should-component-update
410
+ '@eslint-react/no-redundant-should-component-update': 'off',
402
411
 
403
412
  // Prevent usage of setState in componentDidMount
404
413
  // https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-mount
405
- '@eslint-react/no-set-state-in-component-did-mount': 'error',
414
+ // redundant: covered by native react/no-did-mount-set-state
415
+ '@eslint-react/no-set-state-in-component-did-mount': 'off',
406
416
 
407
417
  // Prevent usage of setState in componentDidUpdate
408
418
  // https://eslint-react.xyz/docs/rules/no-set-state-in-component-did-update
@@ -410,7 +420,8 @@ export const reactRules = {
410
420
 
411
421
  // Prevent usage of setState in componentWillUpdate
412
422
  // https://eslint-react.xyz/docs/rules/no-set-state-in-component-will-update
413
- '@eslint-react/no-set-state-in-component-will-update': 'error',
423
+ // redundant: covered by native react/no-will-update-set-state
424
+ '@eslint-react/no-set-state-in-component-will-update': 'off',
414
425
 
415
426
  // Disallow unnecessary useCallback hooks
416
427
  // https://eslint-react.xyz/docs/rules/no-unnecessary-use-callback
@@ -438,7 +449,8 @@ export const reactRules = {
438
449
 
439
450
  // Prevent non-stable values used as context values
440
451
  // https://eslint-react.xyz/docs/rules/no-unstable-context-value
441
- '@eslint-react/no-unstable-context-value': 'error',
452
+ // redundant: covered by native react/jsx-no-constructed-context-values
453
+ '@eslint-react/no-unstable-context-value': 'off',
442
454
 
443
455
  // Disallow referential-type variables as default props
444
456
  // https://eslint-react.xyz/docs/rules/no-unstable-default-props
@@ -480,7 +492,8 @@ export const reactRules = {
480
492
 
481
493
  // Enforce Rules of Hooks
482
494
  // https://eslint-react.xyz/docs/rules/rules-of-hooks
483
- '@eslint-react/rules-of-hooks': 'error',
495
+ // redundant: covered by native react/rules-of-hooks
496
+ '@eslint-react/rules-of-hooks': 'off',
484
497
 
485
498
  // Validates against calling setState synchronously in an effect
486
499
  // https://eslint-react.xyz/docs/rules/set-state-in-effect
@@ -506,15 +519,18 @@ export const reactRules = {
506
519
 
507
520
  // Warn on usage of dangerouslySetInnerHTML
508
521
  // https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml
509
- '@eslint-react/dom-no-dangerously-set-innerhtml': 'error',
522
+ // redundant: covered by native react/no-danger
523
+ '@eslint-react/dom-no-dangerously-set-innerhtml': 'off',
510
524
 
511
525
  // Prevent problem with children and dangerouslySetInnerHTML
512
526
  // https://eslint-react.xyz/docs/rules/dom-no-dangerously-set-innerhtml-with-children
513
- '@eslint-react/dom-no-dangerously-set-innerhtml-with-children': 'error',
527
+ // redundant: covered by native react/no-danger-with-children
528
+ '@eslint-react/dom-no-dangerously-set-innerhtml-with-children': 'off',
514
529
 
515
530
  // Warn against using findDOMNode()
516
531
  // https://eslint-react.xyz/docs/rules/dom-no-find-dom-node
517
- '@eslint-react/dom-no-find-dom-node': 'error',
532
+ // redundant: covered by native react/no-find-dom-node
533
+ '@eslint-react/dom-no-find-dom-node': 'off',
518
534
 
519
535
  // Disallow usage of flushSync
520
536
  // https://eslint-react.xyz/docs/rules/dom-no-flush-sync
@@ -526,11 +542,13 @@ export const reactRules = {
526
542
 
527
543
  // Enforce that buttons have an explicit type attribute
528
544
  // https://eslint-react.xyz/docs/rules/dom-no-missing-button-type
529
- '@eslint-react/dom-no-missing-button-type': 'error',
545
+ // redundant: covered by native react/button-has-type
546
+ '@eslint-react/dom-no-missing-button-type': 'off',
530
547
 
531
548
  // Enforce sandbox attribute on iframe elements
532
549
  // https://eslint-react.xyz/docs/rules/dom-no-missing-iframe-sandbox
533
- '@eslint-react/dom-no-missing-iframe-sandbox': 'error',
550
+ // redundant: covered by native react/iframe-missing-sandbox
551
+ '@eslint-react/dom-no-missing-iframe-sandbox': 'off',
534
552
 
535
553
  // Disallow usage of ReactDOM.render (use createRoot instead)
536
554
  // https://eslint-react.xyz/docs/rules/dom-no-render
@@ -538,19 +556,23 @@ export const reactRules = {
538
556
 
539
557
  // Disallow using ReactDOM.render return value
540
558
  // https://eslint-react.xyz/docs/rules/dom-no-render-return-value
541
- '@eslint-react/dom-no-render-return-value': 'error',
559
+ // redundant: covered by native react/no-render-return-value
560
+ '@eslint-react/dom-no-render-return-value': 'off',
542
561
 
543
562
  // Prevent usage of javascript: URLs
544
563
  // https://eslint-react.xyz/docs/rules/dom-no-script-url
545
- '@eslint-react/dom-no-script-url': 'error',
564
+ // redundant: covered by native react/jsx-no-script-url
565
+ '@eslint-react/dom-no-script-url': 'off',
546
566
 
547
567
  // Require style prop value be an object
548
568
  // https://eslint-react.xyz/docs/rules/dom-no-string-style-prop
549
- '@eslint-react/dom-no-string-style-prop': 'error',
569
+ // redundant: covered by native react/style-prop-object
570
+ '@eslint-react/dom-no-string-style-prop': 'off',
550
571
 
551
572
  // Prevent usage of unknown DOM property
552
573
  // https://eslint-react.xyz/docs/rules/dom-no-unknown-property
553
- '@eslint-react/dom-no-unknown-property': 'error',
574
+ // redundant: covered by native react/no-unknown-property
575
+ '@eslint-react/dom-no-unknown-property': 'off',
554
576
 
555
577
  // Enforce safe iframe sandbox attribute values
556
578
  // https://eslint-react.xyz/docs/rules/dom-no-unsafe-iframe-sandbox
@@ -558,7 +580,8 @@ export const reactRules = {
558
580
 
559
581
  // Disallow target="_blank" without rel="noreferrer"
560
582
  // https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
561
- '@eslint-react/dom-no-unsafe-target-blank': 'error',
583
+ // redundant: covered by native react/jsx-no-target-blank
584
+ '@eslint-react/dom-no-unsafe-target-blank': 'off',
562
585
 
563
586
  // Disallow usage of deprecated useFormState (use useActionState instead)
564
587
  // https://eslint-react.xyz/docs/rules/dom-no-use-form-state
@@ -566,7 +589,8 @@ export const reactRules = {
566
589
 
567
590
  // Prevent void DOM elements from receiving children
568
591
  // https://eslint-react.xyz/docs/rules/dom-no-void-elements-with-children
569
- '@eslint-react/dom-no-void-elements-with-children': 'error',
592
+ // redundant: covered by native react/void-dom-elements-no-children
593
+ '@eslint-react/dom-no-void-elements-with-children': 'off',
570
594
 
571
595
  // Enforce importing React DOM via a namespace import
572
596
  // https://eslint-react.xyz/docs/rules/dom-prefer-namespace-import
@@ -2,25 +2,6 @@ export const typescriptRules = {
2
2
  plugins: ['typescript'],
3
3
  rules: {
4
4
  //Disable base eslint rules superseded by typescript equivalents --
5
- 'eslint/class-methods-use-this': 'off',
6
- 'eslint/default-param-last': 'off',
7
- 'eslint/init-declarations': 'off',
8
- 'eslint/max-params': 'off',
9
- 'eslint/no-array-constructor': 'off',
10
- 'eslint/no-dupe-class-members': 'off',
11
- 'eslint/no-empty-function': 'off',
12
- 'eslint/no-loop-func': 'off',
13
- 'eslint/no-magic-numbers': 'off',
14
- 'eslint/no-redeclare': 'off',
15
- 'eslint/no-restricted-imports': 'off',
16
- 'eslint/no-shadow': 'off',
17
- 'eslint/no-throw-literal': 'off',
18
- 'eslint/no-unused-expressions': 'off',
19
- 'eslint/no-unused-private-class-members': 'off',
20
- 'eslint/no-unused-vars': 'off',
21
- 'eslint/no-use-before-define': 'off',
22
- 'eslint/no-useless-constructor': 'off',
23
- 'eslint/prefer-destructuring': 'off',
24
5
  'eslint/require-await': 'off',
25
6
 
26
7
  // recommended to be disabled for TypeScript projects