@storm-software/eslint 0.76.0 → 0.76.1

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/dist/preset.mjs CHANGED
@@ -10,9 +10,9 @@ import nxPlugin from '@nx/eslint-plugin';
10
10
  import jsxA11y from 'eslint-plugin-jsx-a11y';
11
11
  import markdown from 'eslint-plugin-markdown';
12
12
  import prettierConfig from 'eslint-plugin-prettier/recommended';
13
- import react from 'eslint-plugin-react';
14
13
  import reactCompiler from 'eslint-plugin-react-compiler';
15
14
  import reactHooks from 'eslint-plugin-react-hooks';
15
+ import react from 'eslint-plugin-react/configs/recommended';
16
16
  import tsdoc from 'eslint-plugin-tsdoc';
17
17
  import unicorn from 'eslint-plugin-unicorn';
18
18
  import yml from 'eslint-plugin-yml';
@@ -346,855 +346,6 @@ var src = {
346
346
 
347
347
  const eslint = /*@__PURE__*/getDefaultExportFromCjs(src);
348
348
 
349
- const config$4 = {
350
- // This rule has been deprecated, but not yet removed.
351
- "jsx-a11y/no-onchange": "off",
352
- // ensure emoji are accessible
353
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/accessible-emoji.md
354
- // disabled; rule is deprecated
355
- "jsx-a11y/accessible-emoji": "off",
356
- // Enforce that all elements that require alternative text have meaningful information
357
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md
358
- "jsx-a11y/alt-text": [
359
- "error",
360
- {
361
- elements: ["img", "object", "area", 'input[type="image"]'],
362
- img: [],
363
- object: [],
364
- area: [],
365
- 'input[type="image"]': []
366
- }
367
- ],
368
- // Enforce that anchors have content
369
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-has-content.md
370
- "jsx-a11y/anchor-has-content": ["error", { components: [] }],
371
- // ensure <a> tags are valid
372
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/0745af376cdc8686d85a361ce36952b1fb1ccf6e/docs/rules/anchor-is-valid.md
373
- "jsx-a11y/anchor-is-valid": [
374
- "error",
375
- {
376
- components: ["Link"],
377
- specialLink: ["to"],
378
- aspects: ["noHref", "invalidHref", "preferButton"]
379
- }
380
- ],
381
- // elements with aria-activedescendant must be tabbable
382
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-activedescendant-has-tabindex.md
383
- "jsx-a11y/aria-activedescendant-has-tabindex": "error",
384
- // Enforce all aria-* props are valid.
385
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md
386
- "jsx-a11y/aria-props": "error",
387
- // Enforce ARIA state and property values are valid.
388
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md
389
- "jsx-a11y/aria-proptypes": "error",
390
- // Require ARIA roles to be valid and non-abstract
391
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md
392
- "jsx-a11y/aria-role": ["error", { ignoreNonDOM: false }],
393
- // Enforce that elements that do not support ARIA roles, states, and
394
- // properties do not have those attributes.
395
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md
396
- "jsx-a11y/aria-unsupported-elements": "error",
397
- // Ensure the autocomplete attribute is correct and suitable for the form field it is used with
398
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/29c68596b15c4ff0a40daae6d4a2670e36e37d35/docs/rules/autocomplete-valid.md
399
- "jsx-a11y/autocomplete-valid": [
400
- "off",
401
- {
402
- inputComponents: []
403
- }
404
- ],
405
- // require onClick be accompanied by onKeyUp/onKeyDown/onKeyPress
406
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/click-events-have-key-events.md
407
- "jsx-a11y/click-events-have-key-events": "error",
408
- // Enforce that a control (an interactive element) has a text label.
409
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/control-has-associated-label.md
410
- "jsx-a11y/control-has-associated-label": [
411
- "error",
412
- {
413
- labelAttributes: ["label"],
414
- controlComponents: [],
415
- ignoreElements: [
416
- "audio",
417
- "canvas",
418
- "embed",
419
- "input",
420
- "textarea",
421
- "tr",
422
- "video"
423
- ],
424
- ignoreRoles: [
425
- "grid",
426
- "listbox",
427
- "menu",
428
- "menubar",
429
- "radiogroup",
430
- "row",
431
- "tablist",
432
- "toolbar",
433
- "tree",
434
- "treegrid"
435
- ],
436
- depth: 5
437
- }
438
- ],
439
- // ensure <hX> tags have content and are not aria-hidden
440
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md
441
- "jsx-a11y/heading-has-content": ["error", { components: [""] }],
442
- // require HTML elements to have a "lang" prop
443
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md
444
- "jsx-a11y/html-has-lang": "error",
445
- // ensure iframe elements have a unique title
446
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/iframe-has-title.md
447
- "jsx-a11y/iframe-has-title": "error",
448
- // Prevent img alt text from containing redundant words like "image", "picture", or "photo"
449
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/img-redundant-alt.md
450
- "jsx-a11y/img-redundant-alt": "error",
451
- // Elements with an interactive role and interaction handlers must be focusable
452
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/interactive-supports-focus.md
453
- "jsx-a11y/interactive-supports-focus": "error",
454
- // Enforce that a label tag has a text label and an associated control.
455
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/b800f40a2a69ad48015ae9226fbe879f946757ed/docs/rules/label-has-associated-control.md
456
- "jsx-a11y/label-has-associated-control": [
457
- "error",
458
- {
459
- labelComponents: [],
460
- labelAttributes: [],
461
- controlComponents: [],
462
- assert: "both",
463
- depth: 25
464
- }
465
- ],
466
- // require HTML element's lang prop to be valid
467
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md
468
- "jsx-a11y/lang": "error",
469
- // media elements must have captions
470
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/media-has-caption.md
471
- "jsx-a11y/media-has-caption": [
472
- "error",
473
- {
474
- audio: [],
475
- video: [],
476
- track: []
477
- }
478
- ],
479
- // require that mouseover/out come with focus/blur, for keyboard-only users
480
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md
481
- "jsx-a11y/mouse-events-have-key-events": "error",
482
- // Prevent use of `accessKey`
483
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-access-key.md
484
- "jsx-a11y/no-access-key": "error",
485
- // prohibit autoFocus prop
486
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-autofocus.md
487
- "jsx-a11y/no-autofocus": ["error", { ignoreNonDOM: true }],
488
- // prevent distracting elements, like <marquee> and <blink>
489
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-distracting-elements.md
490
- "jsx-a11y/no-distracting-elements": [
491
- "error",
492
- {
493
- elements: ["marquee", "blink"]
494
- }
495
- ],
496
- // WAI-ARIA roles should not be used to convert an interactive element to non-interactive
497
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-interactive-element-to-noninteractive-role.md
498
- "jsx-a11y/no-interactive-element-to-noninteractive-role": [
499
- "error",
500
- {
501
- tr: ["none", "presentation"]
502
- }
503
- ],
504
- // A non-interactive element does not support event handlers (mouse and key handlers)
505
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-interactions.md
506
- "jsx-a11y/no-noninteractive-element-interactions": [
507
- "error",
508
- {
509
- handlers: [
510
- "onClick",
511
- "onMouseDown",
512
- "onMouseUp",
513
- "onKeyPress",
514
- "onKeyDown",
515
- "onKeyUp"
516
- ]
517
- }
518
- ],
519
- // WAI-ARIA roles should not be used to convert a non-interactive element to interactive
520
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-element-to-interactive-role.md
521
- "jsx-a11y/no-noninteractive-element-to-interactive-role": [
522
- "error",
523
- {
524
- ul: [
525
- "listbox",
526
- "menu",
527
- "menubar",
528
- "radiogroup",
529
- "tablist",
530
- "tree",
531
- "treegrid"
532
- ],
533
- ol: [
534
- "listbox",
535
- "menu",
536
- "menubar",
537
- "radiogroup",
538
- "tablist",
539
- "tree",
540
- "treegrid"
541
- ],
542
- li: ["menuitem", "option", "row", "tab", "treeitem"],
543
- table: ["grid"],
544
- td: ["gridcell"]
545
- }
546
- ],
547
- // Tab key navigation should be limited to elements on the page that can be interacted with.
548
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-noninteractive-tabindex.md
549
- "jsx-a11y/no-noninteractive-tabindex": [
550
- "error",
551
- {
552
- tags: [],
553
- roles: ["tabpanel"],
554
- allowExpressionValues: true
555
- }
556
- ],
557
- // ensure HTML elements do not specify redundant ARIA roles
558
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-redundant-roles.md
559
- "jsx-a11y/no-redundant-roles": [
560
- "error",
561
- {
562
- nav: ["navigation"]
563
- }
564
- ],
565
- // Enforce that DOM elements without semantic behavior not have interaction handlers
566
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md
567
- "jsx-a11y/no-static-element-interactions": [
568
- "error",
569
- {
570
- handlers: [
571
- "onClick",
572
- "onMouseDown",
573
- "onMouseUp",
574
- "onKeyPress",
575
- "onKeyDown",
576
- "onKeyUp"
577
- ]
578
- }
579
- ],
580
- // Enforce that elements with ARIA roles must have all required attributes
581
- // for that role.
582
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md
583
- "jsx-a11y/role-has-required-aria-props": "error",
584
- // Enforce that elements with explicit or implicit roles defined contain
585
- // only aria-* properties supported by that role.
586
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md
587
- "jsx-a11y/role-supports-aria-props": "error",
588
- // only allow <th> to have the "scope" attr
589
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/scope.md
590
- "jsx-a11y/scope": "error",
591
- // Enforce tabIndex value is not greater than zero.
592
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md
593
- "jsx-a11y/tabindex-no-positive": "error",
594
- // ----------------------------------------------------
595
- // Rules that no longer exist in eslint-plugin-jsx-a11y
596
- // ----------------------------------------------------
597
- // require that JSX labels use "htmlFor"
598
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-for.md
599
- // deprecated: replaced by `label-has-associated-control` rule
600
- "jsx-a11y/label-has-for": [
601
- "off",
602
- {
603
- components: [],
604
- required: {
605
- every: ["nesting", "id"]
606
- },
607
- allowChildren: false
608
- }
609
- ],
610
- // Ensures anchor text is not ambiguous
611
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/93f78856655696a55309440593e0948c6fb96134/docs/rules/anchor-ambiguous-text.md
612
- // TODO: semver-major, enable
613
- "jsx-a11y/anchor-ambiguous-text": "off",
614
- // Enforce that aria-hidden="true" is not set on focusable elements.
615
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/93f78856655696a55309440593e0948c6fb96134/docs/rules/no-aria-hidden-on-focusable.md
616
- // TODO: semver-major, enable
617
- "jsx-a11y/no-aria-hidden-on-focusable": "off",
618
- // Enforces using semantic DOM elements over the ARIA role property.
619
- // https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/93f78856655696a55309440593e0948c6fb96134/docs/rules/prefer-tag-over-role.md
620
- // TODO: semver-major, enable
621
- "jsx-a11y/prefer-tag-over-role": "off"
622
- };
623
-
624
- const config$3 = {
625
- // We recommend using TypeScript over `prop-types`, as `prop-types` can add
626
- // to a project's build size.
627
- "react/prop-types": "off",
628
- // Disable requiring React to be imported, as this is no longer required.
629
- "react/react-in-jsx-scope": "off",
630
- /**
631
- * Require an explicit type when using button elements.
632
- *
633
- * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/button-has-type.md
634
- */
635
- "react/button-has-type": [
636
- "error",
637
- {
638
- button: true,
639
- submit: true,
640
- reset: true
641
- }
642
- ],
643
- /**
644
- * Require consistent function type for function components.
645
- *
646
- * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/HEAD/docs/rules/function-component-definition.md
647
- */
648
- "react/function-component-definition": "warn",
649
- /**
650
- * Require destructuring and symmetric naming of `useState` hook value and setter variables.
651
- *
652
- * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/hook-use-state.md
653
- */
654
- "react/hook-use-state": "warn",
655
- /**
656
- * Require consistent boolean attributes notation in JSX.
657
- *
658
- * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-boolean-value.md
659
- */
660
- "react/jsx-boolean-value": "warn",
661
- /**
662
- * Disallow unnecessary curly braces in JSX props and children.
663
- *
664
- * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
665
- */
666
- "react/jsx-curly-brace-presence": "warn",
667
- /**
668
- * Require using shorthand form for React fragments, unless required.
669
- *
670
- * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-fragments.md
671
- */
672
- "react/jsx-fragments": ["error", "syntax"],
673
- /**
674
- * Prevent problematic leaked values from being rendered.
675
- *
676
- * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-leaked-render.md
677
- */
678
- "react/jsx-no-leaked-render": "warn",
679
- /**
680
- * Prevents usage of unsafe `target='_blank'`.
681
- *
682
- * This rule is a part of `react/recommended`, but we've modified it to
683
- * allow referrer.
684
- *
685
- * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md
686
- */
687
- "react/jsx-no-target-blank": [
688
- "error",
689
- {
690
- enforceDynamicLinks: "always",
691
- allowReferrer: true
692
- }
693
- ],
694
- /**
695
- * Disallow empty React fragments.
696
- *
697
- * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-useless-fragment.md
698
- */
699
- "react/jsx-no-useless-fragment": ["warn", { allowExpressions: true }],
700
- /**
701
- * Require the use of PascalCase for user-defined JSX components.
702
- *
703
- * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-pascal-case.md
704
- */
705
- "react/jsx-pascal-case": [
706
- "error",
707
- {
708
- allowAllCaps: true,
709
- ignore: []
710
- }
711
- ],
712
- /**
713
- * Disallow usage of Array index in keys.
714
- *
715
- * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md
716
- */
717
- "react/no-array-index-key": "warn",
718
- /**
719
- * Disallow creating unstable components inside components.
720
- *
721
- * 🚫 Not fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unstable-nested-components.md
722
- */
723
- "react/no-unstable-nested-components": "error",
724
- /**
725
- * Disallow closing tags for components without children.
726
- *
727
- * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md
728
- */
729
- "react/self-closing-comp": "warn",
730
- // Specify whether double or single quotes should be used in JSX attributes
731
- // https://eslint.org/docs/rules/jsx-quotes
732
- "jsx-quotes": ["error", "prefer-double"],
733
- "class-methods-use-this": [
734
- "error",
735
- {
736
- exceptMethods: [
737
- "render",
738
- "getInitialState",
739
- "getDefaultProps",
740
- "getChildContext",
741
- "componentWillMount",
742
- "UNSAFE_componentWillMount",
743
- "componentDidMount",
744
- "componentWillReceiveProps",
745
- "UNSAFE_componentWillReceiveProps",
746
- "shouldComponentUpdate",
747
- "componentWillUpdate",
748
- "UNSAFE_componentWillUpdate",
749
- "componentDidUpdate",
750
- "componentWillUnmount",
751
- "componentDidCatch",
752
- "getSnapshotBeforeUpdate"
753
- ]
754
- }
755
- ],
756
- // This rule enforces onChange or readonly attribute for checked property of input elements.
757
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/checked-requires-onchange-or-readonly.md
758
- "react/checked-requires-onchange-or-readonly": [
759
- "off",
760
- {
761
- ignoreMissingProperties: false,
762
- ignoreExclusiveCheckedAttribute: false
763
- }
764
- ],
765
- // Prevent missing displayName in a React component definition
766
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/display-name.md
767
- "react/display-name": ["off", { ignoreTranspilerName: false }],
768
- // Forbid certain propTypes (any, array, object)
769
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-prop-types.md
770
- "react/forbid-prop-types": [
771
- "error",
772
- {
773
- forbid: ["any", "array", "object"],
774
- checkContextTypes: true,
775
- checkChildContextTypes: true
776
- }
777
- ],
778
- // Forbid certain props on DOM Nodes
779
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/forbid-dom-props.md
780
- "react/forbid-dom-props": ["off", { forbid: [] }],
781
- // Validate closing bracket location in JSX
782
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md
783
- "react/jsx-closing-bracket-location": ["error", "after-props"],
784
- // Validate closing tag location in JSX
785
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-closing-tag-location.md
786
- "react/jsx-closing-tag-location": "error",
787
- // Enforce or disallow spaces inside of curly braces in JSX attributes
788
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md
789
- "react/jsx-curly-spacing": ["error", "never", { allowMultiline: true }],
790
- // Enforce event handler naming conventions in JSX
791
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md
792
- "react/jsx-handler-names": [
793
- "error",
794
- {
795
- eventHandlerPrefix: "on",
796
- eventHandlerPropPrefix: "on"
797
- }
798
- ],
799
- // Validate props indentation in JSX
800
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-indent-props.md
801
- "react/jsx-indent-props": ["error", 2],
802
- // Validate JSX has key prop when in array or iterator
803
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-key.md
804
- // Turned off because it has too many false positives
805
- "react/jsx-key": "warn",
806
- // Limit maximum of props on a single line in JSX
807
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-max-props-per-line.md
808
- "react/jsx-max-props-per-line": ["error", { maximum: 1, when: "multiline" }],
809
- // Prevent usage of .bind() in JSX props
810
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-bind.md
811
- "react/jsx-no-bind": [
812
- "error",
813
- {
814
- ignoreRefs: true,
815
- allowArrowFunctions: true,
816
- allowFunctions: false,
817
- allowBind: false,
818
- ignoreDOMComponents: true
819
- }
820
- ],
821
- // Prevent duplicate props in JSX
822
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-duplicate-props.md
823
- "react/jsx-no-duplicate-props": ["error", { ignoreCase: true }],
824
- // Prevent usage of unwrapped JSX strings
825
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-literals.md
826
- "react/jsx-no-literals": ["off", { noStrings: true }],
827
- // Disallow undeclared variables in JSX
828
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-undef.md
829
- "react/jsx-no-undef": "error",
830
- // Deprecated in favor of react/jsx-sort-props
831
- "react/jsx-sort-prop-types": "off",
832
- /**
833
- * Require props to be sorted alphabetically.
834
- *
835
- * 🔧 Fixable - https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-sort-props.md
836
- */
837
- "react/jsx-sort-props": [
838
- "warn",
839
- {
840
- ignoreCase: true,
841
- callbacksLast: false,
842
- shorthandFirst: false,
843
- shorthandLast: false,
844
- noSortAlphabetically: false,
845
- reservedFirst: true
846
- }
847
- ],
848
- // Enforce defaultProps declarations alphabetical sorting
849
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-sort-default-props.md
850
- "react/sort-default-props": [
851
- "warn",
852
- {
853
- ignoreCase: true
854
- }
855
- ],
856
- // Prevent React to be incorrectly marked as unused
857
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-uses-react.md
858
- "react/jsx-uses-react": ["error"],
859
- // Prevent variables used in JSX to be incorrectly marked as unused
860
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md
861
- "react/jsx-uses-vars": "error",
862
- // Prevent usage of dangerous JSX properties
863
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger.md
864
- "react/no-danger": "warn",
865
- // Prevent usage of deprecated methods
866
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-deprecated.md
867
- "react/no-deprecated": ["error"],
868
- // Prevent usage of setState in componentDidMount
869
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-mount-set-state.md
870
- // this is necessary for server-rendering
871
- "react/no-did-mount-set-state": "off",
872
- // Prevent usage of setState in componentDidUpdate
873
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-did-update-set-state.md
874
- "react/no-did-update-set-state": "error",
875
- // Prevent usage of setState in componentWillUpdate
876
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-will-update-set-state.md
877
- "react/no-will-update-set-state": "error",
878
- // Prevent direct mutation of this.state
879
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-direct-mutation-state.md
880
- "react/no-direct-mutation-state": "off",
881
- // Prevent usage of isMounted
882
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-is-mounted.md
883
- "react/no-is-mounted": "error",
884
- // Prevent multiple component definition per file
885
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
886
- "react/no-multi-comp": "off",
887
- // Prevent usage of setState
888
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-set-state.md
889
- "react/no-set-state": "off",
890
- // Prevent using string references
891
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-string-refs.md
892
- "react/no-string-refs": "error",
893
- // Prevent usage of unknown DOM property
894
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md
895
- "react/no-unknown-property": "error",
896
- // Require ES6 class declarations over React.createClass
897
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-es6-class.md
898
- "react/prefer-es6-class": ["error", "always"],
899
- // Require stateless functions when not using lifecycle methods, setState or ref
900
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md
901
- "react/prefer-stateless-function": ["error", { ignorePureComponents: true }],
902
- // Require render() methods to return something
903
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-render-return.md
904
- "react/require-render-return": "error",
905
- // Enforce component methods order
906
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/sort-comp.md
907
- "react/sort-comp": [
908
- "error",
909
- {
910
- order: [
911
- "static-variables",
912
- "static-methods",
913
- "instance-variables",
914
- "lifecycle",
915
- "/^handle.+$/",
916
- "/^on.+$/",
917
- "getters",
918
- "setters",
919
- "/^(get|set)(?!(InitialState$|DefaultProps$|ChildContext$)).+$/",
920
- "instance-methods",
921
- "everything-else",
922
- "rendering"
923
- ],
924
- groups: {
925
- lifecycle: [
926
- "displayName",
927
- "propTypes",
928
- "contextTypes",
929
- "childContextTypes",
930
- "mixins",
931
- "statics",
932
- "defaultProps",
933
- "constructor",
934
- "getDefaultProps",
935
- "getInitialState",
936
- "state",
937
- "getChildContext",
938
- "getDerivedStateFromProps",
939
- "componentWillMount",
940
- "UNSAFE_componentWillMount",
941
- "componentDidMount",
942
- "componentWillReceiveProps",
943
- "UNSAFE_componentWillReceiveProps",
944
- "shouldComponentUpdate",
945
- "componentWillUpdate",
946
- "UNSAFE_componentWillUpdate",
947
- "getSnapshotBeforeUpdate",
948
- "componentDidUpdate",
949
- "componentDidCatch",
950
- "componentWillUnmount"
951
- ],
952
- rendering: ["/^render.+$/", "render"]
953
- }
954
- }
955
- ],
956
- // Prevent missing parentheses around multilines JSX
957
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-wrap-multilines.md
958
- "react/jsx-wrap-multilines": [
959
- "error",
960
- {
961
- declaration: "parens-new-line",
962
- assignment: "parens-new-line",
963
- return: "parens-new-line",
964
- arrow: "parens-new-line",
965
- condition: "parens-new-line",
966
- logical: "parens-new-line",
967
- prop: "parens-new-line"
968
- }
969
- ],
970
- // Require that the first prop in a JSX element be on a new line when the element is multiline
971
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md
972
- "react/jsx-first-prop-new-line": ["error", "multiline-multiprop"],
973
- // Enforce spacing around jsx equals signs
974
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-equals-spacing.md
975
- "react/jsx-equals-spacing": ["error", "never"],
976
- // Enforce JSX indentation
977
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md
978
- "react/jsx-indent": ["error", 2],
979
- // only ".jsx", ".tsx", or ".mdx" files may have JSX
980
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md
981
- "react/jsx-filename-extension": [
982
- "error",
983
- { extensions: [".jsx", ".tsx", ".mdx"] }
984
- ],
985
- // prevent accidental JS comments from being injected into JSX as text
986
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-comment-textnodes.md
987
- "react/jsx-no-comment-textnodes": "error",
988
- // disallow using React.render/ReactDOM.render's return value
989
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-render-return-value.md
990
- "react/no-render-return-value": "error",
991
- // require a shouldComponentUpdate method, or PureRenderMixin
992
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-optimization.md
993
- "react/require-optimization": ["off", { allowDecorators: [] }],
994
- // warn against using findDOMNode()
995
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md
996
- "react/no-find-dom-node": "error",
997
- // Forbid certain props on Components
998
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-component-props.md
999
- "react/forbid-component-props": ["off", { forbid: [] }],
1000
- // Forbid certain elements
1001
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-elements.md
1002
- "react/forbid-elements": ["off", { forbid: [] }],
1003
- // Prevent problem with children and props.dangerouslySetInnerHTML
1004
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-danger-with-children.md
1005
- "react/no-danger-with-children": "error",
1006
- // Prevent unused propType definitions
1007
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unused-prop-types.md
1008
- "react/no-unused-prop-types": [
1009
- "error",
1010
- {
1011
- customValidators: [],
1012
- skipShapeProps: true
1013
- }
1014
- ],
1015
- // Require style prop value be an object or var
1016
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/style-prop-object.md
1017
- "react/style-prop-object": "error",
1018
- // Prevent invalid characters from appearing in markup
1019
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-unescaped-entities.md
1020
- "react/no-unescaped-entities": "error",
1021
- // Prevent passing of children as props
1022
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md
1023
- "react/no-children-prop": "error",
1024
- // Validate whitespace in and around the JSX opening and closing brackets
1025
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-tag-spacing.md
1026
- "react/jsx-tag-spacing": [
1027
- "error",
1028
- {
1029
- closingSlash: "never",
1030
- beforeSelfClosing: "always",
1031
- afterOpening: "never",
1032
- beforeClosing: "never"
1033
- }
1034
- ],
1035
- // Enforce spaces before the closing bracket of self-closing JSX elements
1036
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-space-before-closing.md
1037
- // Deprecated in favor of jsx-tag-spacing
1038
- "react/jsx-space-before-closing": ["off", "always"],
1039
- // Enforce a defaultProps definition for every prop that is not a required prop
1040
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/require-default-props.md
1041
- "react/require-default-props": [
1042
- "error",
1043
- {
1044
- forbidDefaultForRequired: true
1045
- }
1046
- ],
1047
- // Forbids using non-exported propTypes
1048
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/forbid-foreign-prop-types.md
1049
- // this is intentionally set to "warn". it would be "error",
1050
- // but it's only critical if you're stripping propTypes in production.
1051
- "react/forbid-foreign-prop-types": ["warn", { allowInPropTypes: true }],
1052
- // Prevent void DOM elements from receiving children
1053
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/void-dom-elements-no-children.md
1054
- "react/void-dom-elements-no-children": "error",
1055
- // Enforce all defaultProps have a corresponding non-required PropType
1056
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/default-props-match-prop-types.md
1057
- "react/default-props-match-prop-types": [
1058
- "error",
1059
- { allowRequiredDefaults: false }
1060
- ],
1061
- // Prevent usage of shouldComponentUpdate when extending React.PureComponent
1062
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/9e13ae2c51e44872b45cc15bf1ac3a72105bdd0e/docs/rules/no-redundant-should-component-update.md
1063
- "react/no-redundant-should-component-update": "error",
1064
- // Prevent unused state values
1065
- // https://github.com/jsx-eslint/eslint-plugin-react/pull/1103/
1066
- "react/no-unused-state": "error",
1067
- // Enforces consistent naming for boolean props
1068
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/boolean-prop-naming.md
1069
- "react/boolean-prop-naming": [
1070
- "off",
1071
- {
1072
- propTypeNames: ["bool", "mutuallyExclusiveTrueProps"],
1073
- rule: "^(is|has)[A-Z]([A-Za-z0-9]?)+",
1074
- message: ""
1075
- }
1076
- ],
1077
- // Prevents common casing typos
1078
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/73abadb697034b5ccb514d79fb4689836fe61f91/docs/rules/no-typos.md
1079
- "react/no-typos": "error",
1080
- // One JSX Element Per Line
1081
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/jsx-one-expression-per-line.md
1082
- "react/jsx-one-expression-per-line": ["error", { allow: "single-child" }],
1083
- // Enforce consistent usage of destructuring assignment of props, state, and context
1084
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/destructuring-assignment.md
1085
- "react/destructuring-assignment": ["error", "always"],
1086
- // Prevent using this.state within a this.setState
1087
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-access-state-in-setstate.md
1088
- "react/no-access-state-in-setstate": "error",
1089
- // Ensures inline tags are not rendered without spaces between them
1090
- "react/jsx-child-element-spacing": "off",
1091
- // Prevent this from being used in stateless functional components
1092
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/843d71a432baf0f01f598d7cf1eea75ad6896e4b/docs/rules/no-this-in-sfc.md
1093
- "react/no-this-in-sfc": "error",
1094
- // Validate JSX maximum depth
1095
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/abe8381c0d6748047224c430ce47f02e40160ed0/docs/rules/jsx-max-depth.md
1096
- "react/jsx-max-depth": "off",
1097
- // Disallow multiple spaces between inline JSX props
1098
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/ac102885765be5ff37847a871f239c6703e1c7cc/docs/rules/jsx-props-no-multi-spaces.md
1099
- "react/jsx-props-no-multi-spaces": "error",
1100
- // Prevent usage of UNSAFE_ methods
1101
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/157cc932be2cfaa56b3f5b45df6f6d4322a2f660/docs/rules/no-unsafe.md
1102
- "react/no-unsafe": "off",
1103
- // Enforce linebreaks in curly braces in JSX attributes and expressions.
1104
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md
1105
- "react/jsx-curly-newline": [
1106
- "error",
1107
- {
1108
- multiline: "consistent",
1109
- singleline: "consistent"
1110
- }
1111
- ],
1112
- // Enforce state initialization style
1113
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/state-in-constructor.md
1114
- // TODO: set to "never" once babel-preset-airbnb supports public class fields
1115
- "react/state-in-constructor": ["error", "always"],
1116
- // Enforces where React component static properties should be positioned
1117
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/static-property-placement.md
1118
- // TODO: set to "static public field" once babel-preset-airbnb supports public class fields
1119
- "react/static-property-placement": ["error", "property assignment"],
1120
- // Disallow JSX props spreading
1121
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
1122
- "react/jsx-props-no-spreading": [
1123
- "off",
1124
- {
1125
- html: "enforce",
1126
- custom: "enforce",
1127
- explicitSpread: "ignore",
1128
- exceptions: []
1129
- }
1130
- ],
1131
- // Enforce that props are read-only
1132
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/prefer-read-only-props.md
1133
- "react/prefer-read-only-props": "off",
1134
- // Prevent usage of `javascript:` URLs
1135
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-no-script-url.md
1136
- "react/jsx-no-script-url": [
1137
- "error",
1138
- [
1139
- {
1140
- name: "Link",
1141
- props: ["to"]
1142
- }
1143
- ]
1144
- ],
1145
- // Prevent adjacent inline elements not separated by whitespace
1146
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md
1147
- // TODO: enable? semver-major
1148
- "react/no-adjacent-inline-elements": "off",
1149
- // Enforce a new line after jsx elements and expressions
1150
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-newline.md
1151
- "react/jsx-newline": "off",
1152
- // Prevent react contexts from taking non-stable values
1153
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/e2eaadae316f9506d163812a09424eb42698470a/docs/rules/jsx-no-constructed-context-values.md
1154
- "react/jsx-no-constructed-context-values": "error",
1155
- // Enforce that namespaces are not used in React elements
1156
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/8785c169c25b09b33c95655bf508cf46263bc53f/docs/rules/no-namespace.md
1157
- "react/no-namespace": "error",
1158
- // Prefer exact proptype definitions
1159
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/8785c169c25b09b33c95655bf508cf46263bc53f/docs/rules/prefer-exact-props.md
1160
- "react/prefer-exact-props": "error",
1161
- // Lifecycle methods should be methods on the prototype, not class fields
1162
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-arrow-function-lifecycle.md
1163
- "react/no-arrow-function-lifecycle": "error",
1164
- // Prevent usage of invalid attributes
1165
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-invalid-html-attribute.md
1166
- "react/no-invalid-html-attribute": "error",
1167
- // Prevent declaring unused methods of component class
1168
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/21e01b61af7a38fc86d94f27eb66cda8054582ed/docs/rules/no-unused-class-component-methods.md
1169
- "react/no-unused-class-component-methods": "error",
1170
- // Enforce sandbox attribute on iframe elements
1171
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/c8833f301314dab3e79ef7ac4cf863e4d5fa0019/docs/rules/iframe-missing-sandbox.md
1172
- // TODO: semver-major, enable
1173
- "react/iframe-missing-sandbox": "off",
1174
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/66b58dd4864678eb869a7bf434c72ff7ac530eb1/docs/rules/no-object-type-as-default-prop.md
1175
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/66b58dd4864678eb869a7bf434c72ff7ac530eb1/docs/rules/no-object-type-as-default-prop.md
1176
- // TODO: semver-major, enable
1177
- "react/no-object-type-as-default-prop": "off",
1178
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/66b58dd4864678eb869a7bf434c72ff7ac530eb1/docs/rules/sort-default-props.md
1179
- // https://github.com/jsx-eslint/eslint-plugin-react/blob/66b58dd4864678eb869a7bf434c72ff7ac530eb1/docs/rules/sort-default-props.md
1180
- // TODO: semver-major, enable?
1181
- "react/sort-default-props": [
1182
- "off",
1183
- {
1184
- ignoreCase: false
1185
- }
1186
- ]
1187
- };
1188
-
1189
- const config$2 = {
1190
- // Enforce Rules of Hooks
1191
- // https://github.com/facebook/react/blob/c11015ff4f610ac2924d1fc6d569a17657a404fd/packages/eslint-plugin-react-hooks/src/RulesOfHooks.js
1192
- "react-hooks/rules-of-hooks": "error",
1193
- // Verify the list of the dependencies for Hooks like useEffect and similar
1194
- // https://github.com/facebook/react/blob/1204c789776cb01fbaf3e9f032e7e2ba85a44137/packages/eslint-plugin-react-hooks/src/ExhaustiveDeps.js
1195
- "react-hooks/exhaustive-deps": "warn"
1196
- };
1197
-
1198
349
  const config$1 = {
1199
350
  /*************************************************************
1200
351
  *
@@ -13838,7 +12989,6 @@ function getStormConfig(options = {
13838
12989
  "window": "readonly",
13839
12990
  "Storm": "readonly"
13840
12991
  },
13841
- ecmaVersion: "latest",
13842
12992
  parserOptions: {
13843
12993
  emitDecoratorMetadata: true,
13844
12994
  experimentalDecorators: true,
@@ -13850,7 +13000,10 @@ function getStormConfig(options = {
13850
13000
  "**/dist/**",
13851
13001
  "**/coverage/**",
13852
13002
  "**/tmp/**",
13853
- "**/.nx/**"
13003
+ "**/.nx/**",
13004
+ "**/.tamagui/**",
13005
+ "**/.next/**",
13006
+ ...options.ignores || []
13854
13007
  ],
13855
13008
  ...options.parserOptions
13856
13009
  }
@@ -13882,89 +13035,52 @@ function getStormConfig(options = {
13882
13035
  ...options.rules ?? {}
13883
13036
  },
13884
13037
  ignores: [
13885
- "dist",
13886
- "coverage",
13887
- "tmp",
13888
- ".nx",
13889
- "node_modules",
13038
+ "**/node_modules/**",
13039
+ "**/dist/**",
13040
+ "**/coverage/**",
13041
+ "**/tmp/**",
13042
+ "**/.nx/**",
13043
+ "**/.tamagui/**",
13044
+ "**/.next/**",
13890
13045
  ...options.ignores || []
13891
13046
  ]
13892
13047
  };
13893
13048
  configs.push(typescriptConfig);
13894
13049
  if (options.react) {
13895
- const reactConfig = {
13896
- files: ["**/*.tsx"],
13897
- languageOptions: {
13898
- globals: {
13899
- ...Object.fromEntries(
13900
- Object.keys(globals).flatMap(
13901
- (group) => Object.keys(globals[group]).map((key) => [
13902
- key,
13903
- "readonly"
13904
- ])
13905
- )
13906
- ),
13907
- ...globals.browser,
13908
- ...globals.node,
13909
- "window": "readonly",
13910
- "Storm": "readonly"
13911
- },
13912
- ecmaVersion: "latest",
13913
- parserOptions: {
13914
- emitDecoratorMetadata: true,
13915
- experimentalDecorators: true,
13916
- project: options.tsconfig ? options.tsconfig : "./tsconfig.base.json",
13917
- projectService: true,
13918
- sourceType: "module",
13919
- projectFolderIgnoreList: [
13920
- "**/node_modules/**",
13921
- "**/dist/**",
13922
- "**/coverage/**",
13923
- "**/tmp/**",
13924
- "**/.nx/**"
13925
- ],
13926
- ecmaFeatures: {
13927
- jsx: true
13928
- },
13929
- ...options.parserOptions
13930
- }
13931
- },
13932
- settings: {
13933
- react: {
13934
- version: "detect"
13935
- }
13936
- },
13937
- plugins: {
13938
- react,
13939
- "react-hooks": reactHooks,
13940
- "jsx-a11y": jsxA11y
13050
+ const reactConfigs = [
13051
+ {
13052
+ files: ["**/*.tsx"],
13053
+ ignores: [
13054
+ "dist",
13055
+ "coverage",
13056
+ "tmp",
13057
+ ".nx",
13058
+ "node_modules",
13059
+ ...options.ignores || []
13060
+ ],
13061
+ ...react
13941
13062
  },
13942
- rules: {
13943
- ...config$3,
13944
- ...config$2,
13945
- ...config$4,
13946
- ...options.react ?? {}
13063
+ {
13064
+ files: ["**/*.tsx"],
13065
+ ...reactHooks.configs?.recommended
13947
13066
  },
13948
- ignores: [
13949
- "dist",
13950
- "coverage",
13951
- "tmp",
13952
- ".nx",
13953
- "node_modules",
13954
- ...options.ignores || []
13955
- ]
13956
- };
13957
- if (options.useReactCompiler) {
13958
- reactConfig.plugins = {
13959
- ...reactConfig.plugins,
13960
- "react-compiler": reactCompiler
13961
- };
13962
- reactConfig.rules = {
13963
- ...reactConfig.rules,
13964
- "react-compiler/react-compiler": "error"
13965
- };
13966
- }
13967
- configs.push(reactConfig);
13067
+ {
13068
+ files: ["**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}"],
13069
+ ...jsxA11y.flatConfigs?.recommended
13070
+ }
13071
+ ];
13072
+ if (options.useReactCompiler === true) {
13073
+ reactConfigs.push({
13074
+ files: ["**/*.tsx"],
13075
+ plugins: {
13076
+ "react-compiler": reactCompiler
13077
+ },
13078
+ rules: {
13079
+ "react-compiler/react-compiler": "error"
13080
+ }
13081
+ });
13082
+ }
13083
+ configs.push(...reactConfigs);
13968
13084
  }
13969
13085
  if (options.nextFiles && options.nextFiles.length > 0) {
13970
13086
  configs.push({