eslint-plugin-react-x 1.16.1-next.0 → 1.16.1-next.3

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/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as JSX7 from '@eslint-react/jsx';
2
- import { F, O, MutRef, isNullable, isString } from '@eslint-react/tools';
2
+ import { F, O, isString, MutRef, isNullable } from '@eslint-react/tools';
3
3
  import { createRuleForPlugin, decodeSettings, unsafeReadSettings } from '@eslint-react/shared';
4
4
  import * as AST11 from '@eslint-react/ast';
5
5
  import { isForwardRefCall, isThisSetState, isClassComponent, isChildrenCount, isChildrenForEach, isChildrenMap, isChildrenOnly, isChildrenToArray, useComponentCollectorLegacy, isCloneElementCall, isCreateRefCall, isComponentName, isChildrenToArrayCall, useComponentCollector, ERFunctionComponentFlag, ERComponentHint, isDirectValueOfRenderPropertyLoose, isDeclaredInRenderPropLoose, isInsideCreateElementProps, isInsideRenderMethod, ERClassComponentFlag, isFragmentElement, isCreateElementCall, isInitializedFromReact } from '@eslint-react/core';
@@ -14,7 +14,7 @@ import { getTypeImmutability, isUnknown, isImmutable, isReadonlyShallow, isReado
14
14
 
15
15
  // package.json
16
16
  var name = "eslint-plugin-react-x";
17
- var version = "1.16.1-next.0";
17
+ var version = "1.16.1-next.3";
18
18
  var createRule = createRuleForPlugin("x");
19
19
 
20
20
  // src/rules/avoid-shorthand-boolean.ts
@@ -106,7 +106,43 @@ var ensure_forward_ref_using_ref_default = createRule({
106
106
  },
107
107
  defaultOptions: []
108
108
  });
