eslint-plugin-react-x 1.48.5 → 1.49.0-beta.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/index.js CHANGED
@@ -55,6 +55,7 @@ __export(recommended_exports, {
55
55
  });
56
56
  var name = "react-x/recommended";
57
57
  var rules = {
58
+ "react-x/jsx-key-before-spread": "warn",
58
59
  "react-x/jsx-no-duplicate-props": "warn",
59
60
  "react-x/jsx-uses-react": "warn",
60
61
  "react-x/jsx-uses-vars": "warn",
@@ -141,7 +142,7 @@ var settings3 = {
141
142
 
142
143
  // package.json
143
144
  var name4 = "eslint-plugin-react-x";
144
- var version = "1.48.5";
145
+ var version = "1.49.0-beta.1";
145
146
  var createRule = utils.ESLintUtils.RuleCreator(shared.getDocsUrl("x"));
146
147
 
147
148
  // src/rules/avoid-shorthand-boolean.ts
@@ -217,17 +218,19 @@ function create2(context) {
217
218
  }
218
219
  };
219
220
  }
220
- var RULE_NAME3 = "jsx-no-duplicate-props";
221
- var RULE_FEATURES3 = [];
222
- var jsx_no_duplicate_props_default = createRule({
221
+ var RULE_NAME3 = "jsx-key-before-spread";
222
+ var RULE_FEATURES3 = [
223
+ "EXP"
224
+ ];
225
+ var jsx_key_before_spread_default = createRule({
223
226
  meta: {
224
227
  type: "problem",
225
228
  docs: {
226
- description: "Disallow duplicate props in JSX elements.",
229
+ description: "Enforces that the 'key' attribute is placed before the spread attribute in JSX elements.",
227
230
  [Symbol.for("rule_features")]: RULE_FEATURES3
228
231
  },
229
232
  messages: {
230
- jsxNoDuplicateProps: "This JSX property is assigned multiple times."
233
+ jsxKeyBeforeSpread: "The 'key' attribute must be placed before the spread attribute."
231
234
  },
232
235
  schema: []
233
236
  },
@@ -236,6 +239,43 @@ var jsx_no_duplicate_props_default = createRule({
236
239
  defaultOptions: []
237
240
  });
238
241
  function create3(context) {
242
+ return {
243
+ JSXOpeningElement(node) {
244
+ let firstSpreadAttributeIndex = null;
245
+ for (const [index, attr] of node.attributes.entries()) {
246
+ if (attr.type === types.AST_NODE_TYPES.JSXSpreadAttribute) {
247
+ firstSpreadAttributeIndex ??= index;
248
+ continue;
249
+ }
250
+ if (attr.name.name === "key" && firstSpreadAttributeIndex != null && index > firstSpreadAttributeIndex) {
251
+ context.report({
252
+ messageId: "jsxKeyBeforeSpread",
253
+ node: attr
254
+ });
255
+ }
256
+ }
257
+ }
258
+ };
259
+ }
260
+ var RULE_NAME4 = "jsx-no-duplicate-props";
261
+ var RULE_FEATURES4 = [];
262
+ var jsx_no_duplicate_props_default = createRule({
263
+ meta: {
264
+ type: "problem",
265
+ docs: {
266
+ description: "Disallow duplicate props in JSX elements.",
267
+ [Symbol.for("rule_features")]: RULE_FEATURES4
268
+ },
269
+ messages: {
270
+ jsxNoDuplicateProps: "This JSX property is assigned multiple times."
271
+ },
272
+ schema: []
273
+ },
274
+ name: RULE_NAME4,
275
+ create: create4,
276
+ defaultOptions: []
277
+ });
278
+ function create4(context) {
239
279
  return {
240
280
  JSXOpeningElement(node) {
241
281
  const props = [];
@@ -259,25 +299,25 @@ function create3(context) {
259
299
  }
260
300
  };
261
301
  }
262
- var RULE_NAME4 = "jsx-no-undef";
263
- var RULE_FEATURES4 = [];
302
+ var RULE_NAME5 = "jsx-no-undef";
303
+ var RULE_FEATURES5 = [];
264
304
  var jsx_no_undef_default = createRule({
265
305
  meta: {
266
306
  type: "problem",
267
307
  docs: {
268
308
  description: "Disallow undefined variables in JSX.",
269
- [Symbol.for("rule_features")]: RULE_FEATURES4
309
+ [Symbol.for("rule_features")]: RULE_FEATURES5
270
310
  },
271
311
  messages: {
272
312
  jsxNoUndef: "JSX variable '{{name}}' is not defined."
273
313
  },
274
314
  schema: []
275
315
  },
276
- name: RULE_NAME4,
277
- create: create4,
316
+ name: RULE_NAME5,
317
+ create: create5,
278
318
  defaultOptions: []
279
319
  });
280
- function create4(context) {
320
+ function create5(context) {
281
321
  return {
282
322
  JSXOpeningElement(node) {
283
323
  const name5 = tsPattern.match(node.name).with({ type: types.AST_NODE_TYPES.JSXIdentifier }, (n) => n.name).with({ type: types.AST_NODE_TYPES.JSXMemberExpression, object: { type: types.AST_NODE_TYPES.JSXIdentifier } }, (n) => n.object.name).otherwise(() => null);
@@ -297,25 +337,25 @@ function create4(context) {
297
337
  };
298
338
  }
299
339
  var { JsxEmit } = kit.JsxConfig;
300
- var RULE_NAME5 = "jsx-uses-react";
301
- var RULE_FEATURES5 = [];
340
+ var RULE_NAME6 = "jsx-uses-react";
341
+ var RULE_FEATURES6 = [];
302
342
  var jsx_uses_react_default = createRule({
303
343
  meta: {
304
344
  type: "problem",
305
345
  docs: {
306
346
  description: "Marks React variables as used when JSX is used.",
307
- [Symbol.for("rule_features")]: RULE_FEATURES5
347
+ [Symbol.for("rule_features")]: RULE_FEATURES6
308
348
  },
309
349
  messages: {
310
350
  jsxUsesReact: "Marked {{name}} as used."
311
351
  },
312
352
  schema: []
313
353
  },
314
- name: RULE_NAME5,
315
- create: create5,
354
+ name: RULE_NAME6,
355
+ create: create6,
316
356
  defaultOptions: []
317
357
  });
318
- function create5(context) {
358
+ function create6(context) {
319
359
  const jsxConfig = {
320
360
  ...kit.JsxConfig.getFromContext(context),
321
361
  ...kit.JsxConfig.getFromAnnotation(context)
@@ -344,25 +384,25 @@ function debugReport(context, node, name5) {
344
384
  data: { name: name5 }
345
385
  });
346
386
  }
347
- var RULE_NAME6 = "jsx-uses-vars";
348
- var RULE_FEATURES6 = [];
387
+ var RULE_NAME7 = "jsx-uses-vars";
388
+ var RULE_FEATURES7 = [];
349
389
  var jsx_uses_vars_default = createRule({
350
390
  meta: {
351
391
  type: "problem",
352
392
  docs: {
353
393
  description: "Marks variables used in JSX elements as used.",
354
- [Symbol.for("rule_features")]: RULE_FEATURES6
394
+ [Symbol.for("rule_features")]: RULE_FEATURES7
355
395
  },
356
396
  messages: {
357
397
  jsxUsesVars: ""
358
398
  },
359
399
  schema: []
360
400
  },
361
- name: RULE_NAME6,
362
- create: create6,
401
+ name: RULE_NAME7,
402
+ create: create7,
363
403
  defaultOptions: []
364
404
  });
365
- function create6(context) {
405
+ function create7(context) {
366
406
  return {
367
407
  JSXOpeningElement(node) {
368
408
  switch (node.name.type) {
@@ -384,8 +424,8 @@ function create6(context) {
384
424
  }
385
425
  };
386
426
  }
387
- var RULE_NAME7 = "no-access-state-in-setstate";
388
- var RULE_FEATURES7 = [];
427
+ var RULE_NAME8 = "no-access-state-in-setstate";
428
+ var RULE_FEATURES8 = [];
389
429
  function isKeyLiteral(node, key) {
390
430
  return tsPattern.match(key).with({ type: types.AST_NODE_TYPES.Literal }, eff.constTrue).with({ type: types.AST_NODE_TYPES.TemplateLiteral, expressions: [] }, eff.constTrue).with({ type: types.AST_NODE_TYPES.Identifier }, () => !node.computed).otherwise(eff.constFalse);
391
431
  }
@@ -394,18 +434,18 @@ var no_access_state_in_setstate_default = createRule({
394
434
  type: "problem",
395
435
  docs: {
396
436
  description: "Disallow accessing `this.state` inside `setState` calls.",
397
- [Symbol.for("rule_features")]: RULE_FEATURES7
437
+ [Symbol.for("rule_features")]: RULE_FEATURES8
398
438
  },
399
439
  messages: {
400
440
  noAccessStateInSetstate: "Do not access 'this.state' within 'setState'. Use the update function instead."
401
441
  },
402
442
  schema: []
403
443
  },
404
- name: RULE_NAME7,
405
- create: create7,
444
+ name: RULE_NAME8,
445
+ create: create8,
406
446
  defaultOptions: []
407
447
  });
408
- function create7(context) {
448
+ function create8(context) {
409
449
  if (!context.sourceCode.text.includes("setState")) {
410
450
  return {};
411
451
  }
@@ -496,8 +536,8 @@ function create7(context) {
496
536
  }
497
537
  };
498
538
  }
499
- var RULE_NAME8 = "no-array-index-key";
500
- var RULE_FEATURES8 = [];
539
+ var RULE_NAME9 = "no-array-index-key";
540
+ var RULE_FEATURES9 = [];
501
541
  var reactChildrenMethod = ["forEach", "map"];
502
542
  function isReactChildrenMethod(name5) {
503
543
  return reactChildrenMethod.some((method) => method === name5);
@@ -564,18 +604,18 @@ var no_array_index_key_default = createRule({
564
604
  type: "problem",
565
605
  docs: {
566
606
  description: "Disallow an item's index in the array as its key.",
567
- [Symbol.for("rule_features")]: RULE_FEATURES8
607
+ [Symbol.for("rule_features")]: RULE_FEATURES9
568
608
  },
569
609
  messages: {
570
610
  noArrayIndexKey: "Do not use item index in the array as its key."
571
611
  },
572
612
  schema: []
573
613
  },
574
- name: RULE_NAME8,
575
- create: create8,
614
+ name: RULE_NAME9,
615
+ create: create9,
576
616
  defaultOptions: []
577
617
  });
578
- function create8(context) {
618
+ function create9(context) {
579
619
  const report = kit.Reporter.make(context);
580
620
  const indexParamNames = [];
581
621
  function isArrayIndex(node) {
@@ -677,25 +717,25 @@ function create8(context) {
677
717
  }
678
718
  };
679
719
  }
680
- var RULE_NAME9 = "no-children-count";
681
- var RULE_FEATURES9 = [];
720
+ var RULE_NAME10 = "no-children-count";
721
+ var RULE_FEATURES10 = [];
682
722
  var no_children_count_default = createRule({
683
723
  meta: {
684
724
  type: "problem",
685
725
  docs: {
686
726
  description: "Disallow `Children.count`.",
687
- [Symbol.for("rule_features")]: RULE_FEATURES9
727
+ [Symbol.for("rule_features")]: RULE_FEATURES10
688
728
  },
689
729
  messages: {
690
730
  noChildrenCount: "Using 'Children.count' is uncommon and can lead to fragile code. Use alternatives instead."
691
731
  },
692
732
  schema: []
693
733
  },
694
- name: RULE_NAME9,
695
- create: create9,
734
+ name: RULE_NAME10,
735
+ create: create10,
696
736
  defaultOptions: []
697
737
  });
698
- function create9(context) {
738
+ function create10(context) {
699
739
  return {
700
740
  MemberExpression(node) {
701
741
  if (ER25__namespace.isChildrenCount(context, node)) {
@@ -707,25 +747,25 @@ function create9(context) {
707
747
  }
708
748
  };
709
749
  }
710
- var RULE_NAME10 = "no-children-for-each";
711
- var RULE_FEATURES10 = [];
750
+ var RULE_NAME11 = "no-children-for-each";
751
+ var RULE_FEATURES11 = [];
712
752
  var no_children_for_each_default = createRule({
713
753
  meta: {
714
754
  type: "problem",
715
755
  docs: {
716
756
  description: "Disallow 'Children.forEach'.",
717
- [Symbol.for("rule_features")]: RULE_FEATURES10
757
+ [Symbol.for("rule_features")]: RULE_FEATURES11
718
758
  },
719
759
  messages: {
720
760
  noChildrenForEach: "Using 'Children.forEach' is uncommon and can lead to fragile code. Use alternatives instead."
721
761
  },
722
762
  schema: []
723
763
  },
724
- name: RULE_NAME10,
725
- create: create10,
764
+ name: RULE_NAME11,
765
+ create: create11,
726
766
  defaultOptions: []
727
767
  });
728
- function create10(context) {
768
+ function create11(context) {
729
769
  return {
730
770
  MemberExpression(node) {
731
771
  if (ER25__namespace.isChildrenForEach(context, node)) {
@@ -737,25 +777,25 @@ function create10(context) {
737
777
  }
738
778
  };
739
779
  }
740
- var RULE_NAME11 = "no-children-map";
741
- var RULE_FEATURES11 = [];
780
+ var RULE_NAME12 = "no-children-map";
781
+ var RULE_FEATURES12 = [];
742
782
  var no_children_map_default = createRule({
743
783
  meta: {
744
784
  type: "problem",
745
785
  docs: {
746
786
  description: "Disallow `Children.map`.",
747
- [Symbol.for("rule_features")]: RULE_FEATURES11
787
+ [Symbol.for("rule_features")]: RULE_FEATURES12
748
788
  },
749
789
  messages: {
750
790
  noChildrenMap: "Using 'Children.map' is uncommon and can lead to fragile code. Use alternatives instead."
751
791
  },
752
792
  schema: []
753
793
  },
754
- name: RULE_NAME11,
755
- create: create11,
794
+ name: RULE_NAME12,
795
+ create: create12,
756
796
  defaultOptions: []
757
797
  });
758
- function create11(context) {
798
+ function create12(context) {
759
799
  return {
760
800
  MemberExpression(node) {
761
801
  if (ER25__namespace.isChildrenMap(context, node)) {
@@ -767,25 +807,25 @@ function create11(context) {
767
807
  }
768
808
  };
769
809
  }
770
- var RULE_NAME12 = "no-children-only";
771
- var RULE_FEATURES12 = [];
810
+ var RULE_NAME13 = "no-children-only";
811
+ var RULE_FEATURES13 = [];
772
812
  var no_children_only_default = createRule({
773
813
  meta: {
774
814
  type: "problem",
775
815
  docs: {
776
816
  description: "Disallow `Children.only`.",
777
- [Symbol.for("rule_features")]: RULE_FEATURES12
817
+ [Symbol.for("rule_features")]: RULE_FEATURES13
778
818
  },
779
819
  messages: {
780
820
  noChildrenOnly: "Using 'Children.only' is uncommon and can lead to fragile code. Use alternatives instead."
781
821
  },
782
822
  schema: []
783
823
  },
784
- name: RULE_NAME12,
785
- create: create12,
824
+ name: RULE_NAME13,
825
+ create: create13,
786
826
  defaultOptions: []
787
827
  });
788
- function create12(context) {
828
+ function create13(context) {
789
829
  return {
790
830
  MemberExpression(node) {
791
831
  if (ER25__namespace.isChildrenOnly(context, node)) {
@@ -797,25 +837,25 @@ function create12(context) {
797
837
  }
798
838
  };
799
839
  }
800
- var RULE_NAME13 = "no-children-prop";
801
- var RULE_FEATURES13 = [];
840
+ var RULE_NAME14 = "no-children-prop";
841
+ var RULE_FEATURES14 = [];
802
842
  var no_children_prop_default = createRule({
803
843
  meta: {
804
844
  type: "problem",
805
845
  docs: {
806
846
  description: "Disallow passing `children` as a prop.",
807
- [Symbol.for("rule_features")]: RULE_FEATURES13
847
+ [Symbol.for("rule_features")]: RULE_FEATURES14
808
848
  },
809
849
  messages: {
810
850
  noChildrenProp: "Do not pass 'children' as props."
811
851
  },
812
852
  schema: []
813
853
  },
814
- name: RULE_NAME13,
815
- create: create13,
854
+ name: RULE_NAME14,
855
+ create: create14,
816
856
  defaultOptions: []
817
857
  });
818
- function create13(context) {
858
+ function create14(context) {
819
859
  return {
820
860
  JSXElement(node) {
821
861
  const attributes = node.openingElement.attributes;
@@ -829,25 +869,25 @@ function create13(context) {
829
869
  }
830
870
  };
831
871
  }
832
- var RULE_NAME14 = "no-children-to-array";
833
- var RULE_FEATURES14 = [];
872
+ var RULE_NAME15 = "no-children-to-array";
873
+ var RULE_FEATURES15 = [];
834
874
  var no_children_to_array_default = createRule({
835
875
  meta: {
836
876
  type: "problem",
837
877
  docs: {
838
878
  description: "Disallow `Children.toArray`.",
839
- [Symbol.for("rule_features")]: RULE_FEATURES14
879
+ [Symbol.for("rule_features")]: RULE_FEATURES15
840
880
  },
841
881
  messages: {
842
882
  noChildrenToArray: "Using 'Children.toArray' is uncommon and can lead to fragile code. Use alternatives instead."
843
883
  },
844
884
  schema: []
845
885
  },
846
- name: RULE_NAME14,
847
- create: create14,
886
+ name: RULE_NAME15,
887
+ create: create15,
848
888
  defaultOptions: []
849
889
  });
850
- function create14(context) {
890
+ function create15(context) {
851
891
  return {
852
892
  MemberExpression(node) {
853
893
  if (ER25__namespace.isChildrenToArray(context, node)) {
@@ -859,25 +899,25 @@ function create14(context) {
859
899
  }
860
900
  };
861
901
  }
862
- var RULE_NAME15 = "no-class-component";
863
- var RULE_FEATURES15 = [];
902
+ var RULE_NAME16 = "no-class-component";
903
+ var RULE_FEATURES16 = [];
864
904
  var no_class_component_default = createRule({
865
905
  meta: {
866
906
  type: "problem",
867
907
  docs: {
868
908
  description: "Disallow class components except for error boundaries.",
869
- [Symbol.for("rule_features")]: RULE_FEATURES15
909
+ [Symbol.for("rule_features")]: RULE_FEATURES16
870
910
  },
871
911
  messages: {
872
912
  noClassComponent: "Avoid using class components. Use function components instead."
873
913
  },
874
914
  schema: []
875
915
  },
876
- name: RULE_NAME15,
877
- create: create15,
916
+ name: RULE_NAME16,
917
+ create: create16,
878
918
  defaultOptions: []
879
919
  });
880
- function create15(context) {
920
+ function create16(context) {
881
921
  if (!context.sourceCode.text.includes("Component")) return {};
882
922
  const { ctx, listeners } = ER25__namespace.useComponentCollectorLegacy();
883
923
  return {
@@ -899,25 +939,25 @@ function create15(context) {
899
939
  }
900
940
  };
901
941
  }
902
- var RULE_NAME16 = "no-clone-element";
903
- var RULE_FEATURES16 = [];
942
+ var RULE_NAME17 = "no-clone-element";
943
+ var RULE_FEATURES17 = [];
904
944
  var no_clone_element_default = createRule({
905
945
  meta: {
906
946
  type: "problem",
907
947
  docs: {
908
948
  description: "Disallow `cloneElement`.",
909
- [Symbol.for("rule_features")]: RULE_FEATURES16
949
+ [Symbol.for("rule_features")]: RULE_FEATURES17
910
950
  },
911
951
  messages: {
912
952
  noCloneElement: "Using 'cloneElement' is uncommon and can lead to fragile code. Use alternatives instead."
913
953
  },
914
954
  schema: []
915
955
  },
916
- name: RULE_NAME16,
917
- create: create16,
956
+ name: RULE_NAME17,
957
+ create: create17,
918
958
  defaultOptions: []
919
959
  });
920
- function create16(context) {
960
+ function create17(context) {
921
961
  return {
922
962
  CallExpression(node) {
923
963
  if (ER25__namespace.isCloneElementCall(context, node)) {
@@ -929,25 +969,25 @@ function create16(context) {
929
969
  }
930
970
  };
931
971
  }
932
- var RULE_NAME17 = "no-comment-textnodes";
933
- var RULE_FEATURES17 = [];
972
+ var RULE_NAME18 = "no-comment-textnodes";
973
+ var RULE_FEATURES18 = [];
934
974
  var no_comment_textnodes_default = createRule({
935
975
  meta: {
936
976
  type: "problem",
937
977
  docs: {
938
978
  description: "Prevents comments from being inserted as text nodes.",
939
- [Symbol.for("rule_features")]: RULE_FEATURES17
979
+ [Symbol.for("rule_features")]: RULE_FEATURES18
940
980
  },
941
981
  messages: {
942
982
  noCommentTextnodes: "Possible misused comment in text node. Comments inside children section of tag should be placed inside braces."
943
983
  },
944
984
  schema: []
945
985
  },
946
- name: RULE_NAME17,
947
- create: create17,
986
+ name: RULE_NAME18,
987
+ create: create18,
948
988
  defaultOptions: []
949
989
  });
950
- function create17(context) {
990
+ function create18(context) {
951
991
  function hasCommentLike(node) {
952
992
  if (AST8__namespace.isOneOf([types.AST_NODE_TYPES.JSXAttribute, types.AST_NODE_TYPES.JSXExpressionContainer])(node.parent)) {
953
993
  return false;
@@ -975,8 +1015,8 @@ function create17(context) {
975
1015
  Literal: visitorFunction
976
1016
  };
977
1017
  }
978
- var RULE_NAME18 = "no-complex-conditional-rendering";
979
- var RULE_FEATURES18 = [
1018
+ var RULE_NAME19 = "no-complex-conditional-rendering";
1019
+ var RULE_FEATURES19 = [
980
1020
  "EXP"
981
1021
  ];
982
1022
  var no_complex_conditional_rendering_default = createRule({
@@ -984,18 +1024,18 @@ var no_complex_conditional_rendering_default = createRule({
984
1024
  type: "problem",
985
1025
  docs: {
986
1026
  description: "Disallow complex conditional rendering in JSX expressions.",
987
- [Symbol.for("rule_features")]: RULE_FEATURES18
1027
+ [Symbol.for("rule_features")]: RULE_FEATURES19
988
1028
  },
989
1029
  messages: {
990
1030
  noComplexConditionalRendering: "Avoid complex conditional rendering. Extract the logic into separate elements or components."
991
1031
  },
992
1032
  schema: []
993
1033
  },
994
- name: RULE_NAME18,
995
- create: create18,
1034
+ name: RULE_NAME19,
1035
+ create: create19,
996
1036
  defaultOptions: []
997
1037
  });
998
- function create18(context) {
1038
+ function create19(context) {
999
1039
  const visitorFunction = (node) => {
1000
1040
  const jsxExpContainer = node.parent?.parent;
1001
1041
  if (!AST8__namespace.is(types.AST_NODE_TYPES.JSXExpressionContainer)(jsxExpContainer)) {
@@ -1020,8 +1060,8 @@ function create18(context) {
1020
1060
  "JSXExpressionContainer > LogicalExpression[operator='||'] > LogicalExpression[operator='&&']": visitorFunction
1021
1061
  };
1022
1062
  }
1023
- var RULE_NAME19 = "no-component-will-mount";
1024
- var RULE_FEATURES19 = [
1063
+ var RULE_NAME20 = "no-component-will-mount";
1064
+ var RULE_FEATURES20 = [
1025
1065
  "MOD"
1026
1066
  ];
1027
1067
  var no_component_will_mount_default = createRule({
@@ -1029,7 +1069,7 @@ var no_component_will_mount_default = createRule({
1029
1069
  type: "problem",
1030
1070
  docs: {
1031
1071
  description: "Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.",
1032
- [Symbol.for("rule_features")]: RULE_FEATURES19
1072
+ [Symbol.for("rule_features")]: RULE_FEATURES20
1033
1073
  },
1034
1074
  fixable: "code",
1035
1075
  messages: {
@@ -1037,11 +1077,11 @@ var no_component_will_mount_default = createRule({
1037
1077
  },
1038
1078
  schema: []
1039
1079
  },
1040
- name: RULE_NAME19,
1041
- create: create19,
1080
+ name: RULE_NAME20,
1081
+ create: create20,
1042
1082
  defaultOptions: []
1043
1083
  });
1044
- function create19(context) {
1084
+ function create20(context) {
1045
1085
  if (!context.sourceCode.text.includes("componentWillMount")) return {};
1046
1086
  const { ctx, listeners } = ER25__namespace.useComponentCollectorLegacy();
1047
1087
  return {
@@ -1068,8 +1108,8 @@ function create19(context) {
1068
1108
  }
1069
1109
  };
1070
1110
  }
1071
- var RULE_NAME20 = "no-component-will-receive-props";
1072
- var RULE_FEATURES20 = [
1111
+ var RULE_NAME21 = "no-component-will-receive-props";
1112
+ var RULE_FEATURES21 = [
1073
1113
  "MOD"
1074
1114
  ];
1075
1115
  var no_component_will_receive_props_default = createRule({
@@ -1077,7 +1117,7 @@ var no_component_will_receive_props_default = createRule({
1077
1117
  type: "problem",
1078
1118
  docs: {
1079
1119
  description: "Replace usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`.",
1080
- [Symbol.for("rule_features")]: RULE_FEATURES20
1120
+ [Symbol.for("rule_features")]: RULE_FEATURES21
1081
1121
  },
1082
1122
  fixable: "code",
1083
1123
  messages: {
@@ -1085,11 +1125,11 @@ var no_component_will_receive_props_default = createRule({
1085
1125
  },
1086
1126
  schema: []
1087
1127
  },
1088
- name: RULE_NAME20,
1089
- create: create20,
1128
+ name: RULE_NAME21,
1129
+ create: create21,
1090
1130
  defaultOptions: []
1091
1131
  });
1092
- function create20(context) {
1132
+ function create21(context) {
1093
1133
  if (!context.sourceCode.text.includes("componentWillReceiveProps")) return {};
1094
1134
  const { ctx, listeners } = ER25__namespace.useComponentCollectorLegacy();
1095
1135
  return {
@@ -1116,8 +1156,8 @@ function create20(context) {
1116
1156
  }
1117
1157
  };
1118
1158
  }
1119
- var RULE_NAME21 = "no-component-will-update";
1120
- var RULE_FEATURES21 = [
1159
+ var RULE_NAME22 = "no-component-will-update";
1160
+ var RULE_FEATURES22 = [
1121
1161
  "MOD"
1122
1162
  ];
1123
1163
  var no_component_will_update_default = createRule({
@@ -1125,7 +1165,7 @@ var no_component_will_update_default = createRule({
1125
1165
  type: "problem",
1126
1166
  docs: {
1127
1167
  description: "Replace usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`.",
1128
- [Symbol.for("rule_features")]: RULE_FEATURES21
1168
+ [Symbol.for("rule_features")]: RULE_FEATURES22
1129
1169
  },
1130
1170
  fixable: "code",
1131
1171
  messages: {
@@ -1133,11 +1173,11 @@ var no_component_will_update_default = createRule({
1133
1173
  },
1134
1174
  schema: []
1135
1175
  },
1136
- name: RULE_NAME21,
1137
- create: create21,
1176
+ name: RULE_NAME22,
1177
+ create: create22,
1138
1178
  defaultOptions: []
1139
1179
  });
1140
- function create21(context) {
1180
+ function create22(context) {
1141
1181
  if (!context.sourceCode.text.includes("componentWillUpdate")) return {};
1142
1182
  const { ctx, listeners } = ER25__namespace.useComponentCollectorLegacy();
1143
1183
  return {
@@ -1164,8 +1204,8 @@ function create21(context) {
1164
1204
  }
1165
1205
  };
1166
1206
  }
1167
- var RULE_NAME22 = "no-context-provider";
1168
- var RULE_FEATURES22 = [
1207
+ var RULE_NAME23 = "no-context-provider";
1208
+ var RULE_FEATURES23 = [
1169
1209
  "MOD"
1170
1210
  ];
1171
1211
  var no_context_provider_default = createRule({
@@ -1173,7 +1213,7 @@ var no_context_provider_default = createRule({
1173
1213
  type: "problem",
1174
1214
  docs: {
1175
1215
  description: "Replace usages of `<Context.Provider>` with `<Context>`.",
1176
- [Symbol.for("rule_features")]: RULE_FEATURES22
1216
+ [Symbol.for("rule_features")]: RULE_FEATURES23
1177
1217
  },
1178
1218
  fixable: "code",
1179
1219
  messages: {
@@ -1181,11 +1221,11 @@ var no_context_provider_default = createRule({
1181
1221
  },
1182
1222
  schema: []
1183
1223
  },
1184
- name: RULE_NAME22,
1185
- create: create22,
1224
+ name: RULE_NAME23,
1225
+ create: create23,
1186
1226
  defaultOptions: []
1187
1227
  });
1188
- function create22(context) {
1228
+ function create23(context) {
1189
1229
  if (!context.sourceCode.text.includes("Provider")) return {};
1190
1230
  const { version: version2 } = shared.getSettingsFromContext(context);
1191
1231
  if (compareVersions.compare(version2, "19.0.0", "<")) return {};
@@ -1217,25 +1257,25 @@ function create22(context) {
1217
1257
  }
1218
1258
  };
1219
1259
  }
1220
- var RULE_NAME23 = "no-create-ref";
1221
- var RULE_FEATURES23 = [];
1260
+ var RULE_NAME24 = "no-create-ref";
1261
+ var RULE_FEATURES24 = [];
1222
1262
  var no_create_ref_default = createRule({
1223
1263
  meta: {
1224
1264
  type: "problem",
1225
1265
  docs: {
1226
1266
  description: "Disallow `createRef` in function components.",
1227
- [Symbol.for("rule_features")]: RULE_FEATURES23
1267
+ [Symbol.for("rule_features")]: RULE_FEATURES24
1228
1268
  },
1229
1269
  messages: {
1230
1270
  noCreateRef: "[Deprecated] Use 'useRef' instead."
1231
1271
  },
1232
1272
  schema: []
1233
1273
  },
1234
- name: RULE_NAME23,
1235
- create: create23,
1274
+ name: RULE_NAME24,
1275
+ create: create24,
1236
1276
  defaultOptions: []
1237
1277
  });
1238
- function create23(context) {
1278
+ function create24(context) {
1239
1279
  return {
1240
1280
  CallExpression(node) {
1241
1281
  if (ER25__namespace.isCreateRefCall(context, node) && AST8__namespace.findParentNode(node, ER25__namespace.isClassComponent) == null) {
@@ -1244,25 +1284,25 @@ function create23(context) {
1244
1284
  }
1245
1285
  };
1246
1286
  }
1247
- var RULE_NAME24 = "no-default-props";
1248
- var RULE_FEATURES24 = [];
1287
+ var RULE_NAME25 = "no-default-props";
1288
+ var RULE_FEATURES25 = [];
1249
1289
  var no_default_props_default = createRule({
1250
1290
  meta: {
1251
1291
  type: "problem",
1252
1292
  docs: {
1253
1293
  description: "Disallow `defaultProps` property in favor of ES6 default parameters.",
1254
- [Symbol.for("rule_features")]: RULE_FEATURES24
1294
+ [Symbol.for("rule_features")]: RULE_FEATURES25
1255
1295
  },
1256
1296
  messages: {
1257
1297
  noDefaultProps: "[Deprecated] Use ES6 default parameters instead."
1258
1298
  },
1259
1299
  schema: []
1260
1300
  },
1261
- name: RULE_NAME24,
1262
- create: create24,
1301
+ name: RULE_NAME25,
1302
+ create: create25,
1263
1303
  defaultOptions: []
1264
1304
  });
1265
- function create24(context) {
1305
+ function create25(context) {
1266
1306
  if (!context.sourceCode.text.includes("defaultProps")) return {};
1267
1307
  return {
1268
1308
  AssignmentExpression(node) {
@@ -1296,8 +1336,8 @@ function create24(context) {
1296
1336
  }
1297
1337
  };
1298
1338
  }
1299
- var RULE_NAME25 = "no-direct-mutation-state";
1300
- var RULE_FEATURES25 = [];
1339
+ var RULE_NAME26 = "no-direct-mutation-state";
1340
+ var RULE_FEATURES26 = [];
1301
1341
  function isConstructorFunction(node) {
1302
1342
  return AST8__namespace.isOneOf([types.AST_NODE_TYPES.FunctionDeclaration, types.AST_NODE_TYPES.FunctionExpression])(node) && AST8__namespace.isMethodOrProperty(node.parent) && node.parent.key.type === types.AST_NODE_TYPES.Identifier && node.parent.key.name === "constructor";
1303
1343
  }
@@ -1306,18 +1346,18 @@ var no_direct_mutation_state_default = createRule({
1306
1346
  type: "problem",
1307
1347
  docs: {
1308
1348
  description: "Disallow direct mutation of `this.state`.",
1309
- [Symbol.for("rule_features")]: RULE_FEATURES25
1349
+ [Symbol.for("rule_features")]: RULE_FEATURES26
1310
1350
  },
1311
1351
  messages: {
1312
1352
  noDirectMutationState: "Do not mutate state directly. Use 'setState()' instead."
1313
1353
  },
1314
1354
  schema: []
1315
1355
  },
1316
- name: RULE_NAME25,
1317
- create: create25,
1356
+ name: RULE_NAME26,
1357
+ create: create26,
1318
1358
  defaultOptions: []
1319
1359
  });
1320
- function create25(context) {
1360
+ function create26(context) {
1321
1361
  return {
1322
1362
  AssignmentExpression(node) {
1323
1363
  if (!ER25__namespace.isAssignmentToThisState(node)) return;
@@ -1338,25 +1378,25 @@ function create25(context) {
1338
1378
  }
1339
1379
  };
1340
1380
  }
1341
- var RULE_NAME26 = "no-duplicate-key";
1342
- var RULE_FEATURES26 = [];
1381
+ var RULE_NAME27 = "no-duplicate-key";
1382
+ var RULE_FEATURES27 = [];
1343
1383
  var no_duplicate_key_default = createRule({
1344
1384
  meta: {
1345
1385
  type: "problem",
1346
1386
  docs: {
1347
1387
  description: "Disallow duplicate `key` on elements in the same array or a list of `children`.",
1348
- [Symbol.for("rule_features")]: RULE_FEATURES26
1388
+ [Symbol.for("rule_features")]: RULE_FEATURES27
1349
1389
  },
1350
1390
  messages: {
1351
1391
  noDuplicateKey: "A key must be unique. '{{value}}' is duplicated."
1352
1392
  },
1353
1393
  schema: []
1354
1394
  },
1355
- name: RULE_NAME26,
1356
- create: create26,
1395
+ name: RULE_NAME27,
1396
+ create: create27,
1357
1397
  defaultOptions: []
1358
1398
  });
1359
- function create26(context) {
1399
+ function create27(context) {
1360
1400
  if (!context.sourceCode.getText().includes("key=")) {
1361
1401
  return {};
1362
1402
  }
@@ -1420,8 +1460,8 @@ function create26(context) {
1420
1460
  }
1421
1461
  };
1422
1462
  }
1423
- var RULE_NAME27 = "no-forward-ref";
1424
- var RULE_FEATURES27 = [
1463
+ var RULE_NAME28 = "no-forward-ref";
1464
+ var RULE_FEATURES28 = [
1425
1465
  "MOD"
1426
1466
  ];
1427
1467
  var no_forward_ref_default = createRule({
@@ -1429,7 +1469,7 @@ var no_forward_ref_default = createRule({
1429
1469
  type: "problem",
1430
1470
  docs: {
1431
1471
  description: "Replaces usages of `forwardRef` with passing `ref` as a prop.",
1432
- [Symbol.for("rule_features")]: RULE_FEATURES27
1472
+ [Symbol.for("rule_features")]: RULE_FEATURES28
1433
1473
  },
1434
1474
  fixable: "code",
1435
1475
  messages: {
@@ -1437,11 +1477,11 @@ var no_forward_ref_default = createRule({
1437
1477
  },
1438
1478
  schema: []
1439
1479
  },
1440
- name: RULE_NAME27,
1441
- create: create27,
1480
+ name: RULE_NAME28,
1481
+ create: create28,
1442
1482
  defaultOptions: []
1443
1483
  });
1444
- function create27(context) {
1484
+ function create28(context) {
1445
1485
  if (!context.sourceCode.text.includes("forwardRef")) {
1446
1486
  return {};
1447
1487
  }
@@ -1530,8 +1570,8 @@ function getComponentPropsFixes(context, fixer, node, typeArguments) {
1530
1570
  ...arg1 == null ? [] : [fixer.remove(arg1), fixer.removeRange([arg0.range[1], arg1.range[0]])]
1531
1571
  ];
1532
1572
  }
1533
- var RULE_NAME28 = "no-implicit-key";
1534
- var RULE_FEATURES28 = [
1573
+ var RULE_NAME29 = "no-implicit-key";
1574
+ var RULE_FEATURES29 = [
1535
1575
  "EXP"
1536
1576
  ];
1537
1577
  var no_implicit_key_default = createRule({
@@ -1539,18 +1579,18 @@ var no_implicit_key_default = createRule({
1539
1579
  type: "problem",
1540
1580
  docs: {
1541
1581
  description: "Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects).",
1542
- [Symbol.for("rule_features")]: RULE_FEATURES28
1582
+ [Symbol.for("rule_features")]: RULE_FEATURES29
1543
1583
  },
1544
1584
  messages: {
1545
1585
  noImplicitKey: "Do not use implicit 'key' props."
1546
1586
  },
1547
1587
  schema: []
1548
1588
  },
1549
- name: RULE_NAME28,
1550
- create: create28,
1589
+ name: RULE_NAME29,
1590
+ create: create29,
1551
1591
  defaultOptions: []
1552
1592
  });
1553
- function create28(context) {
1593
+ function create29(context) {
1554
1594
  return {
1555
1595
  JSXOpeningElement(node) {
1556
1596
  const initialScope = context.sourceCode.getScope(node);
@@ -1564,8 +1604,8 @@ function create28(context) {
1564
1604
  }
1565
1605
  };
1566
1606
  }
1567
- var RULE_NAME29 = "no-leaked-conditional-rendering";
1568
- var RULE_FEATURES29 = [
1607
+ var RULE_NAME30 = "no-leaked-conditional-rendering";
1608
+ var RULE_FEATURES30 = [
1569
1609
  "TSC"
1570
1610
  ];
1571
1611
  var tsHelpers = {
@@ -1651,18 +1691,18 @@ var no_leaked_conditional_rendering_default = createRule({
1651
1691
  type: "problem",
1652
1692
  docs: {
1653
1693
  description: "Prevents problematic leaked values from being rendered.",
1654
- [Symbol.for("rule_features")]: RULE_FEATURES29
1694
+ [Symbol.for("rule_features")]: RULE_FEATURES30
1655
1695
  },
1656
1696
  messages: {
1657
1697
  noLeakedConditionalRendering: "Potential leaked value {{value}} that might cause unintentionally rendered values or rendering crashes."
1658
1698
  },
1659
1699
  schema: []
1660
1700
  },
1661
- name: RULE_NAME29,
1662
- create: create29,
1701
+ name: RULE_NAME30,
1702
+ create: create30,
1663
1703
  defaultOptions: []
1664
1704
  });
1665
- function create29(context) {
1705
+ function create30(context) {
1666
1706
  if (!context.sourceCode.text.includes("&&")) return {};
1667
1707
  const { version: version2 } = shared.getSettingsFromContext(context);
1668
1708
  const allowedVariants = [
@@ -1720,25 +1760,25 @@ function create29(context) {
1720
1760
  JSXExpressionContainer: eff.flow(getReportDescriptor, kit.Reporter.make(context).send)
1721
1761
  };
1722
1762
  }
1723
- var RULE_NAME30 = "no-missing-component-display-name";
1724
- var RULE_FEATURES30 = [];
1763
+ var RULE_NAME31 = "no-missing-component-display-name";
1764
+ var RULE_FEATURES31 = [];
1725
1765
  var no_missing_component_display_name_default = createRule({
1726
1766
  meta: {
1727
1767
  type: "problem",
1728
1768
  docs: {
1729
1769
  description: "Enforces that all components have a `displayName` which can be used in devtools.",
1730
- [Symbol.for("rule_features")]: RULE_FEATURES30
1770
+ [Symbol.for("rule_features")]: RULE_FEATURES31
1731
1771
  },
1732
1772
  messages: {
1733
1773
  noMissingComponentDisplayName: "Add missing 'displayName' for component."
1734
1774
  },
1735
1775
  schema: []
1736
1776
  },
1737
- name: RULE_NAME30,
1738
- create: create30,
1777
+ name: RULE_NAME31,
1778
+ create: create31,
1739
1779
  defaultOptions: []
1740
1780
  });
1741
- function create30(context) {
1781
+ function create31(context) {
1742
1782
  if (!context.sourceCode.text.includes("memo") && !context.sourceCode.text.includes("forwardRef")) return {};
1743
1783
  const {
1744
1784
  ctx,
@@ -1774,25 +1814,25 @@ function create30(context) {
1774
1814
  }
1775
1815
  };
1776
1816
  }
1777
- var RULE_NAME31 = "no-missing-context-display-name";
1778
- var RULE_FEATURES31 = [];
1817
+ var RULE_NAME32 = "no-missing-context-display-name";
1818
+ var RULE_FEATURES32 = [];
1779
1819
  var no_missing_context_display_name_default = createRule({
1780
1820
  meta: {
1781
1821
  type: "problem",
1782
1822
  docs: {
1783
1823
  description: "Enforces that all contexts have a `displayName` which can be used in devtools.",
1784
- [Symbol.for("rule_features")]: RULE_FEATURES31
1824
+ [Symbol.for("rule_features")]: RULE_FEATURES32
1785
1825
  },
1786
1826
  messages: {
1787
1827
  noMissingContextDisplayName: "Add missing 'displayName' for context."
1788
1828
  },
1789
1829
  schema: []
1790
1830
  },
1791
- name: RULE_NAME31,
1792
- create: create31,
1831
+ name: RULE_NAME32,
1832
+ create: create32,
1793
1833
  defaultOptions: []
1794
1834
  });
1795
- function create31(context) {
1835
+ function create32(context) {
1796
1836
  if (!context.sourceCode.text.includes("createContext")) return {};
1797
1837
  const createCalls = [];
1798
1838
  const displayNameAssignments = [];
@@ -1830,14 +1870,14 @@ function create31(context) {
1830
1870
  }
1831
1871
  };
1832
1872
  }
1833
- var RULE_NAME32 = "no-missing-key";
1834
- var RULE_FEATURES32 = [];
1873
+ var RULE_NAME33 = "no-missing-key";
1874
+ var RULE_FEATURES33 = [];
1835
1875
  var no_missing_key_default = createRule({
1836
1876
  meta: {
1837
1877
  type: "problem",
1838
1878
  docs: {
1839
1879
  description: "Disallow missing `key` on items in list rendering.",
1840
- [Symbol.for("rule_features")]: RULE_FEATURES32
1880
+ [Symbol.for("rule_features")]: RULE_FEATURES33
1841
1881
  },
1842
1882
  messages: {
1843
1883
  missingKey: "Missing 'key' for element when rendering list.",
@@ -1845,11 +1885,11 @@ var no_missing_key_default = createRule({
1845
1885
  },
1846
1886
  schema: []
1847
1887
  },
1848
- name: RULE_NAME32,
1849
- create: create32,
1888
+ name: RULE_NAME33,
1889
+ create: create33,
1850
1890
  defaultOptions: []
1851
1891
  });
1852
- function create32(context) {
1892
+ function create33(context) {
1853
1893
  const report = kit.Reporter.make(context);
1854
1894
  const state = { isWithinChildrenToArray: false };
1855
1895
  function checkIteratorElement(node) {
@@ -1952,8 +1992,8 @@ function create32(context) {
1952
1992
  }
1953
1993
  };
1954
1994
  }
1955
- var RULE_NAME33 = "no-misused-capture-owner-stack";
1956
- var RULE_FEATURES33 = [
1995
+ var RULE_NAME34 = "no-misused-capture-owner-stack";
1996
+ var RULE_FEATURES34 = [
1957
1997
  "EXP"
1958
1998
  ];
1959
1999
  var no_misused_capture_owner_stack_default = createRule({
@@ -1961,7 +2001,7 @@ var no_misused_capture_owner_stack_default = createRule({
1961
2001
  type: "problem",
1962
2002
  docs: {
1963
2003
  description: "Prevents incorrect usage of `captureOwnerStack`.",
1964
- [Symbol.for("rule_features")]: RULE_FEATURES33
2004
+ [Symbol.for("rule_features")]: RULE_FEATURES34
1965
2005
  },
1966
2006
  fixable: "code",
1967
2007
  messages: {
@@ -1971,11 +2011,11 @@ var no_misused_capture_owner_stack_default = createRule({
1971
2011
  },
1972
2012
  schema: []
1973
2013
  },
1974
- name: RULE_NAME33,
1975
- create: create33,
2014
+ name: RULE_NAME34,
2015
+ create: create34,
1976
2016
  defaultOptions: []
1977
2017
  });
1978
- function create33(context) {
2018
+ function create34(context) {
1979
2019
  if (!context.sourceCode.text.includes("captureOwnerStack")) return {};
1980
2020
  const { importSource } = shared.getSettingsFromContext(context);
1981
2021
  return {
@@ -2008,25 +2048,25 @@ function isDevelopmentOnlyCheck(node) {
2008
2048
  if (AST8__namespace.isProcessEnvNodeEnvCompare(node.test, "!==", "production")) return true;
2009
2049
  return false;
2010
2050
  }
2011
- var RULE_NAME34 = "no-nested-component-definitions";
2012
- var RULE_FEATURES34 = [];
2051
+ var RULE_NAME35 = "no-nested-component-definitions";
2052
+ var RULE_FEATURES35 = [];
2013
2053
  var no_nested_component_definitions_default = createRule({
2014
2054
  meta: {
2015
2055
  type: "problem",
2016
2056
  docs: {
2017
2057
  description: "Disallow nesting component definitions inside other components.",
2018
- [Symbol.for("rule_features")]: RULE_FEATURES34
2058
+ [Symbol.for("rule_features")]: RULE_FEATURES35
2019
2059
  },
2020
2060
  messages: {
2021
2061
  noNestedComponentDefinitions: "Do not nest component definitions inside other components or props. {{suggestion}}"
2022
2062
  },
2023
2063
  schema: []
2024
2064
  },
2025
- name: RULE_NAME34,
2026
- create: create34,
2065
+ name: RULE_NAME35,
2066
+ create: create35,
2027
2067
  defaultOptions: []
2028
2068
  });
2029
- function create34(context) {
2069
+ function create35(context) {
2030
2070
  const hint = ER25__namespace.ComponentDetectionHint.SkipArrayMapArgument | ER25__namespace.ComponentDetectionHint.SkipNullLiteral | ER25__namespace.ComponentDetectionHint.SkipUndefined | ER25__namespace.ComponentDetectionHint.SkipBooleanLiteral | ER25__namespace.ComponentDetectionHint.SkipStringLiteral | ER25__namespace.ComponentDetectionHint.SkipNumberLiteral | ER25__namespace.ComponentDetectionHint.StrictLogical | ER25__namespace.ComponentDetectionHint.StrictConditional;
2031
2071
  const collector = ER25__namespace.useComponentCollector(context, { hint });
2032
2072
  const collectorLegacy = ER25__namespace.useComponentCollectorLegacy();
@@ -2122,25 +2162,25 @@ function isInsideCreateElementProps(context, node) {
2122
2162
  if (prop == null) return false;
2123
2163
  return prop === call.arguments[1];
2124
2164
  }
2125
- var RULE_NAME35 = "no-nested-component-definitions";
2126
- var RULE_FEATURES35 = [];
2165
+ var RULE_NAME36 = "no-nested-component-definitions";
2166
+ var RULE_FEATURES36 = [];
2127
2167
  var no_nested_lazy_component_declarations_default = createRule({
2128
2168
  meta: {
2129
2169
  type: "problem",
2130
2170
  docs: {
2131
2171
  description: "Disallow nesting lazy component declarations inside other components.",
2132
- [Symbol.for("rule_features")]: RULE_FEATURES35
2172
+ [Symbol.for("rule_features")]: RULE_FEATURES36
2133
2173
  },
2134
2174
  messages: {
2135
2175
  noNestedComponentDefinitions: "Do not declare lazy components inside other components. Instead, always declare them at the top level of your module."
2136
2176
  },
2137
2177
  schema: []
2138
2178
  },
2139
- name: RULE_NAME35,
2140
- create: create35,
2179
+ name: RULE_NAME36,
2180
+ create: create36,
2141
2181
  defaultOptions: []
2142
2182
  });
2143
- function create35(context) {
2183
+ function create36(context) {
2144
2184
  const hint = ER25__namespace.ComponentDetectionHint.None;
2145
2185
  const collector = ER25__namespace.useComponentCollector(context, { hint });
2146
2186
  const collectorLegacy = ER25__namespace.useComponentCollectorLegacy();
@@ -2185,25 +2225,25 @@ function create35(context) {
2185
2225
  }
2186
2226
  };
2187
2227
  }
2188
- var RULE_NAME36 = "no-prop-types";
2189
- var RULE_FEATURES36 = [];
2228
+ var RULE_NAME37 = "no-prop-types";
2229
+ var RULE_FEATURES37 = [];
2190
2230
  var no_prop_types_default = createRule({
2191
2231
  meta: {
2192
2232
  type: "problem",
2193
2233
  docs: {
2194
2234
  description: "Disallow `propTypes` in favor of TypeScript or another type-checking solution.",
2195
- [Symbol.for("rule_features")]: RULE_FEATURES36
2235
+ [Symbol.for("rule_features")]: RULE_FEATURES37
2196
2236
  },
2197
2237
  messages: {
2198
2238
  noPropTypes: "[Deprecated] Use TypeScript or another type-checking solution instead."
2199
2239
  },
2200
2240
  schema: []
2201
2241
  },
2202
- name: RULE_NAME36,
2203
- create: create36,
2242
+ name: RULE_NAME37,
2243
+ create: create37,
2204
2244
  defaultOptions: []
2205
2245
  });
2206
- function create36(context) {
2246
+ function create37(context) {
2207
2247
  if (!context.sourceCode.text.includes("propTypes")) {
2208
2248
  return {};
2209
2249
  }
@@ -2239,8 +2279,8 @@ function create36(context) {
2239
2279
  }
2240
2280
  };
2241
2281
  }
2242
- var RULE_NAME37 = "no-redundant-should-component-update";
2243
- var RULE_FEATURES37 = [];
2282
+ var RULE_NAME38 = "no-redundant-should-component-update";
2283
+ var RULE_FEATURES38 = [];
2244
2284
  function isShouldComponentUpdate(node) {
2245
2285
  return AST8__namespace.isMethodOrProperty(node) && node.key.type === types.AST_NODE_TYPES.Identifier && node.key.name === "shouldComponentUpdate";
2246
2286
  }
@@ -2249,18 +2289,18 @@ var no_redundant_should_component_update_default = createRule({
2249
2289
  type: "problem",
2250
2290
  docs: {
2251
2291
  description: "Disallow `shouldComponentUpdate` when extending `React.PureComponent`.",
2252
- [Symbol.for("rule_features")]: RULE_FEATURES37
2292
+ [Symbol.for("rule_features")]: RULE_FEATURES38
2253
2293
  },
2254
2294
  messages: {
2255
2295
  noRedundantShouldComponentUpdate: "'{{componentName}}' does not need 'shouldComponentUpdate' when extending 'React.PureComponent'."
2256
2296
  },
2257
2297
  schema: []
2258
2298
  },
2259
- name: RULE_NAME37,
2260
- create: create37,
2299
+ name: RULE_NAME38,
2300
+ create: create38,
2261
2301
  defaultOptions: []
2262
2302
  });
2263
- function create37(context) {
2303
+ function create38(context) {
2264
2304
  if (!context.sourceCode.text.includes("shouldComponentUpdate")) return {};
2265
2305
  const { ctx, listeners } = ER25__namespace.useComponentCollectorLegacy();
2266
2306
  return {
@@ -2287,25 +2327,25 @@ function create37(context) {
2287
2327
  }
2288
2328
  };
2289
2329
  }
2290
- var RULE_NAME38 = "no-set-state-in-component-did-mount";
2291
- var RULE_FEATURES38 = [];
2330
+ var RULE_NAME39 = "no-set-state-in-component-did-mount";
2331
+ var RULE_FEATURES39 = [];
2292
2332
  var no_set_state_in_component_did_mount_default = createRule({
2293
2333
  meta: {
2294
2334
  type: "problem",
2295
2335
  docs: {
2296
2336
  description: "Disallow calling `this.setState` in `componentDidMount` outside of functions, such as callbacks.",
2297
- [Symbol.for("rule_features")]: RULE_FEATURES38
2337
+ [Symbol.for("rule_features")]: RULE_FEATURES39
2298
2338
  },
2299
2339
  messages: {
2300
2340
  noSetStateInComponentDidMount: "Do not call `this.setState` in `componentDidMount` outside of functions, such as callbacks."
2301
2341
  },
2302
2342
  schema: []
2303
2343
  },
2304
- name: RULE_NAME38,
2305
- create: create38,
2344
+ name: RULE_NAME39,
2345
+ create: create39,
2306
2346
  defaultOptions: []
2307
2347
  });
2308
- function create38(context) {
2348
+ function create39(context) {
2309
2349
  if (!context.sourceCode.text.includes("componentDidMount")) return {};
2310
2350
  return {
2311
2351
  CallExpression(node) {
@@ -2326,25 +2366,25 @@ function create38(context) {
2326
2366
  }
2327
2367
  };
2328
2368
  }
2329
- var RULE_NAME39 = "no-set-state-in-component-did-update";
2330
- var RULE_FEATURES39 = [];
2369
+ var RULE_NAME40 = "no-set-state-in-component-did-update";
2370
+ var RULE_FEATURES40 = [];
2331
2371
  var no_set_state_in_component_did_update_default = createRule({
2332
2372
  meta: {
2333
2373
  type: "problem",
2334
2374
  docs: {
2335
2375
  description: "Disallow calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks.",
2336
- [Symbol.for("rule_features")]: RULE_FEATURES39
2376
+ [Symbol.for("rule_features")]: RULE_FEATURES40
2337
2377
  },
2338
2378
  messages: {
2339
2379
  noSetStateInComponentDidUpdate: "Do not call `this.setState` in `componentDidUpdate` outside of functions, such as callbacks."
2340
2380
  },
2341
2381
  schema: []
2342
2382
  },
2343
- name: RULE_NAME39,
2344
- create: create39,
2383
+ name: RULE_NAME40,
2384
+ create: create40,
2345
2385
  defaultOptions: []
2346
2386
  });
2347
- function create39(context) {
2387
+ function create40(context) {
2348
2388
  if (!context.sourceCode.text.includes("componentDidUpdate")) return {};
2349
2389
  return {
2350
2390
  CallExpression(node) {
@@ -2365,25 +2405,25 @@ function create39(context) {
2365
2405
  }
2366
2406
  };
2367
2407
  }
2368
- var RULE_NAME40 = "no-set-state-in-component-will-update";
2369
- var RULE_FEATURES40 = [];
2408
+ var RULE_NAME41 = "no-set-state-in-component-will-update";
2409
+ var RULE_FEATURES41 = [];
2370
2410
  var no_set_state_in_component_will_update_default = createRule({
2371
2411
  meta: {
2372
2412
  type: "problem",
2373
2413
  docs: {
2374
2414
  description: "Disallows calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.",
2375
- [Symbol.for("rule_features")]: RULE_FEATURES40
2415
+ [Symbol.for("rule_features")]: RULE_FEATURES41
2376
2416
  },
2377
2417
  messages: {
2378
2418
  noSetStateInComponentWillUpdate: "Do not call `this.setState` in `componentWillUpdate` outside of functions, such as callbacks."
2379
2419
  },
2380
2420
  schema: []
2381
2421
  },
2382
- name: RULE_NAME40,
2383
- create: create40,
2422
+ name: RULE_NAME41,
2423
+ create: create41,
2384
2424
  defaultOptions: []
2385
2425
  });
2386
- function create40(context) {
2426
+ function create41(context) {
2387
2427
  if (!context.sourceCode.text.includes("componentWillUpdate")) return {};
2388
2428
  return {
2389
2429
  CallExpression(node) {
@@ -2404,8 +2444,8 @@ function create40(context) {
2404
2444
  }
2405
2445
  };
2406
2446
  }
2407
- var RULE_NAME41 = "no-string-refs";
2408
- var RULE_FEATURES41 = [
2447
+ var RULE_NAME42 = "no-string-refs";
2448
+ var RULE_FEATURES42 = [
2409
2449
  "MOD"
2410
2450
  ];
2411
2451
  var no_string_refs_default = createRule({
@@ -2413,7 +2453,7 @@ var no_string_refs_default = createRule({
2413
2453
  type: "problem",
2414
2454
  docs: {
2415
2455
  description: "Replaces string refs with callback refs.",
2416
- [Symbol.for("rule_features")]: RULE_FEATURES41
2456
+ [Symbol.for("rule_features")]: RULE_FEATURES42
2417
2457
  },
2418
2458
  fixable: "code",
2419
2459
  messages: {
@@ -2421,11 +2461,11 @@ var no_string_refs_default = createRule({
2421
2461
  },
2422
2462
  schema: []
2423
2463
  },
2424
- name: RULE_NAME41,
2425
- create: create41,
2464
+ name: RULE_NAME42,
2465
+ create: create42,
2426
2466
  defaultOptions: []
2427
2467
  });
2428
- function create41(context) {
2468
+ function create42(context) {
2429
2469
  const state = {
2430
2470
  isWithinClassComponent: false
2431
2471
  };
@@ -2469,8 +2509,8 @@ function getAttributeValueText(context, node) {
2469
2509
  return null;
2470
2510
  }
2471
2511
  }
2472
- var RULE_NAME42 = "no-unsafe-component-will-mount";
2473
- var RULE_FEATURES42 = [];
2512
+ var RULE_NAME43 = "no-unsafe-component-will-mount";
2513
+ var RULE_FEATURES43 = [];
2474
2514
  function isUnsafeComponentWillMount(node) {
2475
2515
  return AST8__namespace.isMethodOrProperty(node) && node.key.type === types.AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillMount";
2476
2516
  }
@@ -2479,18 +2519,18 @@ var no_unsafe_component_will_mount_default = createRule({
2479
2519
  type: "problem",
2480
2520
  docs: {
2481
2521
  description: "Warns the usage of `UNSAFE_componentWillMount` in class components.",
2482
- [Symbol.for("rule_features")]: RULE_FEATURES42
2522
+ [Symbol.for("rule_features")]: RULE_FEATURES43
2483
2523
  },
2484
2524
  messages: {
2485
2525
  noUnsafeComponentWillMount: "Do not use 'UNSAFE_componentWillMount'."
2486
2526
  },
2487
2527
  schema: []
2488
2528
  },
2489
- name: RULE_NAME42,
2490
- create: create42,
2529
+ name: RULE_NAME43,
2530
+ create: create43,
2491
2531
  defaultOptions: []
2492
2532
  });
2493
- function create42(context) {
2533
+ function create43(context) {
2494
2534
  if (!context.sourceCode.text.includes("UNSAFE_componentWillMount")) return {};
2495
2535
  const { ctx, listeners } = ER25__namespace.useComponentCollectorLegacy();
2496
2536
  return {
@@ -2511,8 +2551,8 @@ function create42(context) {
2511
2551
  }
2512
2552
  };
2513
2553
  }
2514
- var RULE_NAME43 = "no-unsafe-component-will-receive-props";
2515
- var RULE_FEATURES43 = [];
2554
+ var RULE_NAME44 = "no-unsafe-component-will-receive-props";
2555
+ var RULE_FEATURES44 = [];
2516
2556
  function isUnsafeComponentWillReceiveProps(node) {
2517
2557
  return AST8__namespace.isMethodOrProperty(node) && node.key.type === types.AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillReceiveProps";
2518
2558
  }
@@ -2521,18 +2561,18 @@ var no_unsafe_component_will_receive_props_default = createRule({
2521
2561
  type: "problem",
2522
2562
  docs: {
2523
2563
  description: "Warns the usage of `UNSAFE_componentWillReceiveProps` in class components.",
2524
- [Symbol.for("rule_features")]: RULE_FEATURES43
2564
+ [Symbol.for("rule_features")]: RULE_FEATURES44
2525
2565
  },
2526
2566
  messages: {
2527
2567
  noUnsafeComponentWillReceiveProps: "Do not use 'UNSAFE_componentWillReceiveProps'."
2528
2568
  },
2529
2569
  schema: []
2530
2570
  },
2531
- name: RULE_NAME43,
2532
- create: create43,
2571
+ name: RULE_NAME44,
2572
+ create: create44,
2533
2573
  defaultOptions: []
2534
2574
  });
2535
- function create43(context) {
2575
+ function create44(context) {
2536
2576
  if (!context.sourceCode.text.includes("UNSAFE_componentWillReceiveProps")) {
2537
2577
  return {};
2538
2578
  }
@@ -2555,8 +2595,8 @@ function create43(context) {
2555
2595
  }
2556
2596
  };
2557
2597
  }
2558
- var RULE_NAME44 = "no-unsafe-component-will-update";
2559
- var RULE_FEATURES44 = [];
2598
+ var RULE_NAME45 = "no-unsafe-component-will-update";
2599
+ var RULE_FEATURES45 = [];
2560
2600
  function isUnsafeComponentWillUpdate(node) {
2561
2601
  return AST8__namespace.isMethodOrProperty(node) && node.key.type === types.AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillUpdate";
2562
2602
  }
@@ -2565,18 +2605,18 @@ var no_unsafe_component_will_update_default = createRule({
2565
2605
  type: "problem",
2566
2606
  docs: {
2567
2607
  description: "Warns the usage of `UNSAFE_componentWillUpdate` in class components.",
2568
- [Symbol.for("rule_features")]: RULE_FEATURES44
2608
+ [Symbol.for("rule_features")]: RULE_FEATURES45
2569
2609
  },
2570
2610
  messages: {
2571
2611
  noUnsafeComponentWillUpdate: "Do not use 'UNSAFE_componentWillUpdate'."
2572
2612
  },
2573
2613
  schema: []
2574
2614
  },
2575
- name: RULE_NAME44,
2576
- create: create44,
2615
+ name: RULE_NAME45,
2616
+ create: create45,
2577
2617
  defaultOptions: []
2578
2618
  });
2579
- function create44(context) {
2619
+ function create45(context) {
2580
2620
  if (!context.sourceCode.text.includes("UNSAFE_componentWillUpdate")) return {};
2581
2621
  const { ctx, listeners } = ER25__namespace.useComponentCollectorLegacy();
2582
2622
  return {
@@ -2597,25 +2637,25 @@ function create44(context) {
2597
2637
  }
2598
2638
  };
2599
2639
  }
2600
- var RULE_NAME45 = "no-unstable-context-value";
2601
- var RULE_FEATURES45 = [];
2640
+ var RULE_NAME46 = "no-unstable-context-value";
2641
+ var RULE_FEATURES46 = [];
2602
2642
  var no_unstable_context_value_default = createRule({
2603
2643
  meta: {
2604
2644
  type: "problem",
2605
2645
  docs: {
2606
2646
  description: "Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`.",
2607
- [Symbol.for("rule_features")]: RULE_FEATURES45
2647
+ [Symbol.for("rule_features")]: RULE_FEATURES46
2608
2648
  },
2609
2649
  messages: {
2610
2650
  unstableContextValue: "A/an '{{type}}' passed as the value prop to the context provider should not be constructed. It will change on every render. {{suggestion}}"
2611
2651
  },
2612
2652
  schema: []
2613
2653
  },
2614
- name: RULE_NAME45,
2615
- create: create45,
2654
+ name: RULE_NAME46,
2655
+ create: create46,
2616
2656
  defaultOptions: []
2617
2657
  });
2618
- function create45(context) {
2658
+ function create46(context) {
2619
2659
  const { version: version2 } = shared.getSettingsFromContext(context);
2620
2660
  const isReact18OrBelow = compareVersions.compare(version2, "19.0.0", "<");
2621
2661
  const { ctx, listeners } = ER25__namespace.useComponentCollector(context);
@@ -2670,25 +2710,25 @@ function isContextName(name5, isReact18OrBelow) {
2670
2710
  }
2671
2711
  return false;
2672
2712
  }
2673
- var RULE_NAME46 = "no-unstable-default-props";
2674
- var RULE_FEATURES46 = [];
2713
+ var RULE_NAME47 = "no-unstable-default-props";
2714
+ var RULE_FEATURES47 = [];
2675
2715
  var no_unstable_default_props_default = createRule({
2676
2716
  meta: {
2677
2717
  type: "problem",
2678
2718
  docs: {
2679
2719
  description: "Prevents using referential-type values as default props in object destructuring.",
2680
- [Symbol.for("rule_features")]: RULE_FEATURES46
2720
+ [Symbol.for("rule_features")]: RULE_FEATURES47
2681
2721
  },
2682
2722
  messages: {
2683
2723
  noUnstableDefaultProps: "A/an '{{forbiddenType}}' as default prop. This could lead to potential infinite render loop in React. Use a variable instead of '{{forbiddenType}}'."
2684
2724
  },
2685
2725
  schema: []
2686
2726
  },
2687
- name: RULE_NAME46,
2688
- create: create46,
2727
+ name: RULE_NAME47,
2728
+ create: create47,
2689
2729
  defaultOptions: []
2690
2730
  });
2691
- function create46(context) {
2731
+ function create47(context) {
2692
2732
  const { ctx, listeners } = ER25__namespace.useComponentCollector(context);
2693
2733
  const declarators = /* @__PURE__ */ new WeakMap();
2694
2734
  return {
@@ -2744,8 +2784,8 @@ function create46(context) {
2744
2784
  }
2745
2785
  };
2746
2786
  }
2747
- var RULE_NAME47 = "no-unused-class-component-members";
2748
- var RULE_FEATURES47 = [];
2787
+ var RULE_NAME48 = "no-unused-class-component-members";
2788
+ var RULE_FEATURES48 = [];
2749
2789
  var LIFECYCLE_METHODS = /* @__PURE__ */ new Set([
2750
2790
  "componentDidCatch",
2751
2791
  "componentDidMount",
@@ -2771,18 +2811,18 @@ var no_unused_class_component_members_default = createRule({
2771
2811
  type: "problem",
2772
2812
  docs: {
2773
2813
  description: "Warns unused class component methods and properties.",
2774
- [Symbol.for("rule_features")]: RULE_FEATURES47
2814
+ [Symbol.for("rule_features")]: RULE_FEATURES48
2775
2815
  },
2776
2816
  messages: {
2777
2817
  noUnusedClassComponentMembers: "Unused method or property '{{methodName}}'' of class '{{className}}'."
2778
2818
  },
2779
2819
  schema: []
2780
2820
  },
2781
- name: RULE_NAME47,
2782
- create: create47,
2821
+ name: RULE_NAME48,
2822
+ create: create48,
2783
2823
  defaultOptions: []
2784
2824
  });
2785
- function create47(context) {
2825
+ function create48(context) {
2786
2826
  const classEntries = [];
2787
2827
  const methodEntries = [];
2788
2828
  const propertyDefs = /* @__PURE__ */ new WeakMap();
@@ -2892,8 +2932,8 @@ function create47(context) {
2892
2932
  }
2893
2933
  };
2894
2934
  }
2895
- var RULE_NAME48 = "no-unused-state";
2896
- var RULE_FEATURES48 = [];
2935
+ var RULE_NAME49 = "no-unused-state";
2936
+ var RULE_FEATURES49 = [];
2897
2937
  function isKeyLiteral3(node, key) {
2898
2938
  return tsPattern.match(key).with({ type: types.AST_NODE_TYPES.Literal }, eff.constTrue).with({ type: types.AST_NODE_TYPES.TemplateLiteral, expressions: [] }, eff.constTrue).with({ type: types.AST_NODE_TYPES.Identifier }, () => !node.computed).otherwise(eff.constFalse);
2899
2939
  }
@@ -2902,18 +2942,18 @@ var no_unused_state_default = createRule({
2902
2942
  type: "problem",
2903
2943
  docs: {
2904
2944
  description: "Warns unused class component state.",
2905
- [Symbol.for("rule_features")]: RULE_FEATURES48
2945
+ [Symbol.for("rule_features")]: RULE_FEATURES49
2906
2946
  },
2907
2947
  messages: {
2908
2948
  noUnusedState: "Unused class component state in '{{className}}'"
2909
2949
  },
2910
2950
  schema: []
2911
2951
  },
2912
- name: RULE_NAME48,
2913
- create: create48,
2952
+ name: RULE_NAME49,
2953
+ create: create49,
2914
2954
  defaultOptions: []
2915
2955
  });
2916
- function create48(context) {
2956
+ function create49(context) {
2917
2957
  const classEntries = [];
2918
2958
  const methodEntries = [];
2919
2959
  const constructorEntries = [];
@@ -3047,8 +3087,8 @@ function create48(context) {
3047
3087
  }
3048
3088
  };
3049
3089
  }
3050
- var RULE_NAME49 = "no-use-context";
3051
- var RULE_FEATURES49 = [
3090
+ var RULE_NAME50 = "no-use-context";
3091
+ var RULE_FEATURES50 = [
3052
3092
  "MOD"
3053
3093
  ];
3054
3094
  var no_use_context_default = createRule({
@@ -3056,7 +3096,7 @@ var no_use_context_default = createRule({
3056
3096
  type: "problem",
3057
3097
  docs: {
3058
3098
  description: "Replaces usages of `useContext` with `use`.",
3059
- [Symbol.for("rule_features")]: RULE_FEATURES49
3099
+ [Symbol.for("rule_features")]: RULE_FEATURES50
3060
3100
  },
3061
3101
  fixable: "code",
3062
3102
  messages: {
@@ -3064,11 +3104,11 @@ var no_use_context_default = createRule({
3064
3104
  },
3065
3105
  schema: []
3066
3106
  },
3067
- name: RULE_NAME49,
3068
- create: create49,
3107
+ name: RULE_NAME50,
3108
+ create: create50,
3069
3109
  defaultOptions: []
3070
3110
  });
3071
- function create49(context) {
3111
+ function create50(context) {
3072
3112
  if (!context.sourceCode.text.includes("useContext")) return {};
3073
3113
  const settings4 = shared.getSettingsFromContext(context);
3074
3114
  if (compareVersions.compare(settings4.version, "19.0.0", "<")) {
@@ -3151,25 +3191,25 @@ function getCorrelativeTokens(context, node) {
3151
3191
  }
3152
3192
  return tokens;
3153
3193
  }
3154
- var RULE_NAME50 = "no-useless-forward-ref";
3155
- var RULE_FEATURES50 = [];
3194
+ var RULE_NAME51 = "no-useless-forward-ref";
3195
+ var RULE_FEATURES51 = [];
3156
3196
  var no_useless_forward_ref_default = createRule({
3157
3197
  meta: {
3158
3198
  type: "problem",
3159
3199
  docs: {
3160
3200
  description: "Disallow useless `forwardRef` calls on components that don't use `ref`s.",
3161
- [Symbol.for("rule_features")]: RULE_FEATURES50
3201
+ [Symbol.for("rule_features")]: RULE_FEATURES51
3162
3202
  },
3163
3203
  messages: {
3164
3204
  noUselessForwardRef: "A 'forwardRef' is used with this component but no 'ref' parameter is set."
3165
3205
  },
3166
3206
  schema: []
3167
3207
  },
3168
- name: RULE_NAME50,
3169
- create: create50,
3208
+ name: RULE_NAME51,
3209
+ create: create51,
3170
3210
  defaultOptions: []
3171
3211
  });
3172
- function create50(context) {
3212
+ function create51(context) {
3173
3213
  return {
3174
3214
  CallExpression(node) {
3175
3215
  if (!ER25__namespace.isForwardRefCall(context, node)) {
@@ -3190,7 +3230,7 @@ function create50(context) {
3190
3230
  }
3191
3231
  };
3192
3232
  }
3193
- var RULE_NAME51 = "no-useless-fragment";
3233
+ var RULE_NAME52 = "no-useless-fragment";
3194
3234
  var defaultOptions = [{
3195
3235
  allowExpressions: true
3196
3236
  }];
@@ -3216,11 +3256,11 @@ var no_useless_fragment_default = createRule({
3216
3256
  }
3217
3257
  }]
3218
3258
  },
3219
- name: RULE_NAME51,
3220
- create: create51,
3259
+ name: RULE_NAME52,
3260
+ create: create52,
3221
3261
  defaultOptions
3222
3262
  });
3223
- function create51(context, [option]) {
3263
+ function create52(context, [option]) {
3224
3264
  const { allowExpressions = true } = option;
3225
3265
  return {
3226
3266
  JSXElement(node) {
@@ -3340,8 +3380,8 @@ function canFix(context, node) {
3340
3380
  }
3341
3381
  return true;
3342
3382
  }
3343
- var RULE_NAME52 = "prefer-destructuring-assignment";
3344
- var RULE_FEATURES51 = [];
3383
+ var RULE_NAME53 = "prefer-destructuring-assignment";
3384
+ var RULE_FEATURES52 = [];
3345
3385
  function isMemberExpressionWithObjectName(node) {
3346
3386
  return node.object.type === types.AST_NODE_TYPES.Identifier && "name" in node.object;
3347
3387
  }
@@ -3350,18 +3390,18 @@ var prefer_destructuring_assignment_default = createRule({
3350
3390
  type: "problem",
3351
3391
  docs: {
3352
3392
  description: "Enforces destructuring assignment for component props and context.",
3353
- [Symbol.for("rule_features")]: RULE_FEATURES51
3393
+ [Symbol.for("rule_features")]: RULE_FEATURES52
3354
3394
  },
3355
3395
  messages: {
3356
3396
  preferDestructuringAssignment: "Use destructuring assignment for {{name}}."
3357
3397
  },
3358
3398
  schema: []
3359
3399
  },
3360
- name: RULE_NAME52,
3361
- create: create52,
3400
+ name: RULE_NAME53,
3401
+ create: create53,
3362
3402
  defaultOptions: []
3363
3403
  });
3364
- function create52(context) {
3404
+ function create53(context) {
3365
3405
  const { ctx, listeners } = ER25__namespace.useComponentCollector(context);
3366
3406
  const memberExpressionWithNames = [];
3367
3407
  return {
@@ -3421,8 +3461,8 @@ function create52(context) {
3421
3461
  }
3422
3462
  };
3423
3463
  }
3424
- var RULE_NAME53 = "prefer-react-namespace-import";
3425
- var RULE_FEATURES52 = [
3464
+ var RULE_NAME54 = "prefer-react-namespace-import";
3465
+ var RULE_FEATURES53 = [
3426
3466
  "FIX"
3427
3467
  ];
3428
3468
  var prefer_react_namespace_import_default = createRule({
@@ -3430,7 +3470,7 @@ var prefer_react_namespace_import_default = createRule({
3430
3470
  type: "problem",
3431
3471
  docs: {
3432
3472
  description: "Enforces React is imported via a namespace import.",
3433
- [Symbol.for("rule_features")]: RULE_FEATURES52
3473
+ [Symbol.for("rule_features")]: RULE_FEATURES53
3434
3474
  },
3435
3475
  fixable: "code",
3436
3476
  messages: {
@@ -3438,11 +3478,11 @@ var prefer_react_namespace_import_default = createRule({
3438
3478
  },
3439
3479
  schema: []
3440
3480
  },
3441
- name: RULE_NAME53,
3442
- create: create53,
3481
+ name: RULE_NAME54,
3482
+ create: create54,
3443
3483
  defaultOptions: []
3444
3484
  });
3445
- function create53(context) {
3485
+ function create54(context) {
3446
3486
  const { importSource } = shared.getSettingsFromContext(context);
3447
3487
  return {
3448
3488
  [`ImportDeclaration[source.value="${importSource}"] ImportDefaultSpecifier`](node) {
@@ -3477,8 +3517,8 @@ function create53(context) {
3477
3517
  }
3478
3518
  };
3479
3519
  }
3480
- var RULE_NAME54 = "prefer-read-only-props";
3481
- var RULE_FEATURES53 = [
3520
+ var RULE_NAME55 = "prefer-read-only-props";
3521
+ var RULE_FEATURES54 = [
3482
3522
  "TSC",
3483
3523
  "EXP"
3484
3524
  ];
@@ -3487,18 +3527,18 @@ var prefer_read_only_props_default = createRule({
3487
3527
  type: "problem",
3488
3528
  docs: {
3489
3529
  description: "Enforces read-only props in components.",
3490
- [Symbol.for("rule_features")]: RULE_FEATURES53
3530
+ [Symbol.for("rule_features")]: RULE_FEATURES54
3491
3531
  },
3492
3532
  messages: {
3493
3533
  preferReadOnlyProps: "A function component's props should be read-only."
3494
3534
  },
3495
3535
  schema: []
3496
3536
  },
3497
- name: RULE_NAME54,
3498
- create: create54,
3537
+ name: RULE_NAME55,
3538
+ create: create55,
3499
3539
  defaultOptions: []
3500
3540
  });
3501
- function create54(context) {
3541
+ function create55(context) {
3502
3542
  const services = utils.ESLintUtils.getParserServices(context, false);
3503
3543
  const { ctx, listeners } = ER25__namespace.useComponentCollector(context);
3504
3544
  return {
@@ -3528,8 +3568,8 @@ function isTypeReadonlyLoose(services, type) {
3528
3568
  return true;
3529
3569
  }
3530
3570
  }
3531
- var RULE_NAME55 = "prefer-shorthand-boolean";
3532
- var RULE_FEATURES54 = [
3571
+ var RULE_NAME56 = "prefer-shorthand-boolean";
3572
+ var RULE_FEATURES55 = [
3533
3573
  "FIX"
3534
3574
  ];
3535
3575
  var prefer_shorthand_boolean_default = createRule({
@@ -3537,7 +3577,7 @@ var prefer_shorthand_boolean_default = createRule({
3537
3577
  type: "problem",
3538
3578
  docs: {
3539
3579
  description: "Enforces shorthand syntax for boolean attributes.",
3540
- [Symbol.for("rule_features")]: RULE_FEATURES54
3580
+ [Symbol.for("rule_features")]: RULE_FEATURES55
3541
3581
  },
3542
3582
  fixable: "code",
3543
3583
  messages: {
@@ -3545,11 +3585,11 @@ var prefer_shorthand_boolean_default = createRule({
3545
3585
  },
3546
3586
  schema: []
3547
3587
  },
3548
- name: RULE_NAME55,
3549
- create: create55,
3588
+ name: RULE_NAME56,
3589
+ create: create56,
3550
3590
  defaultOptions: []
3551
3591
  });
3552
- function create55(context) {
3592
+ function create56(context) {
3553
3593
  return {
3554
3594
  JSXAttribute(node) {
3555
3595
  const { value } = node;
@@ -3569,8 +3609,8 @@ function create55(context) {
3569
3609
  }
3570
3610
  };
3571
3611
  }
3572
- var RULE_NAME56 = "prefer-shorthand-fragment";
3573
- var RULE_FEATURES55 = [
3612
+ var RULE_NAME57 = "prefer-shorthand-fragment";
3613
+ var RULE_FEATURES56 = [
3574
3614
  "FIX"
3575
3615
  ];
3576
3616
  var prefer_shorthand_fragment_default = createRule({
@@ -3578,7 +3618,7 @@ var prefer_shorthand_fragment_default = createRule({
3578
3618
  type: "problem",
3579
3619
  docs: {
3580
3620
  description: "Enforces shorthand syntax for fragments.",
3581
- [Symbol.for("rule_features")]: RULE_FEATURES55
3621
+ [Symbol.for("rule_features")]: RULE_FEATURES56
3582
3622
  },
3583
3623
  fixable: "code",
3584
3624
  messages: {
@@ -3586,11 +3626,11 @@ var prefer_shorthand_fragment_default = createRule({
3586
3626
  },
3587
3627
  schema: []
3588
3628
  },
3589
- name: RULE_NAME56,
3590
- create: create56,
3629
+ name: RULE_NAME57,
3630
+ create: create57,
3591
3631
  defaultOptions: []
3592
3632
  });
3593
- function create56(context) {
3633
+ function create57(context) {
3594
3634
  return {
3595
3635
  JSXElement(node) {
3596
3636
  if (!ER25__namespace.isFragmentElement(context, node)) return;
@@ -3676,6 +3716,7 @@ var plugin = {
3676
3716
  "prefer-shorthand-boolean": prefer_shorthand_boolean_default,
3677
3717
  "prefer-shorthand-fragment": prefer_shorthand_fragment_default,
3678
3718
  // Part: JSX only rules
3719
+ "jsx-key-before-spread": jsx_key_before_spread_default,
3679
3720
  "jsx-no-duplicate-props": jsx_no_duplicate_props_default,
3680
3721
  "jsx-no-undef": jsx_no_undef_default,
3681
3722
  "jsx-uses-react": jsx_uses_react_default,