109
- var RULE_NAME4 = "jsx-uses-vars";
109
+ var RULE_NAME4 = "jsx-no-duplicate-props";
110
+ var jsx_no_duplicate_props_default = createRule({
111
+ meta: {
112
+ type: "problem",
113
+ docs: {
114
+ description: "disallow duplicate props"
115
+ },
116
+ messages: {
117
+ jsxNoDuplicateProps: "Duplicate prop '{{name}}'"
118
+ },
119
+ schema: []
120
+ },
121
+ name: RULE_NAME4,
122
+ create(context) {
123
+ return {
124
+ JSXOpeningElement(node) {
125
+ const props = [];
126
+ for (const attr of node.attributes) {
127
+ if (attr.type === AST_NODE_TYPES.JSXSpreadAttribute) continue;
128
+ const name2 = attr.name.name;
129
+ if (!isString(name2)) continue;
130
+ if (!props.includes(name2)) {
131
+ props.push(name2);
132
+ continue;
133
+ }
134
+ context.report({
135
+ messageId: "jsxNoDuplicateProps",
136
+ node: attr,
137
+ data: { name: name2 }
138
+ });
139
+ }
140
+ }
141
+ };
142
+ },
143
+ defaultOptions: []
144
+ });
145
+ var RULE_NAME5 = "jsx-uses-vars";
110
146
  var jsx_uses_vars_default = createRule({
111
147
  meta: {
112
148
  type: "problem",
@@ -119,7 +155,7 @@ var jsx_uses_vars_default = createRule({
119
155
  },
120
156
  schema: []
121
157
  },
122
- name: RULE_NAME4,
158
+ name: RULE_NAME5,
123
159
  create(context) {
124
160
  function getName5(node) {
125
161
  switch (node.type) {
@@ -142,7 +178,7 @@ var jsx_uses_vars_default = createRule({
142
178
  },
143
179
  defaultOptions: []
144
180
  });
145
- var RULE_NAME5 = "no-access-state-in-setstate";
181
+ var RULE_NAME6 = "no-access-state-in-setstate";
146
182
  function getName(node) {
147
183
  if (node.type === AST_NODE_TYPES.TSAsExpression) {
148
184
  return getName(node.expression);
@@ -169,7 +205,7 @@ var no_access_state_in_setstate_default = createRule({
169
205
  },
170
206
  schema: []
171
207
  },
172
- name: RULE_NAME5,
208
+ name: RULE_NAME6,
173
209
  create(context) {
174
210
  if (!context.sourceCode.text.includes("setState")) return {};
175
211
  const classStack = [];
@@ -240,7 +276,7 @@ var no_access_state_in_setstate_default = createRule({
240
276
  },
241
277
  defaultOptions: []
242
278
  });
243
- var RULE_NAME6 = "no-array-index-key";
279
+ var RULE_NAME7 = "no-array-index-key";
244
280
  var reactChildrenMethod = ["forEach", "map"];
245
281
  var iteratorFunctionIndexParamPosition = /* @__PURE__ */ new Map([
246
282
  ["every", 1],
@@ -312,7 +348,7 @@ var no_array_index_key_default = createRule({
312
348
  },
313
349
  schema: []
314
350
  },
315
- name: RULE_NAME6,
351
+ name: RULE_NAME7,
316
352
  create(context) {
317
353
  const indexParamNames = [];
318
354
  function isArrayIndex(node) {
@@ -380,7 +416,7 @@ var no_array_index_key_default = createRule({
380
416
  },
381
417
  defaultOptions: []
382
418
  });
383
- var RULE_NAME7 = "no-children-count";
419
+ var RULE_NAME8 = "no-children-count";
384
420
  var no_children_count_default = createRule({
385
421
  meta: {
386
422
  type: "problem",
@@ -392,7 +428,7 @@ var no_children_count_default = createRule({
392
428
  },
393
429
  schema: []
394
430
  },
395
- name: RULE_NAME7,
431
+ name: RULE_NAME8,
396
432
  create(context) {
397
433
  return {
398
434
  MemberExpression(node) {
@@ -407,7 +443,7 @@ var no_children_count_default = createRule({
407
443
  },
408
444
  defaultOptions: []
409
445
  });
410
- var RULE_NAME8 = "no-children-for-each";
446
+ var RULE_NAME9 = "no-children-for-each";
411
447
  var no_children_for_each_default = createRule({
412
448
  meta: {
413
449
  type: "problem",
@@ -419,7 +455,7 @@ var no_children_for_each_default = createRule({
419
455
  },
420
456
  schema: []
421
457
  },
422
- name: RULE_NAME8,
458
+ name: RULE_NAME9,
423
459
  create(context) {
424
460
  return {
425
461
  MemberExpression(node) {
@@ -434,7 +470,7 @@ var no_children_for_each_default = createRule({
434
470
  },
435
471
  defaultOptions: []
436
472
  });
437
- var RULE_NAME9 = "no-children-map";
473
+ var RULE_NAME10 = "no-children-map";
438
474
  var no_children_map_default = createRule({
439
475
  meta: {
440
476
  type: "problem",
@@ -446,7 +482,7 @@ var no_children_map_default = createRule({
446
482
  },
447
483
  schema: []
448
484
  },
449
- name: RULE_NAME9,
485
+ name: RULE_NAME10,
450
486
  create(context) {
451
487
  return {
452
488
  MemberExpression(node) {
@@ -461,7 +497,7 @@ var no_children_map_default = createRule({
461
497
  },
462
498
  defaultOptions: []
463
499
  });
464
- var RULE_NAME10 = "no-children-only";
500
+ var RULE_NAME11 = "no-children-only";
465
501
  var no_children_only_default = createRule({
466
502
  meta: {
467
503
  type: "problem",
@@ -473,7 +509,7 @@ var no_children_only_default = createRule({
473
509
  },
474
510
  schema: []
475
511
  },
476
- name: RULE_NAME10,
512
+ name: RULE_NAME11,
477
513
  create(context) {
478
514
  return {
479
515
  MemberExpression(node) {
@@ -488,7 +524,7 @@ var no_children_only_default = createRule({
488
524
  },
489
525
  defaultOptions: []
490
526
  });
491
- var RULE_NAME11 = "no-children-prop";
527
+ var RULE_NAME12 = "no-children-prop";
492
528
  var no_children_prop_default = createRule({
493
529
  meta: {
494
530
  type: "problem",
@@ -500,7 +536,7 @@ var no_children_prop_default = createRule({
500
536
  },
501
537
  schema: []
502
538
  },
503
- name: RULE_NAME11,
539
+ name: RULE_NAME12,
504
540
  create(context) {
505
541
  return {
506
542
  JSXElement(node) {
@@ -513,7 +549,7 @@ var no_children_prop_default = createRule({
513
549
  },
514
550
  defaultOptions: []
515
551
  });
516
- var RULE_NAME12 = "no-children-to-array";
552
+ var RULE_NAME13 = "no-children-to-array";
517
553
  var no_children_to_array_default = createRule({
518
554
  meta: {
519
555
  type: "problem",
@@ -525,7 +561,7 @@ var no_children_to_array_default = createRule({
525
561
  },
526
562
  schema: []
527
563
  },
528
- name: RULE_NAME12,
564
+ name: RULE_NAME13,
529
565
  create(context) {
530
566
  return {
531
567
  MemberExpression(node) {
@@ -540,7 +576,7 @@ var no_children_to_array_default = createRule({
540
576
  },
541
577
  defaultOptions: []
542
578
  });
543
- var RULE_NAME13 = "no-class-component";
579
+ var RULE_NAME14 = "no-class-component";
544
580
  var isComponentDidCatch = isMatching({
545
581
  key: {
546
582
  type: AST_NODE_TYPES.Identifier,
@@ -568,7 +604,7 @@ var no_class_component_default = createRule({
568
604
  },
569
605
  schema: []
570
606
  },
571
- name: RULE_NAME13,
607
+ name: RULE_NAME14,
572
608
  create(context) {
573
609
  if (!context.sourceCode.text.includes("Component")) return {};
574
610
  const { ctx, listeners } = useComponentCollectorLegacy();
@@ -592,7 +628,7 @@ var no_class_component_default = createRule({
592
628
  },
593
629
  defaultOptions: []
594
630
  });
595
- var RULE_NAME14 = "no-clone-element";
631
+ var RULE_NAME15 = "no-clone-element";
596
632
  var no_clone_element_default = createRule({
597
633
  meta: {
598
634
  type: "problem",
@@ -604,7 +640,7 @@ var no_clone_element_default = createRule({
604
640
  },
605
641
  schema: []
606
642
  },
607
- name: RULE_NAME14,
643
+ name: RULE_NAME15,
608
644
  create(context) {
609
645
  return {
610
646
  CallExpression(node) {
@@ -618,7 +654,7 @@ var no_clone_element_default = createRule({
618
654
  },
619
655
  defaultOptions: []
620
656
  });
621
- var RULE_NAME15 = "no-comment-textnodes";
657
+ var RULE_NAME16 = "no-comment-textnodes";
622
658
  var no_comment_textnodes_default = createRule({
623
659
  meta: {
624
660
  type: "problem",
@@ -630,7 +666,7 @@ var no_comment_textnodes_default = createRule({
630
666
  },
631
667
  schema: []
632
668
  },
633
- name: RULE_NAME15,
669
+ name: RULE_NAME16,
634
670
  create(context) {
635
671
  function hasCommentLike(node) {
636
672
  if (AST11.isOneOf([AST_NODE_TYPES.JSXAttribute, AST_NODE_TYPES.JSXExpressionContainer])(node.parent)) return false;
@@ -654,7 +690,7 @@ var no_comment_textnodes_default = createRule({
654
690
  },
655
691
  defaultOptions: []
656
692
  });
657
- var RULE_NAME16 = "no-complex-conditional-rendering";
693
+ var RULE_NAME17 = "no-complex-conditional-rendering";
658
694
  var no_complex_conditional_rendering_default = createRule({
659
695
  meta: {
660
696
  type: "problem",
@@ -666,7 +702,7 @@ var no_complex_conditional_rendering_default = createRule({
666
702
  },
667
703
  schema: []
668
704
  },
669
- name: RULE_NAME16,
705
+ name: RULE_NAME17,
670
706
  create(context) {
671
707
  function getReportDescriptor(node) {
672
708
  const jsxExpContainer = node.parent?.parent;
@@ -688,7 +724,7 @@ var no_complex_conditional_rendering_default = createRule({
688
724
  },
689
725
  defaultOptions: []
690
726
  });
691
- var RULE_NAME17 = "no-component-will-mount";
727
+ var RULE_NAME18 = "no-component-will-mount";
692
728
  function isComponentWillMount(node) {
693
729
  return AST11.isOneOf([AST_NODE_TYPES.MethodDefinition, AST_NODE_TYPES.PropertyDefinition])(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "componentWillMount";
694
730
  }
@@ -703,7 +739,7 @@ var no_component_will_mount_default = createRule({
703
739
  },
704
740
  schema: []
705
741
  },
706
- name: RULE_NAME17,
742
+ name: RULE_NAME18,
707
743
  create(context) {
708
744
  if (!context.sourceCode.text.includes("componentWillMount")) return {};
709
745
  const { ctx, listeners } = useComponentCollectorLegacy();
@@ -727,7 +763,7 @@ var no_component_will_mount_default = createRule({
727
763
  },
728
764
  defaultOptions: []
729
765
  });
730
- var RULE_NAME18 = "no-component-will-receive-props";
766
+ var RULE_NAME19 = "no-component-will-receive-props";
731
767
  function isComponentWillUpdate(node) {
732
768
  return AST11.isOneOf([AST_NODE_TYPES.MethodDefinition, AST_NODE_TYPES.PropertyDefinition])(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "componentWillReceiveProps";
733
769
  }
@@ -742,7 +778,7 @@ var no_component_will_receive_props_default = createRule({
742
778
  },
743
779
  schema: []
744
780
  },
745
- name: RULE_NAME18,
781
+ name: RULE_NAME19,
746
782
  create(context) {
747
783
  if (!context.sourceCode.text.includes("componentWillReceiveProps")) return {};
748
784
  const { ctx, listeners } = useComponentCollectorLegacy();
@@ -766,7 +802,7 @@ var no_component_will_receive_props_default = createRule({
766
802
  },
767
803
  defaultOptions: []
768
804
  });
769
- var RULE_NAME19 = "no-component-will-update";
805
+ var RULE_NAME20 = "no-component-will-update";
770
806
  function isComponentWillUpdate2(node) {
771
807
  return AST11.isOneOf([AST_NODE_TYPES.MethodDefinition, AST_NODE_TYPES.PropertyDefinition])(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "componentWillUpdate";
772
808
  }
@@ -781,7 +817,7 @@ var no_component_will_update_default = createRule({
781
817
  },
782
818
  schema: []
783
819
  },
784
- name: RULE_NAME19,
820
+ name: RULE_NAME20,
785
821
  create(context) {
786
822
  if (!context.sourceCode.text.includes("componentWillUpdate")) return {};
787
823
  const { ctx, listeners } = useComponentCollectorLegacy();
@@ -805,7 +841,7 @@ var no_component_will_update_default = createRule({
805
841
  },
806
842
  defaultOptions: []
807
843
  });
808
- var RULE_NAME20 = "no-create-ref";
844
+ var RULE_NAME21 = "no-create-ref";
809
845
  var no_create_ref_default = createRule({
810
846
  meta: {
811
847
  type: "problem",
@@ -817,7 +853,7 @@ var no_create_ref_default = createRule({
817
853
  },
818
854
  schema: []
819
855
  },
820
- name: RULE_NAME20,
856
+ name: RULE_NAME21,
821
857
  create(context) {
822
858
  return {
823
859
  CallExpression(node) {
@@ -829,7 +865,7 @@ var no_create_ref_default = createRule({
829
865
  },
830
866
  defaultOptions: []
831
867
  });
832
- var RULE_NAME21 = "no-default-props";
868
+ var RULE_NAME22 = "no-default-props";
833
869
  var no_default_props_default = createRule({
834
870
  meta: {
835
871
  type: "problem",
@@ -841,7 +877,7 @@ var no_default_props_default = createRule({
841
877
  },
842
878
  schema: []
843
879
  },
844
- name: RULE_NAME21,
880
+ name: RULE_NAME22,
845
881
  create(context) {
846
882
  if (!context.sourceCode.text.includes("defaultProps")) return {};
847
883
  return {
@@ -868,7 +904,7 @@ var no_default_props_default = createRule({
868
904
  },
869
905
  defaultOptions: []
870
906
  });
871
- var RULE_NAME22 = "no-direct-mutation-state";
907
+ var RULE_NAME23 = "no-direct-mutation-state";
872
908
  function getName2(node) {
873
909
  if (node.type === AST_NODE_TYPES.TSAsExpression) {
874
910
  return getName2(node.expression);
@@ -902,7 +938,7 @@ var no_direct_mutation_state_default = createRule({
902
938
  },
903
939
  schema: []
904
940
  },
905
- name: RULE_NAME22,
941
+ name: RULE_NAME23,
906
942
  create(context) {
907
943
  function getReportDescriptor(node) {
908
944
  if (!isAssignmentToThisState(node)) return O.none();
@@ -926,7 +962,7 @@ var no_direct_mutation_state_default = createRule({
926
962
  },
927
963
  defaultOptions: []
928
964
  });
929
- var RULE_NAME23 = "no-duplicate-key";
965
+ var RULE_NAME24 = "no-duplicate-key";
930
966
  var no_duplicate_key_default = createRule({
931
967
  meta: {
932
968
  type: "problem",
@@ -938,7 +974,7 @@ var no_duplicate_key_default = createRule({
938
974
  },
939
975
  schema: []
940
976
  },
941
- name: RULE_NAME23,
977
+ name: RULE_NAME24,
942
978
  create(context) {
943
979
  const isWithinChildrenToArrayRef = MutRef.make(false);
944
980
  function isKeyEqual(a, b) {
@@ -1055,7 +1091,7 @@ var no_duplicate_key_default = createRule({
1055
1091
  },
1056
1092
  defaultOptions: []
1057
1093
  });
1058
- var RULE_NAME24 = "no-implicit-key";
1094
+ var RULE_NAME25 = "no-implicit-key";
1059
1095
  var no_implicit_key_default = createRule({
1060
1096
  meta: {
1061
1097
  type: "problem",
@@ -1067,7 +1103,7 @@ var no_implicit_key_default = createRule({
1067
1103
  },
1068
1104
  schema: []
1069
1105
  },
1070
- name: RULE_NAME24,
1106
+ name: RULE_NAME25,
1071
1107
  create(context) {
1072
1108
  function getReportDescriptor(node) {
1073
1109
  const initialScope = context.sourceCode.getScope(node);
@@ -2871,7 +2907,7 @@ __toESM(require_semver2());
2871
2907
  function unionTypeParts(type) {
2872
2908
  return isUnionType(type) ? type.types : [type];
2873
2909
  }
2874
- var RULE_NAME25 = "no-leaked-conditional-rendering";
2910
+ var RULE_NAME26 = "no-leaked-conditional-rendering";
2875
2911
  var allowedVariants = [
2876
2912
  "any",
2877
2913
  "boolean",
@@ -2988,7 +3024,7 @@ var no_leaked_conditional_rendering_default = createRule({
2988
3024
  },
2989
3025
  schema: []
2990
3026
  },
2991
- name: RULE_NAME25,
3027
+ name: RULE_NAME26,
2992
3028
  create(context) {
2993
3029
  if (!context.sourceCode.text.includes("&&") && !context.sourceCode.text.includes("?")) return {};
2994
3030
  const services = ESLintUtils.getParserServices(context, false);
@@ -3032,7 +3068,7 @@ var no_leaked_conditional_rendering_default = createRule({
3032
3068
  },
3033
3069
  defaultOptions: []
3034
3070
  });
3035
- var RULE_NAME26 = "no-missing-component-display-name";
3071
+ var RULE_NAME27 = "no-missing-component-display-name";
3036
3072
  var no_missing_component_display_name_default = createRule({
3037
3073
  meta: {
3038
3074
  type: "problem",
@@ -3044,7 +3080,7 @@ var no_missing_component_display_name_default = createRule({
3044
3080
  },
3045
3081
  schema: []
3046
3082
  },
3047
- name: RULE_NAME26,
3083
+ name: RULE_NAME27,
3048
3084
  create(context) {
3049
3085
  if (!context.sourceCode.text.includes("memo") && !context.sourceCode.text.includes("forwardRef")) return {};
3050
3086
  const { ctx, listeners } = useComponentCollector(context);
@@ -3068,7 +3104,7 @@ var no_missing_component_display_name_default = createRule({
3068
3104
  },
3069
3105
  defaultOptions: []
3070
3106
  });
3071
- var RULE_NAME27 = "no-missing-key";
3107
+ var RULE_NAME28 = "no-missing-key";
3072
3108
  var no_missing_key_default = createRule({
3073
3109
  meta: {
3074
3110
  type: "problem",
@@ -3081,7 +3117,7 @@ var no_missing_key_default = createRule({
3081
3117
  },
3082
3118
  schema: []
3083
3119
  },
3084
- name: RULE_NAME27,
3120
+ name: RULE_NAME28,
3085
3121
  create(context) {
3086
3122
  const isWithinChildrenToArrayRef = MutRef.make(false);
3087
3123
  function checkIteratorElement(node) {
@@ -3185,7 +3221,7 @@ var no_missing_key_default = createRule({
3185
3221
  },
3186
3222
  defaultOptions: []
3187
3223
  });
3188
- var RULE_NAME28 = "no-nested-components";
3224
+ var RULE_NAME29 = "no-nested-components";
3189
3225
  var no_nested_components_default = createRule({
3190
3226
  meta: {
3191
3227
  type: "problem",
@@ -3198,7 +3234,7 @@ var no_nested_components_default = createRule({
3198
3234
  },
3199
3235
  schema: []
3200
3236
  },
3201
- name: RULE_NAME28,
3237
+ name: RULE_NAME29,
3202
3238
  create(context) {
3203
3239
  const hint = ERComponentHint.SkipMapCallback | ERComponentHint.SkipNullLiteral | ERComponentHint.SkipUndefinedLiteral | ERComponentHint.SkipBooleanLiteral | ERComponentHint.SkipStringLiteral | ERComponentHint.SkipNumberLiteral | ERComponentHint.StrictLogical | ERComponentHint.StrictConditional;
3204
3240
  const collector = useComponentCollector(context, hint);
@@ -3282,7 +3318,7 @@ var no_nested_components_default = createRule({
3282
3318
  },
3283
3319
  defaultOptions: []
3284
3320
  });
3285
- var RULE_NAME29 = "no-prop-types";
3321
+ var RULE_NAME30 = "no-prop-types";
3286
3322
  var no_prop_types_default = createRule({
3287
3323
  meta: {
3288
3324
  type: "problem",
@@ -3294,7 +3330,7 @@ var no_prop_types_default = createRule({
3294
3330
  },
3295
3331
  schema: []
3296
3332
  },
3297
- name: RULE_NAME29,
3333
+ name: RULE_NAME30,
3298
3334
  create(context) {
3299
3335
  if (!context.sourceCode.text.includes("propTypes")) return {};
3300
3336
  return {
@@ -3321,7 +3357,7 @@ var no_prop_types_default = createRule({
3321
3357
  },
3322
3358
  defaultOptions: []
3323
3359
  });
3324
- var RULE_NAME30 = "no-redundant-should-component-update";
3360
+ var RULE_NAME31 = "no-redundant-should-component-update";
3325
3361
  function isShouldComponentUpdate(node) {
3326
3362
  return AST11.isOneOf([AST_NODE_TYPES.MethodDefinition, AST_NODE_TYPES.PropertyDefinition])(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "shouldComponentUpdate";
3327
3363
  }
@@ -3336,7 +3372,7 @@ var no_redundant_should_component_update_default = createRule({
3336
3372
  },
3337
3373
  schema: []
3338
3374
  },
3339
- name: RULE_NAME30,
3375
+ name: RULE_NAME31,
3340
3376
  create(context) {
3341
3377
  if (!context.sourceCode.text.includes("shouldComponentUpdate")) return {};
3342
3378
  const { ctx, listeners } = useComponentCollectorLegacy();
@@ -3364,7 +3400,7 @@ var no_redundant_should_component_update_default = createRule({
3364
3400
  },
3365
3401
  defaultOptions: []
3366
3402
  });
3367
- var RULE_NAME31 = "no-set-state-in-component-did-mount";
3403
+ var RULE_NAME32 = "no-set-state-in-component-did-mount";
3368
3404
  function isComponentDidMount(node) {
3369
3405
  return AST11.isOneOf([AST_NODE_TYPES.MethodDefinition, AST_NODE_TYPES.PropertyDefinition])(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "componentDidMount";
3370
3406
  }
@@ -3379,7 +3415,7 @@ var no_set_state_in_component_did_mount_default = createRule({
3379
3415
  },
3380
3416
  schema: []
3381
3417
  },
3382
- name: RULE_NAME31,
3418
+ name: RULE_NAME32,
3383
3419
  create(context) {
3384
3420
  if (!context.sourceCode.text.includes("componentDidMount")) return {};
3385
3421
  function getReportDescriptor(node) {
@@ -3407,7 +3443,7 @@ var no_set_state_in_component_did_mount_default = createRule({
3407
3443
  },
3408
3444
  defaultOptions: []
3409
3445
  });
3410
- var RULE_NAME32 = "no-set-state-in-component-did-update";
3446
+ var RULE_NAME33 = "no-set-state-in-component-did-update";
3411
3447
  function isComponentDidUpdate(node) {
3412
3448
  return AST11.isOneOf([AST_NODE_TYPES.MethodDefinition, AST_NODE_TYPES.PropertyDefinition])(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "componentDidUpdate";
3413
3449
  }
@@ -3422,7 +3458,7 @@ var no_set_state_in_component_did_update_default = createRule({
3422
3458
  },
3423
3459
  schema: []
3424
3460
  },
3425
- name: RULE_NAME32,
3461
+ name: RULE_NAME33,
3426
3462
  create(context) {
3427
3463
  if (!context.sourceCode.text.includes("componentDidUpdate")) return {};
3428
3464
  function getReportDescriptor(node) {
@@ -3450,7 +3486,7 @@ var no_set_state_in_component_did_update_default = createRule({
3450
3486
  },
3451
3487
  defaultOptions: []
3452
3488
  });
3453
- var RULE_NAME33 = "no-set-state-in-component-will-update";
3489
+ var RULE_NAME34 = "no-set-state-in-component-will-update";
3454
3490
  function isComponentWillUpdate3(node) {
3455
3491
  return AST11.isOneOf([AST_NODE_TYPES.MethodDefinition, AST_NODE_TYPES.PropertyDefinition])(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "componentWillUpdate";
3456
3492
  }
@@ -3465,7 +3501,7 @@ var no_set_state_in_component_will_update_default = createRule({
3465
3501
  },
3466
3502
  schema: []
3467
3503
  },
3468
- name: RULE_NAME33,
3504
+ name: RULE_NAME34,
3469
3505
  create(context) {
3470
3506
  if (!context.sourceCode.text.includes("componentWillUpdate")) return {};
3471
3507
  function getReportDescriptor(node) {
@@ -3493,7 +3529,7 @@ var no_set_state_in_component_will_update_default = createRule({
3493
3529
  },
3494
3530
  defaultOptions: []
3495
3531
  });
3496
- var RULE_NAME34 = "no-string-refs";
3532
+ var RULE_NAME35 = "no-string-refs";
3497
3533
  function containsStringLiteral({ value }) {
3498
3534
  return value?.type === AST_NODE_TYPES.Literal && isString(value.value);
3499
3535
  }
@@ -3513,7 +3549,7 @@ var no_string_refs_default = createRule({
3513
3549
  },
3514
3550
  schema: []
3515
3551
  },
3516
- name: RULE_NAME34,
3552
+ name: RULE_NAME35,
3517
3553
  create(context) {
3518
3554
  return {
3519
3555
  JSXAttribute(node) {
@@ -3529,7 +3565,7 @@ var no_string_refs_default = createRule({
3529
3565
  },
3530
3566
  defaultOptions: []
3531
3567
  });
3532
- var RULE_NAME35 = "no-unsafe-component-will-mount";
3568
+ var RULE_NAME36 = "no-unsafe-component-will-mount";
3533
3569
  function isUnsafeComponentWillMount(node) {
3534
3570
  return AST11.isOneOf([AST_NODE_TYPES.MethodDefinition, AST_NODE_TYPES.PropertyDefinition])(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillMount";
3535
3571
  }
@@ -3544,7 +3580,7 @@ var no_unsafe_component_will_mount_default = createRule({
3544
3580
  },
3545
3581
  schema: []
3546
3582
  },
3547
- name: RULE_NAME35,
3583
+ name: RULE_NAME36,
3548
3584
  create(context) {
3549
3585
  if (!context.sourceCode.text.includes("UNSAFE_componentWillMount")) return {};
3550
3586
  const { ctx, listeners } = useComponentCollectorLegacy();
@@ -3568,7 +3604,7 @@ var no_unsafe_component_will_mount_default = createRule({
3568
3604
  },
3569
3605
  defaultOptions: []
3570
3606
  });
3571
- var RULE_NAME36 = "no-unsafe-component-will-receive-props";
3607
+ var RULE_NAME37 = "no-unsafe-component-will-receive-props";
3572
3608
  function isUnsafeComponentWillReceiveProps(node) {
3573
3609
  return AST11.isOneOf([AST_NODE_TYPES.MethodDefinition, AST_NODE_TYPES.PropertyDefinition])(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillReceiveProps";
3574
3610
  }
@@ -3583,7 +3619,7 @@ var no_unsafe_component_will_receive_props_default = createRule({
3583
3619
  },
3584
3620
  schema: []
3585
3621
  },
3586
- name: RULE_NAME36,
3622
+ name: RULE_NAME37,
3587
3623
  create(context) {
3588
3624
  if (!context.sourceCode.text.includes("UNSAFE_componentWillReceiveProps")) return {};
3589
3625
  const { ctx, listeners } = useComponentCollectorLegacy();
@@ -3607,7 +3643,7 @@ var no_unsafe_component_will_receive_props_default = createRule({
3607
3643
  },
3608
3644
  defaultOptions: []
3609
3645
  });
3610
- var RULE_NAME37 = "no-unsafe-component-will-update";
3646
+ var RULE_NAME38 = "no-unsafe-component-will-update";
3611
3647
  function isUnsafeComponentWillUpdate(node) {
3612
3648
  return AST11.isOneOf([AST_NODE_TYPES.MethodDefinition, AST_NODE_TYPES.PropertyDefinition])(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillUpdate";
3613
3649
  }
@@ -3622,7 +3658,7 @@ var no_unsafe_component_will_update_default = createRule({
3622
3658
  },
3623
3659
  schema: []
3624
3660
  },
3625
- name: RULE_NAME37,
3661
+ name: RULE_NAME38,
3626
3662
  create(context) {
3627
3663
  if (!context.sourceCode.text.includes("UNSAFE_componentWillUpdate")) return {};
3628
3664
  const { ctx, listeners } = useComponentCollectorLegacy();
@@ -3646,7 +3682,7 @@ var no_unsafe_component_will_update_default = createRule({
3646
3682
  },
3647
3683
  defaultOptions: []
3648
3684
  });
3649
- var RULE_NAME38 = "no-unstable-context-value";
3685
+ var RULE_NAME39 = "no-unstable-context-value";
3650
3686
  var no_unstable_context_value_default = createRule({
3651
3687
  meta: {
3652
3688
  type: "problem",
@@ -3660,7 +3696,7 @@ var no_unstable_context_value_default = createRule({
3660
3696
  },
3661
3697
  schema: []
3662
3698
  },
3663
- name: RULE_NAME38,
3699
+ name: RULE_NAME39,
3664
3700
  create(context) {
3665
3701
  const { ctx, listeners } = useComponentCollector(context);
3666
3702
  const possibleValueConstructions = /* @__PURE__ */ new Map();
@@ -3713,7 +3749,7 @@ var no_unstable_context_value_default = createRule({
3713
3749
  },
3714
3750
  defaultOptions: []
3715
3751
  });
3716
- var RULE_NAME39 = "no-unstable-default-props";
3752
+ var RULE_NAME40 = "no-unstable-default-props";
3717
3753
  var no_unstable_default_props_default = createRule({
3718
3754
  meta: {
3719
3755
  type: "problem",
@@ -3725,7 +3761,7 @@ var no_unstable_default_props_default = createRule({
3725
3761
  },
3726
3762
  schema: []
3727
3763
  },
3728
- name: RULE_NAME39,
3764
+ name: RULE_NAME40,
3729
3765
  create(context) {
3730
3766
  const { ctx, listeners } = useComponentCollector(context);
3731
3767
  const possibleDestructuringDeclarators = /* @__PURE__ */ new WeakMap();
@@ -3778,7 +3814,7 @@ var no_unstable_default_props_default = createRule({
3778
3814
  },
3779
3815
  defaultOptions: []
3780
3816
  });
3781
- var RULE_NAME40 = "no-unused-class-component-members";
3817
+ var RULE_NAME41 = "no-unused-class-component-members";
3782
3818
  var LIFECYCLE_METHODS = /* @__PURE__ */ new Set([
3783
3819
  "componentDidCatch",
3784
3820
  "componentDidMount",
@@ -3822,7 +3858,7 @@ var no_unused_class_component_members_default = createRule({
3822
3858
  },
3823
3859
  schema: []
3824
3860
  },
3825
- name: RULE_NAME40,
3861
+ name: RULE_NAME41,
3826
3862
  create(context) {
3827
3863
  const classStack = [];
3828
3864
  const methodStack = [];
@@ -3905,7 +3941,7 @@ var no_unused_class_component_members_default = createRule({
3905
3941
  },
3906
3942
  defaultOptions: []
3907
3943
  });
3908
- var RULE_NAME41 = "no-unused-state";
3944
+ var RULE_NAME42 = "no-unused-state";
3909
3945
  function getName4(node) {
3910
3946
  if (node.type === AST_NODE_TYPES.TSAsExpression) {
3911
3947
  return getName4(node.expression);
@@ -3945,7 +3981,7 @@ var no_unused_state_default = createRule({
3945
3981
  },
3946
3982
  schema: []
3947
3983
  },
3948
- name: RULE_NAME41,
3984
+ name: RULE_NAME42,
3949
3985
  create(context) {
3950
3986
  const classStack = [];
3951
3987
  const methodStack = [];
@@ -4046,7 +4082,7 @@ var no_unused_state_default = createRule({
4046
4082
  },
4047
4083
  defaultOptions: []
4048
4084
  });
4049
- var RULE_NAME42 = "no-useless-fragment";
4085
+ var RULE_NAME43 = "no-useless-fragment";
4050
4086
  function check(node, context, allowExpressions) {
4051
4087
  const initialScope = context.sourceCode.getScope(node);
4052
4088
  if (JSX7.isKeyedElement(node, initialScope)) return;
@@ -4088,7 +4124,7 @@ var no_useless_fragment_default = createRule({
4088
4124
  }
4089
4125
  }]
4090
4126
  },
4091
- name: RULE_NAME42,
4127
+ name: RULE_NAME43,
4092
4128
  create(context, [option]) {
4093
4129
  const { allowExpressions = true } = option;
4094
4130
  return {
@@ -4105,7 +4141,7 @@ var no_useless_fragment_default = createRule({
4105
4141
  allowExpressions: true
4106
4142
  }]
4107
4143
  });
4108
- var RULE_NAME43 = "prefer-destructuring-assignment";
4144
+ var RULE_NAME44 = "prefer-destructuring-assignment";
4109
4145
  function isMemberExpressionWithObjectName(node) {
4110
4146
  return node.object.type === AST_NODE_TYPES.Identifier && "name" in node.object;
4111
4147
  }
@@ -4120,7 +4156,7 @@ var prefer_destructuring_assignment_default = createRule({
4120
4156
  },
4121
4157
  schema: []
4122
4158
  },
4123
- name: RULE_NAME43,
4159
+ name: RULE_NAME44,
4124
4160
  create(context) {
4125
4161
  const { ctx, listeners } = useComponentCollector(context);
4126
4162
  const memberExpressionWithNames = [];
@@ -4175,7 +4211,7 @@ var prefer_destructuring_assignment_default = createRule({
4175
4211
  },
4176
4212
  defaultOptions: []
4177
4213
  });
4178
- var RULE_NAME44 = "prefer-react-namespace-import";
4214
+ var RULE_NAME45 = "prefer-react-namespace-import";
4179
4215
  var prefer_react_namespace_import_default = createRule({
4180
4216
  meta: {
4181
4217
  type: "problem",
@@ -4188,7 +4224,7 @@ var prefer_react_namespace_import_default = createRule({
4188
4224
  },
4189
4225
  schema: []
4190
4226
  },
4191
- name: RULE_NAME44,
4227
+ name: RULE_NAME45,
4192
4228
  create(context) {
4193
4229
  const importSource = decodeSettings(context.settings).importSource ?? "react";
4194
4230
  return {
@@ -4224,7 +4260,7 @@ ${importStringPrefix} ${specifiers} from ${importSourceQuoted}${semiColon}`
4224
4260
  },
4225
4261
  defaultOptions: []
4226
4262
  });
4227
- var RULE_NAME45 = "prefer-read-only-props";
4263
+ var RULE_NAME46 = "prefer-read-only-props";
4228
4264
  function isReadonlyType(type, services) {
4229
4265
  try {
4230
4266
  const im = getTypeImmutability(services.program, type);
@@ -4244,7 +4280,7 @@ var prefer_read_only_props_default = createRule({
4244
4280
  },
4245
4281
  schema: []
4246
4282
  },
4247
- name: RULE_NAME45,
4283
+ name: RULE_NAME46,
4248
4284
  create(context) {
4249
4285
  const services = ESLintUtils.getParserServices(context, false);
4250
4286
  const { ctx, listeners } = useComponentCollector(context);
@@ -4264,7 +4300,7 @@ var prefer_read_only_props_default = createRule({
4264
4300
  },
4265
4301
  defaultOptions: []
4266
4302
  });
4267
- var RULE_NAME46 = "prefer-shorthand-boolean";
4303
+ var RULE_NAME47 = "prefer-shorthand-boolean";
4268
4304
  var prefer_shorthand_boolean_default = createRule({
4269
4305
  meta: {
4270
4306
  type: "problem",
@@ -4277,7 +4313,7 @@ var prefer_shorthand_boolean_default = createRule({
4277
4313
  },
4278
4314
  schema: []
4279
4315
  },
4280
- name: RULE_NAME46,
4316
+ name: RULE_NAME47,
4281
4317
  create(context) {
4282
4318
  function getReportDescriptor(node) {
4283
4319
  const { value } = node;
@@ -4299,7 +4335,7 @@ var prefer_shorthand_boolean_default = createRule({
4299
4335
  },
4300
4336
  defaultOptions: []
4301
4337
  });
4302
- var RULE_NAME47 = "prefer-shorthand-fragment";
4338
+ var RULE_NAME48 = "prefer-shorthand-fragment";
4303
4339
  var prefer_shorthand_fragment_default = createRule({
4304
4340
  meta: {
4305
4341
  type: "problem",
@@ -4311,7 +4347,7 @@ var prefer_shorthand_fragment_default = createRule({
4311
4347
  },
4312
4348
  schema: []
4313
4349
  },
4314
- name: RULE_NAME47,
4350
+ name: RULE_NAME48,
4315
4351
  create(context) {
4316
4352
  function getReportDescriptor(node) {
4317
4353
  if (!isFragmentElement(node, context)) return O.none();
@@ -4347,6 +4383,7 @@ var src_default = {
4347
4383
  "avoid-shorthand-boolean": avoid_shorthand_boolean_default,
4348
4384
  "avoid-shorthand-fragment": avoid_shorthand_fragment_default,
4349
4385
  "ensure-forward-ref-using-ref": ensure_forward_ref_using_ref_default,
4386
+ "jsx-no-duplicate-props": jsx_no_duplicate_props_default,
4350
4387
  "jsx-uses-vars": jsx_uses_vars_default,
4351
4388
  "no-access-state-in-setstate": no_access_state_in_setstate_default,
4352
4389
  "no-array-index-key": no_array_index_key_default,