eslint-plugin-react-x 1.50.0 → 1.50.1-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.mjs CHANGED
@@ -115,7 +115,7 @@ var settings3 = {
115
115
 
116
116
  // package.json
117
117
  var name4 = "eslint-plugin-react-x";
118
- var version = "1.50.0";
118
+ var version = "1.50.1-beta.1";
119
119
  var createRule = ESLintUtils.RuleCreator(getDocsUrl("x"));
120
120
 
121
121
  // src/rules/avoid-shorthand-boolean.ts
@@ -272,17 +272,17 @@ function create4(context) {
272
272
  }
273
273
  };
274
274
  }
275
- var RULE_NAME5 = "jsx-no-undef";
275
+ var RULE_NAME5 = "jsx-no-iife";
276
276
  var RULE_FEATURES5 = [];
277
- var jsx_no_undef_default = createRule({
277
+ var jsx_no_iife_default = createRule({
278
278
  meta: {
279
279
  type: "problem",
280
280
  docs: {
281
- description: "Disallow undefined variables in JSX.",
281
+ description: "Disallows 'IIFE' in JSX elements.",
282
282
  [Symbol.for("rule_features")]: RULE_FEATURES5
283
283
  },
284
284
  messages: {
285
- jsxNoUndef: "JSX variable '{{name}}' is not defined."
285
+ jsxNoIife: ""
286
286
  },
287
287
  schema: []
288
288
  },
@@ -291,6 +291,44 @@ var jsx_no_undef_default = createRule({
291
291
  defaultOptions: []
292
292
  });
293
293
  function create5(context) {
294
+ return {
295
+ "JSXElement :function"(node) {
296
+ if (node.parent.type === AST_NODE_TYPES.CallExpression && node.parent.callee === node) {
297
+ context.report({
298
+ messageId: "jsxNoIife",
299
+ node: node.parent
300
+ });
301
+ }
302
+ },
303
+ "JSXFragment :function"(node) {
304
+ if (node.parent.type === AST_NODE_TYPES.CallExpression && node.parent.callee === node) {
305
+ context.report({
306
+ messageId: "jsxNoIife",
307
+ node: node.parent
308
+ });
309
+ }
310
+ }
311
+ };
312
+ }
313
+ var RULE_NAME6 = "jsx-no-undef";
314
+ var RULE_FEATURES6 = [];
315
+ var jsx_no_undef_default = createRule({
316
+ meta: {
317
+ type: "problem",
318
+ docs: {
319
+ description: "Disallow undefined variables in JSX.",
320
+ [Symbol.for("rule_features")]: RULE_FEATURES6
321
+ },
322
+ messages: {
323
+ jsxNoUndef: "JSX variable '{{name}}' is not defined."
324
+ },
325
+ schema: []
326
+ },
327
+ name: RULE_NAME6,
328
+ create: create6,
329
+ defaultOptions: []
330
+ });
331
+ function create6(context) {
294
332
  return {
295
333
  JSXOpeningElement(node) {
296
334
  const name5 = match(node.name).with({ type: AST_NODE_TYPES.JSXIdentifier }, (n) => n.name).with({ type: AST_NODE_TYPES.JSXMemberExpression, object: { type: AST_NODE_TYPES.JSXIdentifier } }, (n) => n.object.name).otherwise(() => null);
@@ -310,25 +348,25 @@ function create5(context) {
310
348
  };
311
349
  }
312
350
  var { JsxEmit } = JsxConfig;
313
- var RULE_NAME6 = "jsx-uses-react";
314
- var RULE_FEATURES6 = [];
351
+ var RULE_NAME7 = "jsx-uses-react";
352
+ var RULE_FEATURES7 = [];
315
353
  var jsx_uses_react_default = createRule({
316
354
  meta: {
317
355
  type: "problem",
318
356
  docs: {
319
357
  description: "Marks React variables as used when JSX is used.",
320
- [Symbol.for("rule_features")]: RULE_FEATURES6
358
+ [Symbol.for("rule_features")]: RULE_FEATURES7
321
359
  },
322
360
  messages: {
323
361
  jsxUsesReact: "Marked {{name}} as used."
324
362
  },
325
363
  schema: []
326
364
  },
327
- name: RULE_NAME6,
328
- create: create6,
365
+ name: RULE_NAME7,
366
+ create: create7,
329
367
  defaultOptions: []
330
368
  });
331
- function create6(context) {
369
+ function create7(context) {
332
370
  const jsxConfig = {
333
371
  ...JsxConfig.getFromContext(context),
334
372
  ...JsxConfig.getFromAnnotation(context)
@@ -357,25 +395,25 @@ function debugReport(context, node, name5) {
357
395
  data: { name: name5 }
358
396
  });
359
397
  }
360
- var RULE_NAME7 = "jsx-uses-vars";
361
- var RULE_FEATURES7 = [];
398
+ var RULE_NAME8 = "jsx-uses-vars";
399
+ var RULE_FEATURES8 = [];
362
400
  var jsx_uses_vars_default = createRule({
363
401
  meta: {
364
402
  type: "problem",
365
403
  docs: {
366
404
  description: "Marks variables used in JSX elements as used.",
367
- [Symbol.for("rule_features")]: RULE_FEATURES7
405
+ [Symbol.for("rule_features")]: RULE_FEATURES8
368
406
  },
369
407
  messages: {
370
408
  jsxUsesVars: ""
371
409
  },
372
410
  schema: []
373
411
  },
374
- name: RULE_NAME7,
375
- create: create7,
412
+ name: RULE_NAME8,
413
+ create: create8,
376
414
  defaultOptions: []
377
415
  });
378
- function create7(context) {
416
+ function create8(context) {
379
417
  return {
380
418
  JSXOpeningElement(node) {
381
419
  switch (node.name.type) {
@@ -397,8 +435,8 @@ function create7(context) {
397
435
  }
398
436
  };
399
437
  }
400
- var RULE_NAME8 = "no-access-state-in-setstate";
401
- var RULE_FEATURES8 = [];
438
+ var RULE_NAME9 = "no-access-state-in-setstate";
439
+ var RULE_FEATURES9 = [];
402
440
  function isKeyLiteral(node, key) {
403
441
  return match(key).with({ type: AST_NODE_TYPES.Literal }, constTrue).with({ type: AST_NODE_TYPES.TemplateLiteral, expressions: [] }, constTrue).with({ type: AST_NODE_TYPES.Identifier }, () => !node.computed).otherwise(constFalse);
404
442
  }
@@ -407,18 +445,18 @@ var no_access_state_in_setstate_default = createRule({
407
445
  type: "problem",
408
446
  docs: {
409
447
  description: "Disallow accessing `this.state` inside `setState` calls.",
410
- [Symbol.for("rule_features")]: RULE_FEATURES8
448
+ [Symbol.for("rule_features")]: RULE_FEATURES9
411
449
  },
412
450
  messages: {
413
451
  noAccessStateInSetstate: "Do not access 'this.state' within 'setState'. Use the update function instead."
414
452
  },
415
453
  schema: []
416
454
  },
417
- name: RULE_NAME8,
418
- create: create8,
455
+ name: RULE_NAME9,
456
+ create: create9,
419
457
  defaultOptions: []
420
458
  });
421
- function create8(context) {
459
+ function create9(context) {
422
460
  if (!context.sourceCode.text.includes("setState")) {
423
461
  return {};
424
462
  }
@@ -509,8 +547,8 @@ function create8(context) {
509
547
  }
510
548
  };
511
549
  }
512
- var RULE_NAME9 = "no-array-index-key";
513
- var RULE_FEATURES9 = [];
550
+ var RULE_NAME10 = "no-array-index-key";
551
+ var RULE_FEATURES10 = [];
514
552
  var reactChildrenMethod = ["forEach", "map"];
515
553
  function isReactChildrenMethod(name5) {
516
554
  return reactChildrenMethod.some((method) => method === name5);
@@ -577,18 +615,18 @@ var no_array_index_key_default = createRule({
577
615
  type: "problem",
578
616
  docs: {
579
617
  description: "Disallow an item's index in the array as its key.",
580
- [Symbol.for("rule_features")]: RULE_FEATURES9
618
+ [Symbol.for("rule_features")]: RULE_FEATURES10
581
619
  },
582
620
  messages: {
583
621
  noArrayIndexKey: "Do not use item index in the array as its key."
584
622
  },
585
623
  schema: []
586
624
  },
587
- name: RULE_NAME9,
588
- create: create9,
625
+ name: RULE_NAME10,
626
+ create: create10,
589
627
  defaultOptions: []
590
628
  });
591
- function create9(context) {
629
+ function create10(context) {
592
630
  const report = Reporter.make(context);
593
631
  const indexParamNames = [];
594
632
  function isArrayIndex(node) {
@@ -690,25 +728,25 @@ function create9(context) {
690
728
  }
691
729
  };
692
730
  }
693
- var RULE_NAME10 = "no-children-count";
694
- var RULE_FEATURES10 = [];
731
+ var RULE_NAME11 = "no-children-count";
732
+ var RULE_FEATURES11 = [];
695
733
  var no_children_count_default = createRule({
696
734
  meta: {
697
735
  type: "problem",
698
736
  docs: {
699
737
  description: "Disallow `Children.count`.",
700
- [Symbol.for("rule_features")]: RULE_FEATURES10
738
+ [Symbol.for("rule_features")]: RULE_FEATURES11
701
739
  },
702
740
  messages: {
703
741
  noChildrenCount: "Using 'Children.count' is uncommon and can lead to fragile code. Use alternatives instead."
704
742
  },
705
743
  schema: []
706
744
  },
707
- name: RULE_NAME10,
708
- create: create10,
745
+ name: RULE_NAME11,
746
+ create: create11,
709
747
  defaultOptions: []
710
748
  });
711
- function create10(context) {
749
+ function create11(context) {
712
750
  return {
713
751
  MemberExpression(node) {
714
752
  if (ER25.isChildrenCount(context, node)) {
@@ -720,25 +758,25 @@ function create10(context) {
720
758
  }
721
759
  };
722
760
  }
723
- var RULE_NAME11 = "no-children-for-each";
724
- var RULE_FEATURES11 = [];
761
+ var RULE_NAME12 = "no-children-for-each";
762
+ var RULE_FEATURES12 = [];
725
763
  var no_children_for_each_default = createRule({
726
764
  meta: {
727
765
  type: "problem",
728
766
  docs: {
729
767
  description: "Disallow 'Children.forEach'.",
730
- [Symbol.for("rule_features")]: RULE_FEATURES11
768
+ [Symbol.for("rule_features")]: RULE_FEATURES12
731
769
  },
732
770
  messages: {
733
771
  noChildrenForEach: "Using 'Children.forEach' is uncommon and can lead to fragile code. Use alternatives instead."
734
772
  },
735
773
  schema: []
736
774
  },
737
- name: RULE_NAME11,
738
- create: create11,
775
+ name: RULE_NAME12,
776
+ create: create12,
739
777
  defaultOptions: []
740
778
  });
741
- function create11(context) {
779
+ function create12(context) {
742
780
  return {
743
781
  MemberExpression(node) {
744
782
  if (ER25.isChildrenForEach(context, node)) {
@@ -750,25 +788,25 @@ function create11(context) {
750
788
  }
751
789
  };
752
790
  }
753
- var RULE_NAME12 = "no-children-map";
754
- var RULE_FEATURES12 = [];
791
+ var RULE_NAME13 = "no-children-map";
792
+ var RULE_FEATURES13 = [];
755
793
  var no_children_map_default = createRule({
756
794
  meta: {
757
795
  type: "problem",
758
796
  docs: {
759
797
  description: "Disallow `Children.map`.",
760
- [Symbol.for("rule_features")]: RULE_FEATURES12
798
+ [Symbol.for("rule_features")]: RULE_FEATURES13
761
799
  },
762
800
  messages: {
763
801
  noChildrenMap: "Using 'Children.map' is uncommon and can lead to fragile code. Use alternatives instead."
764
802
  },
765
803
  schema: []
766
804
  },
767
- name: RULE_NAME12,
768
- create: create12,
805
+ name: RULE_NAME13,
806
+ create: create13,
769
807
  defaultOptions: []
770
808
  });
771
- function create12(context) {
809
+ function create13(context) {
772
810
  return {
773
811
  MemberExpression(node) {
774
812
  if (ER25.isChildrenMap(context, node)) {
@@ -780,25 +818,25 @@ function create12(context) {
780
818
  }
781
819
  };
782
820
  }
783
- var RULE_NAME13 = "no-children-only";
784
- var RULE_FEATURES13 = [];
821
+ var RULE_NAME14 = "no-children-only";
822
+ var RULE_FEATURES14 = [];
785
823
  var no_children_only_default = createRule({
786
824
  meta: {
787
825
  type: "problem",
788
826
  docs: {
789
827
  description: "Disallow `Children.only`.",
790
- [Symbol.for("rule_features")]: RULE_FEATURES13
828
+ [Symbol.for("rule_features")]: RULE_FEATURES14
791
829
  },
792
830
  messages: {
793
831
  noChildrenOnly: "Using 'Children.only' is uncommon and can lead to fragile code. Use alternatives instead."
794
832
  },
795
833
  schema: []
796
834
  },
797
- name: RULE_NAME13,
798
- create: create13,
835
+ name: RULE_NAME14,
836
+ create: create14,
799
837
  defaultOptions: []
800
838
  });
801
- function create13(context) {
839
+ function create14(context) {
802
840
  return {
803
841
  MemberExpression(node) {
804
842
  if (ER25.isChildrenOnly(context, node)) {
@@ -810,25 +848,25 @@ function create13(context) {
810
848
  }
811
849
  };
812
850
  }
813
- var RULE_NAME14 = "no-children-prop";
814
- var RULE_FEATURES14 = [];
851
+ var RULE_NAME15 = "no-children-prop";
852
+ var RULE_FEATURES15 = [];
815
853
  var no_children_prop_default = createRule({
816
854
  meta: {
817
855
  type: "problem",
818
856
  docs: {
819
857
  description: "Disallow passing `children` as a prop.",
820
- [Symbol.for("rule_features")]: RULE_FEATURES14
858
+ [Symbol.for("rule_features")]: RULE_FEATURES15
821
859
  },
822
860
  messages: {
823
861
  noChildrenProp: "Do not pass 'children' as props."
824
862
  },
825
863
  schema: []
826
864
  },
827
- name: RULE_NAME14,
828
- create: create14,
865
+ name: RULE_NAME15,
866
+ create: create15,
829
867
  defaultOptions: []
830
868
  });
831
- function create14(context) {
869
+ function create15(context) {
832
870
  return {
833
871
  JSXElement(node) {
834
872
  const attributes = node.openingElement.attributes;
@@ -842,25 +880,25 @@ function create14(context) {
842
880
  }
843
881
  };
844
882
  }
845
- var RULE_NAME15 = "no-children-to-array";
846
- var RULE_FEATURES15 = [];
883
+ var RULE_NAME16 = "no-children-to-array";
884
+ var RULE_FEATURES16 = [];
847
885
  var no_children_to_array_default = createRule({
848
886
  meta: {
849
887
  type: "problem",
850
888
  docs: {
851
889
  description: "Disallow `Children.toArray`.",
852
- [Symbol.for("rule_features")]: RULE_FEATURES15
890
+ [Symbol.for("rule_features")]: RULE_FEATURES16
853
891
  },
854
892
  messages: {
855
893
  noChildrenToArray: "Using 'Children.toArray' is uncommon and can lead to fragile code. Use alternatives instead."
856
894
  },
857
895
  schema: []
858
896
  },
859
- name: RULE_NAME15,
860
- create: create15,
897
+ name: RULE_NAME16,
898
+ create: create16,
861
899
  defaultOptions: []
862
900
  });
863
- function create15(context) {
901
+ function create16(context) {
864
902
  return {
865
903
  MemberExpression(node) {
866
904
  if (ER25.isChildrenToArray(context, node)) {
@@ -872,25 +910,25 @@ function create15(context) {
872
910
  }
873
911
  };
874
912
  }
875
- var RULE_NAME16 = "no-class-component";
876
- var RULE_FEATURES16 = [];
913
+ var RULE_NAME17 = "no-class-component";
914
+ var RULE_FEATURES17 = [];
877
915
  var no_class_component_default = createRule({
878
916
  meta: {
879
917
  type: "problem",
880
918
  docs: {
881
919
  description: "Disallow class components except for error boundaries.",
882
- [Symbol.for("rule_features")]: RULE_FEATURES16
920
+ [Symbol.for("rule_features")]: RULE_FEATURES17
883
921
  },
884
922
  messages: {
885
923
  noClassComponent: "Avoid using class components. Use function components instead."
886
924
  },
887
925
  schema: []
888
926
  },
889
- name: RULE_NAME16,
890
- create: create16,
927
+ name: RULE_NAME17,
928
+ create: create17,
891
929
  defaultOptions: []
892
930
  });
893
- function create16(context) {
931
+ function create17(context) {
894
932
  if (!context.sourceCode.text.includes("Component")) return {};
895
933
  const { ctx, listeners } = ER25.useComponentCollectorLegacy();
896
934
  return {
@@ -912,25 +950,25 @@ function create16(context) {
912
950
  }
913
951
  };
914
952
  }
915
- var RULE_NAME17 = "no-clone-element";
916
- var RULE_FEATURES17 = [];
953
+ var RULE_NAME18 = "no-clone-element";
954
+ var RULE_FEATURES18 = [];
917
955
  var no_clone_element_default = createRule({
918
956
  meta: {
919
957
  type: "problem",
920
958
  docs: {
921
959
  description: "Disallow `cloneElement`.",
922
- [Symbol.for("rule_features")]: RULE_FEATURES17
960
+ [Symbol.for("rule_features")]: RULE_FEATURES18
923
961
  },
924
962
  messages: {
925
963
  noCloneElement: "Using 'cloneElement' is uncommon and can lead to fragile code. Use alternatives instead."
926
964
  },
927
965
  schema: []
928
966
  },
929
- name: RULE_NAME17,
930
- create: create17,
967
+ name: RULE_NAME18,
968
+ create: create18,
931
969
  defaultOptions: []
932
970
  });
933
- function create17(context) {
971
+ function create18(context) {
934
972
  return {
935
973
  CallExpression(node) {
936
974
  if (ER25.isCloneElementCall(context, node)) {
@@ -942,25 +980,25 @@ function create17(context) {
942
980
  }
943
981
  };
944
982
  }
945
- var RULE_NAME18 = "no-comment-textnodes";
946
- var RULE_FEATURES18 = [];
983
+ var RULE_NAME19 = "no-comment-textnodes";
984
+ var RULE_FEATURES19 = [];
947
985
  var no_comment_textnodes_default = createRule({
948
986
  meta: {
949
987
  type: "problem",
950
988
  docs: {
951
989
  description: "Prevents comments from being inserted as text nodes.",
952
- [Symbol.for("rule_features")]: RULE_FEATURES18
990
+ [Symbol.for("rule_features")]: RULE_FEATURES19
953
991
  },
954
992
  messages: {
955
993
  noCommentTextnodes: "Possible misused comment in text node. Comments inside children section of tag should be placed inside braces."
956
994
  },
957
995
  schema: []
958
996
  },
959
- name: RULE_NAME18,
960
- create: create18,
997
+ name: RULE_NAME19,
998
+ create: create19,
961
999
  defaultOptions: []
962
1000
  });
963
- function create18(context) {
1001
+ function create19(context) {
964
1002
  function hasCommentLike(node) {
965
1003
  if (AST8.isOneOf([AST_NODE_TYPES.JSXAttribute, AST_NODE_TYPES.JSXExpressionContainer])(node.parent)) {
966
1004
  return false;
@@ -988,8 +1026,8 @@ function create18(context) {
988
1026
  Literal: visitorFunction
989
1027
  };
990
1028
  }
991
- var RULE_NAME19 = "no-complex-conditional-rendering";
992
- var RULE_FEATURES19 = [
1029
+ var RULE_NAME20 = "no-complex-conditional-rendering";
1030
+ var RULE_FEATURES20 = [
993
1031
  "EXP"
994
1032
  ];
995
1033
  var no_complex_conditional_rendering_default = createRule({
@@ -997,18 +1035,18 @@ var no_complex_conditional_rendering_default = createRule({
997
1035
  type: "problem",
998
1036
  docs: {
999
1037
  description: "Disallow complex conditional rendering in JSX expressions.",
1000
- [Symbol.for("rule_features")]: RULE_FEATURES19
1038
+ [Symbol.for("rule_features")]: RULE_FEATURES20
1001
1039
  },
1002
1040
  messages: {
1003
1041
  noComplexConditionalRendering: "Avoid complex conditional rendering. Extract the logic into separate elements or components."
1004
1042
  },
1005
1043
  schema: []
1006
1044
  },
1007
- name: RULE_NAME19,
1008
- create: create19,
1045
+ name: RULE_NAME20,
1046
+ create: create20,
1009
1047
  defaultOptions: []
1010
1048
  });
1011
- function create19(context) {
1049
+ function create20(context) {
1012
1050
  const visitorFunction = (node) => {
1013
1051
  const jsxExpContainer = node.parent?.parent;
1014
1052
  if (!AST8.is(AST_NODE_TYPES.JSXExpressionContainer)(jsxExpContainer)) {
@@ -1033,8 +1071,8 @@ function create19(context) {
1033
1071
  "JSXExpressionContainer > LogicalExpression[operator='||'] > LogicalExpression[operator='&&']": visitorFunction
1034
1072
  };
1035
1073
  }
1036
- var RULE_NAME20 = "no-component-will-mount";
1037
- var RULE_FEATURES20 = [
1074
+ var RULE_NAME21 = "no-component-will-mount";
1075
+ var RULE_FEATURES21 = [
1038
1076
  "MOD"
1039
1077
  ];
1040
1078
  var no_component_will_mount_default = createRule({
@@ -1042,7 +1080,7 @@ var no_component_will_mount_default = createRule({
1042
1080
  type: "problem",
1043
1081
  docs: {
1044
1082
  description: "Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.",
1045
- [Symbol.for("rule_features")]: RULE_FEATURES20
1083
+ [Symbol.for("rule_features")]: RULE_FEATURES21
1046
1084
  },
1047
1085
  fixable: "code",
1048
1086
  messages: {
@@ -1050,11 +1088,11 @@ var no_component_will_mount_default = createRule({
1050
1088
  },
1051
1089
  schema: []
1052
1090
  },
1053
- name: RULE_NAME20,
1054
- create: create20,
1091
+ name: RULE_NAME21,
1092
+ create: create21,
1055
1093
  defaultOptions: []
1056
1094
  });
1057
- function create20(context) {
1095
+ function create21(context) {
1058
1096
  if (!context.sourceCode.text.includes("componentWillMount")) return {};
1059
1097
  const { ctx, listeners } = ER25.useComponentCollectorLegacy();
1060
1098
  return {
@@ -1081,8 +1119,8 @@ function create20(context) {
1081
1119
  }
1082
1120
  };
1083
1121
  }
1084
- var RULE_NAME21 = "no-component-will-receive-props";
1085
- var RULE_FEATURES21 = [
1122
+ var RULE_NAME22 = "no-component-will-receive-props";
1123
+ var RULE_FEATURES22 = [
1086
1124
  "MOD"
1087
1125
  ];
1088
1126
  var no_component_will_receive_props_default = createRule({
@@ -1090,7 +1128,7 @@ var no_component_will_receive_props_default = createRule({
1090
1128
  type: "problem",
1091
1129
  docs: {
1092
1130
  description: "Replace usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`.",
1093
- [Symbol.for("rule_features")]: RULE_FEATURES21
1131
+ [Symbol.for("rule_features")]: RULE_FEATURES22
1094
1132
  },
1095
1133
  fixable: "code",
1096
1134
  messages: {
@@ -1098,11 +1136,11 @@ var no_component_will_receive_props_default = createRule({
1098
1136
  },
1099
1137
  schema: []
1100
1138
  },
1101
- name: RULE_NAME21,
1102
- create: create21,
1139
+ name: RULE_NAME22,
1140
+ create: create22,
1103
1141
  defaultOptions: []
1104
1142
  });
1105
- function create21(context) {
1143
+ function create22(context) {
1106
1144
  if (!context.sourceCode.text.includes("componentWillReceiveProps")) return {};
1107
1145
  const { ctx, listeners } = ER25.useComponentCollectorLegacy();
1108
1146
  return {
@@ -1129,8 +1167,8 @@ function create21(context) {
1129
1167
  }
1130
1168
  };
1131
1169
  }
1132
- var RULE_NAME22 = "no-component-will-update";
1133
- var RULE_FEATURES22 = [
1170
+ var RULE_NAME23 = "no-component-will-update";
1171
+ var RULE_FEATURES23 = [
1134
1172
  "MOD"
1135
1173
  ];
1136
1174
  var no_component_will_update_default = createRule({
@@ -1138,7 +1176,7 @@ var no_component_will_update_default = createRule({
1138
1176
  type: "problem",
1139
1177
  docs: {
1140
1178
  description: "Replace usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`.",
1141
- [Symbol.for("rule_features")]: RULE_FEATURES22
1179
+ [Symbol.for("rule_features")]: RULE_FEATURES23
1142
1180
  },
1143
1181
  fixable: "code",
1144
1182
  messages: {
@@ -1146,11 +1184,11 @@ var no_component_will_update_default = createRule({
1146
1184
  },
1147
1185
  schema: []
1148
1186
  },
1149
- name: RULE_NAME22,
1150
- create: create22,
1187
+ name: RULE_NAME23,
1188
+ create: create23,
1151
1189
  defaultOptions: []
1152
1190
  });
1153
- function create22(context) {
1191
+ function create23(context) {
1154
1192
  if (!context.sourceCode.text.includes("componentWillUpdate")) return {};
1155
1193
  const { ctx, listeners } = ER25.useComponentCollectorLegacy();
1156
1194
  return {
@@ -1177,8 +1215,8 @@ function create22(context) {
1177
1215
  }
1178
1216
  };
1179
1217
  }
1180
- var RULE_NAME23 = "no-context-provider";
1181
- var RULE_FEATURES23 = [
1218
+ var RULE_NAME24 = "no-context-provider";
1219
+ var RULE_FEATURES24 = [
1182
1220
  "MOD"
1183
1221
  ];
1184
1222
  var no_context_provider_default = createRule({
@@ -1186,7 +1224,7 @@ var no_context_provider_default = createRule({
1186
1224
  type: "problem",
1187
1225
  docs: {
1188
1226
  description: "Replace usages of `<Context.Provider>` with `<Context>`.",
1189
- [Symbol.for("rule_features")]: RULE_FEATURES23
1227
+ [Symbol.for("rule_features")]: RULE_FEATURES24
1190
1228
  },
1191
1229
  fixable: "code",
1192
1230
  messages: {
@@ -1194,11 +1232,11 @@ var no_context_provider_default = createRule({
1194
1232
  },
1195
1233
  schema: []
1196
1234
  },
1197
- name: RULE_NAME23,
1198
- create: create23,
1235
+ name: RULE_NAME24,
1236
+ create: create24,
1199
1237
  defaultOptions: []
1200
1238
  });
1201
- function create23(context) {
1239
+ function create24(context) {
1202
1240
  if (!context.sourceCode.text.includes("Provider")) return {};
1203
1241
  const { version: version2 } = getSettingsFromContext(context);
1204
1242
  if (compare(version2, "19.0.0", "<")) return {};
@@ -1230,25 +1268,25 @@ function create23(context) {
1230
1268
  }
1231
1269
  };
1232
1270
  }
1233
- var RULE_NAME24 = "no-create-ref";
1234
- var RULE_FEATURES24 = [];
1271
+ var RULE_NAME25 = "no-create-ref";
1272
+ var RULE_FEATURES25 = [];
1235
1273
  var no_create_ref_default = createRule({
1236
1274
  meta: {
1237
1275
  type: "problem",
1238
1276
  docs: {
1239
1277
  description: "Disallow `createRef` in function components.",
1240
- [Symbol.for("rule_features")]: RULE_FEATURES24
1278
+ [Symbol.for("rule_features")]: RULE_FEATURES25
1241
1279
  },
1242
1280
  messages: {
1243
1281
  noCreateRef: "[Deprecated] Use 'useRef' instead."
1244
1282
  },
1245
1283
  schema: []
1246
1284
  },
1247
- name: RULE_NAME24,
1248
- create: create24,
1285
+ name: RULE_NAME25,
1286
+ create: create25,
1249
1287
  defaultOptions: []
1250
1288
  });
1251
- function create24(context) {
1289
+ function create25(context) {
1252
1290
  return {
1253
1291
  CallExpression(node) {
1254
1292
  if (ER25.isCreateRefCall(context, node) && AST8.findParentNode(node, ER25.isClassComponent) == null) {
@@ -1257,25 +1295,25 @@ function create24(context) {
1257
1295
  }
1258
1296
  };
1259
1297
  }
1260
- var RULE_NAME25 = "no-default-props";
1261
- var RULE_FEATURES25 = [];
1298
+ var RULE_NAME26 = "no-default-props";
1299
+ var RULE_FEATURES26 = [];
1262
1300
  var no_default_props_default = createRule({
1263
1301
  meta: {
1264
1302
  type: "problem",
1265
1303
  docs: {
1266
1304
  description: "Disallow `defaultProps` property in favor of ES6 default parameters.",
1267
- [Symbol.for("rule_features")]: RULE_FEATURES25
1305
+ [Symbol.for("rule_features")]: RULE_FEATURES26
1268
1306
  },
1269
1307
  messages: {
1270
1308
  noDefaultProps: "[Deprecated] Use ES6 default parameters instead."
1271
1309
  },
1272
1310
  schema: []
1273
1311
  },
1274
- name: RULE_NAME25,
1275
- create: create25,
1312
+ name: RULE_NAME26,
1313
+ create: create26,
1276
1314
  defaultOptions: []
1277
1315
  });
1278
- function create25(context) {
1316
+ function create26(context) {
1279
1317
  if (!context.sourceCode.text.includes("defaultProps")) return {};
1280
1318
  return {
1281
1319
  AssignmentExpression(node) {
@@ -1309,8 +1347,8 @@ function create25(context) {
1309
1347
  }
1310
1348
  };
1311
1349
  }
1312
- var RULE_NAME26 = "no-direct-mutation-state";
1313
- var RULE_FEATURES26 = [];
1350
+ var RULE_NAME27 = "no-direct-mutation-state";
1351
+ var RULE_FEATURES27 = [];
1314
1352
  function isConstructorFunction(node) {
1315
1353
  return AST8.isOneOf([AST_NODE_TYPES.FunctionDeclaration, AST_NODE_TYPES.FunctionExpression])(node) && AST8.isMethodOrProperty(node.parent) && node.parent.key.type === AST_NODE_TYPES.Identifier && node.parent.key.name === "constructor";
1316
1354
  }
@@ -1319,18 +1357,18 @@ var no_direct_mutation_state_default = createRule({
1319
1357
  type: "problem",
1320
1358
  docs: {
1321
1359
  description: "Disallow direct mutation of `this.state`.",
1322
- [Symbol.for("rule_features")]: RULE_FEATURES26
1360
+ [Symbol.for("rule_features")]: RULE_FEATURES27
1323
1361
  },
1324
1362
  messages: {
1325
1363
  noDirectMutationState: "Do not mutate state directly. Use 'setState()' instead."
1326
1364
  },
1327
1365
  schema: []
1328
1366
  },
1329
- name: RULE_NAME26,
1330
- create: create26,
1367
+ name: RULE_NAME27,
1368
+ create: create27,
1331
1369
  defaultOptions: []
1332
1370
  });
1333
- function create26(context) {
1371
+ function create27(context) {
1334
1372
  return {
1335
1373
  AssignmentExpression(node) {
1336
1374
  if (!ER25.isAssignmentToThisState(node)) return;
@@ -1351,25 +1389,25 @@ function create26(context) {
1351
1389
  }
1352
1390
  };
1353
1391
  }
1354
- var RULE_NAME27 = "no-duplicate-key";
1355
- var RULE_FEATURES27 = [];
1392
+ var RULE_NAME28 = "no-duplicate-key";
1393
+ var RULE_FEATURES28 = [];
1356
1394
  var no_duplicate_key_default = createRule({
1357
1395
  meta: {
1358
1396
  type: "problem",
1359
1397
  docs: {
1360
1398
  description: "Disallow duplicate `key` on elements in the same array or a list of `children`.",
1361
- [Symbol.for("rule_features")]: RULE_FEATURES27
1399
+ [Symbol.for("rule_features")]: RULE_FEATURES28
1362
1400
  },
1363
1401
  messages: {
1364
1402
  noDuplicateKey: "A key must be unique. '{{value}}' is duplicated."
1365
1403
  },
1366
1404
  schema: []
1367
1405
  },
1368
- name: RULE_NAME27,
1369
- create: create27,
1406
+ name: RULE_NAME28,
1407
+ create: create28,
1370
1408
  defaultOptions: []
1371
1409
  });
1372
- function create27(context) {
1410
+ function create28(context) {
1373
1411
  if (!context.sourceCode.getText().includes("key=")) {
1374
1412
  return {};
1375
1413
  }
@@ -1433,8 +1471,8 @@ function create27(context) {
1433
1471
  }
1434
1472
  };
1435
1473
  }
1436
- var RULE_NAME28 = "no-forward-ref";
1437
- var RULE_FEATURES28 = [
1474
+ var RULE_NAME29 = "no-forward-ref";
1475
+ var RULE_FEATURES29 = [
1438
1476
  "MOD"
1439
1477
  ];
1440
1478
  var no_forward_ref_default = createRule({
@@ -1442,7 +1480,7 @@ var no_forward_ref_default = createRule({
1442
1480
  type: "problem",
1443
1481
  docs: {
1444
1482
  description: "Replaces usages of `forwardRef` with passing `ref` as a prop.",
1445
- [Symbol.for("rule_features")]: RULE_FEATURES28
1483
+ [Symbol.for("rule_features")]: RULE_FEATURES29
1446
1484
  },
1447
1485
  fixable: "code",
1448
1486
  messages: {
@@ -1450,11 +1488,11 @@ var no_forward_ref_default = createRule({
1450
1488
  },
1451
1489
  schema: []
1452
1490
  },
1453
- name: RULE_NAME28,
1454
- create: create28,
1491
+ name: RULE_NAME29,
1492
+ create: create29,
1455
1493
  defaultOptions: []
1456
1494
  });
1457
- function create28(context) {
1495
+ function create29(context) {
1458
1496
  if (!context.sourceCode.text.includes("forwardRef")) {
1459
1497
  return {};
1460
1498
  }
@@ -1543,8 +1581,8 @@ function getComponentPropsFixes(context, fixer, node, typeArguments) {
1543
1581
  ...arg1 == null ? [] : [fixer.remove(arg1), fixer.removeRange([arg0.range[1], arg1.range[0]])]
1544
1582
  ];
1545
1583
  }
1546
- var RULE_NAME29 = "no-implicit-key";
1547
- var RULE_FEATURES29 = [
1584
+ var RULE_NAME30 = "no-implicit-key";
1585
+ var RULE_FEATURES30 = [
1548
1586
  "EXP"
1549
1587
  ];
1550
1588
  var no_implicit_key_default = createRule({
@@ -1552,18 +1590,18 @@ var no_implicit_key_default = createRule({
1552
1590
  type: "problem",
1553
1591
  docs: {
1554
1592
  description: "Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects).",
1555
- [Symbol.for("rule_features")]: RULE_FEATURES29
1593
+ [Symbol.for("rule_features")]: RULE_FEATURES30
1556
1594
  },
1557
1595
  messages: {
1558
1596
  noImplicitKey: "Do not use implicit 'key' props."
1559
1597
  },
1560
1598
  schema: []
1561
1599
  },
1562
- name: RULE_NAME29,
1563
- create: create29,
1600
+ name: RULE_NAME30,
1601
+ create: create30,
1564
1602
  defaultOptions: []
1565
1603
  });
1566
- function create29(context) {
1604
+ function create30(context) {
1567
1605
  return {
1568
1606
  JSXOpeningElement(node) {
1569
1607
  const initialScope = context.sourceCode.getScope(node);
@@ -1577,8 +1615,8 @@ function create29(context) {
1577
1615
  }
1578
1616
  };
1579
1617
  }
1580
- var RULE_NAME30 = "no-leaked-conditional-rendering";
1581
- var RULE_FEATURES30 = [
1618
+ var RULE_NAME31 = "no-leaked-conditional-rendering";
1619
+ var RULE_FEATURES31 = [
1582
1620
  "TSC"
1583
1621
  ];
1584
1622
  var tsHelpers = {
@@ -1664,18 +1702,18 @@ var no_leaked_conditional_rendering_default = createRule({
1664
1702
  type: "problem",
1665
1703
  docs: {
1666
1704
  description: "Prevents problematic leaked values from being rendered.",
1667
- [Symbol.for("rule_features")]: RULE_FEATURES30
1705
+ [Symbol.for("rule_features")]: RULE_FEATURES31
1668
1706
  },
1669
1707
  messages: {
1670
1708
  noLeakedConditionalRendering: "Potential leaked value {{value}} that might cause unintentionally rendered values or rendering crashes."
1671
1709
  },
1672
1710
  schema: []
1673
1711
  },
1674
- name: RULE_NAME30,
1675
- create: create30,
1712
+ name: RULE_NAME31,
1713
+ create: create31,
1676
1714
  defaultOptions: []
1677
1715
  });
1678
- function create30(context) {
1716
+ function create31(context) {
1679
1717
  if (!context.sourceCode.text.includes("&&")) return {};
1680
1718
  const { version: version2 } = getSettingsFromContext(context);
1681
1719
  const allowedVariants = [
@@ -1733,25 +1771,25 @@ function create30(context) {
1733
1771
  JSXExpressionContainer: flow(getReportDescriptor, Reporter.make(context).send)
1734
1772
  };
1735
1773
  }
1736
- var RULE_NAME31 = "no-missing-component-display-name";
1737
- var RULE_FEATURES31 = [];
1774
+ var RULE_NAME32 = "no-missing-component-display-name";
1775
+ var RULE_FEATURES32 = [];
1738
1776
  var no_missing_component_display_name_default = createRule({
1739
1777
  meta: {
1740
1778
  type: "problem",
1741
1779
  docs: {
1742
1780
  description: "Enforces that all components have a `displayName` which can be used in devtools.",
1743
- [Symbol.for("rule_features")]: RULE_FEATURES31
1781
+ [Symbol.for("rule_features")]: RULE_FEATURES32
1744
1782
  },
1745
1783
  messages: {
1746
1784
  noMissingComponentDisplayName: "Add missing 'displayName' for component."
1747
1785
  },
1748
1786
  schema: []
1749
1787
  },
1750
- name: RULE_NAME31,
1751
- create: create31,
1788
+ name: RULE_NAME32,
1789
+ create: create32,
1752
1790
  defaultOptions: []
1753
1791
  });
1754
- function create31(context) {
1792
+ function create32(context) {
1755
1793
  if (!context.sourceCode.text.includes("memo") && !context.sourceCode.text.includes("forwardRef")) return {};
1756
1794
  const {
1757
1795
  ctx,
@@ -1787,25 +1825,25 @@ function create31(context) {
1787
1825
  }
1788
1826
  };
1789
1827
  }
1790
- var RULE_NAME32 = "no-missing-context-display-name";
1791
- var RULE_FEATURES32 = [];
1828
+ var RULE_NAME33 = "no-missing-context-display-name";
1829
+ var RULE_FEATURES33 = [];
1792
1830
  var no_missing_context_display_name_default = createRule({
1793
1831
  meta: {
1794
1832
  type: "problem",
1795
1833
  docs: {
1796
1834
  description: "Enforces that all contexts have a `displayName` which can be used in devtools.",
1797
- [Symbol.for("rule_features")]: RULE_FEATURES32
1835
+ [Symbol.for("rule_features")]: RULE_FEATURES33
1798
1836
  },
1799
1837
  messages: {
1800
1838
  noMissingContextDisplayName: "Add missing 'displayName' for context."
1801
1839
  },
1802
1840
  schema: []
1803
1841
  },
1804
- name: RULE_NAME32,
1805
- create: create32,
1842
+ name: RULE_NAME33,
1843
+ create: create33,
1806
1844
  defaultOptions: []
1807
1845
  });
1808
- function create32(context) {
1846
+ function create33(context) {
1809
1847
  if (!context.sourceCode.text.includes("createContext")) return {};
1810
1848
  const createCalls = [];
1811
1849
  const displayNameAssignments = [];
@@ -1843,14 +1881,14 @@ function create32(context) {
1843
1881
  }
1844
1882
  };
1845
1883
  }
1846
- var RULE_NAME33 = "no-missing-key";
1847
- var RULE_FEATURES33 = [];
1884
+ var RULE_NAME34 = "no-missing-key";
1885
+ var RULE_FEATURES34 = [];
1848
1886
  var no_missing_key_default = createRule({
1849
1887
  meta: {
1850
1888
  type: "problem",
1851
1889
  docs: {
1852
1890
  description: "Disallow missing `key` on items in list rendering.",
1853
- [Symbol.for("rule_features")]: RULE_FEATURES33
1891
+ [Symbol.for("rule_features")]: RULE_FEATURES34
1854
1892
  },
1855
1893
  messages: {
1856
1894
  missingKey: "Missing 'key' for element when rendering list.",
@@ -1858,11 +1896,11 @@ var no_missing_key_default = createRule({
1858
1896
  },
1859
1897
  schema: []
1860
1898
  },
1861
- name: RULE_NAME33,
1862
- create: create33,
1899
+ name: RULE_NAME34,
1900
+ create: create34,
1863
1901
  defaultOptions: []
1864
1902
  });
1865
- function create33(context) {
1903
+ function create34(context) {
1866
1904
  const report = Reporter.make(context);
1867
1905
  const state = { isWithinChildrenToArray: false };
1868
1906
  function checkIteratorElement(node) {
@@ -1965,8 +2003,8 @@ function create33(context) {
1965
2003
  }
1966
2004
  };
1967
2005
  }
1968
- var RULE_NAME34 = "no-misused-capture-owner-stack";
1969
- var RULE_FEATURES34 = [
2006
+ var RULE_NAME35 = "no-misused-capture-owner-stack";
2007
+ var RULE_FEATURES35 = [
1970
2008
  "EXP"
1971
2009
  ];
1972
2010
  var no_misused_capture_owner_stack_default = createRule({
@@ -1974,7 +2012,7 @@ var no_misused_capture_owner_stack_default = createRule({
1974
2012
  type: "problem",
1975
2013
  docs: {
1976
2014
  description: "Prevents incorrect usage of `captureOwnerStack`.",
1977
- [Symbol.for("rule_features")]: RULE_FEATURES34
2015
+ [Symbol.for("rule_features")]: RULE_FEATURES35
1978
2016
  },
1979
2017
  fixable: "code",
1980
2018
  messages: {
@@ -1984,11 +2022,11 @@ var no_misused_capture_owner_stack_default = createRule({
1984
2022
  },
1985
2023
  schema: []
1986
2024
  },
1987
- name: RULE_NAME34,
1988
- create: create34,
2025
+ name: RULE_NAME35,
2026
+ create: create35,
1989
2027
  defaultOptions: []
1990
2028
  });
1991
- function create34(context) {
2029
+ function create35(context) {
1992
2030
  if (!context.sourceCode.text.includes("captureOwnerStack")) return {};
1993
2031
  const { importSource } = getSettingsFromContext(context);
1994
2032
  return {
@@ -2021,25 +2059,25 @@ function isDevelopmentOnlyCheck(node) {
2021
2059
  if (AST8.isProcessEnvNodeEnvCompare(node.test, "!==", "production")) return true;
2022
2060
  return false;
2023
2061
  }
2024
- var RULE_NAME35 = "no-nested-component-definitions";
2025
- var RULE_FEATURES35 = [];
2062
+ var RULE_NAME36 = "no-nested-component-definitions";
2063
+ var RULE_FEATURES36 = [];
2026
2064
  var no_nested_component_definitions_default = createRule({
2027
2065
  meta: {
2028
2066
  type: "problem",
2029
2067
  docs: {
2030
2068
  description: "Disallow nesting component definitions inside other components.",
2031
- [Symbol.for("rule_features")]: RULE_FEATURES35
2069
+ [Symbol.for("rule_features")]: RULE_FEATURES36
2032
2070
  },
2033
2071
  messages: {
2034
2072
  noNestedComponentDefinitions: "Do not nest component definitions inside other components or props. {{suggestion}}"
2035
2073
  },
2036
2074
  schema: []
2037
2075
  },
2038
- name: RULE_NAME35,
2039
- create: create35,
2076
+ name: RULE_NAME36,
2077
+ create: create36,
2040
2078
  defaultOptions: []
2041
2079
  });
2042
- function create35(context) {
2080
+ function create36(context) {
2043
2081
  const hint = ER25.ComponentDetectionHint.SkipArrayMapArgument | ER25.ComponentDetectionHint.SkipNullLiteral | ER25.ComponentDetectionHint.SkipUndefined | ER25.ComponentDetectionHint.SkipBooleanLiteral | ER25.ComponentDetectionHint.SkipStringLiteral | ER25.ComponentDetectionHint.SkipNumberLiteral | ER25.ComponentDetectionHint.StrictLogical | ER25.ComponentDetectionHint.StrictConditional;
2044
2082
  const collector = ER25.useComponentCollector(context, { hint });
2045
2083
  const collectorLegacy = ER25.useComponentCollectorLegacy();
@@ -2135,25 +2173,25 @@ function isInsideCreateElementProps(context, node) {
2135
2173
  if (prop == null) return false;
2136
2174
  return prop === call.arguments[1];
2137
2175
  }
2138
- var RULE_NAME36 = "no-nested-component-definitions";
2139
- var RULE_FEATURES36 = [];
2176
+ var RULE_NAME37 = "no-nested-component-definitions";
2177
+ var RULE_FEATURES37 = [];
2140
2178
  var no_nested_lazy_component_declarations_default = createRule({
2141
2179
  meta: {
2142
2180
  type: "problem",
2143
2181
  docs: {
2144
2182
  description: "Disallow nesting lazy component declarations inside other components.",
2145
- [Symbol.for("rule_features")]: RULE_FEATURES36
2183
+ [Symbol.for("rule_features")]: RULE_FEATURES37
2146
2184
  },
2147
2185
  messages: {
2148
2186
  noNestedComponentDefinitions: "Do not declare lazy components inside other components. Instead, always declare them at the top level of your module."
2149
2187
  },
2150
2188
  schema: []
2151
2189
  },
2152
- name: RULE_NAME36,
2153
- create: create36,
2190
+ name: RULE_NAME37,
2191
+ create: create37,
2154
2192
  defaultOptions: []
2155
2193
  });
2156
- function create36(context) {
2194
+ function create37(context) {
2157
2195
  const hint = ER25.ComponentDetectionHint.None;
2158
2196
  const collector = ER25.useComponentCollector(context, { hint });
2159
2197
  const collectorLegacy = ER25.useComponentCollectorLegacy();
@@ -2198,25 +2236,25 @@ function create36(context) {
2198
2236
  }
2199
2237
  };
2200
2238
  }
2201
- var RULE_NAME37 = "no-prop-types";
2202
- var RULE_FEATURES37 = [];
2239
+ var RULE_NAME38 = "no-prop-types";
2240
+ var RULE_FEATURES38 = [];
2203
2241
  var no_prop_types_default = createRule({
2204
2242
  meta: {
2205
2243
  type: "problem",
2206
2244
  docs: {
2207
2245
  description: "Disallow `propTypes` in favor of TypeScript or another type-checking solution.",
2208
- [Symbol.for("rule_features")]: RULE_FEATURES37
2246
+ [Symbol.for("rule_features")]: RULE_FEATURES38
2209
2247
  },
2210
2248
  messages: {
2211
2249
  noPropTypes: "[Deprecated] Use TypeScript or another type-checking solution instead."
2212
2250
  },
2213
2251
  schema: []
2214
2252
  },
2215
- name: RULE_NAME37,
2216
- create: create37,
2253
+ name: RULE_NAME38,
2254
+ create: create38,
2217
2255
  defaultOptions: []
2218
2256
  });
2219
- function create37(context) {
2257
+ function create38(context) {
2220
2258
  if (!context.sourceCode.text.includes("propTypes")) {
2221
2259
  return {};
2222
2260
  }
@@ -2252,8 +2290,8 @@ function create37(context) {
2252
2290
  }
2253
2291
  };
2254
2292
  }
2255
- var RULE_NAME38 = "no-redundant-should-component-update";
2256
- var RULE_FEATURES38 = [];
2293
+ var RULE_NAME39 = "no-redundant-should-component-update";
2294
+ var RULE_FEATURES39 = [];
2257
2295
  function isShouldComponentUpdate(node) {
2258
2296
  return AST8.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "shouldComponentUpdate";
2259
2297
  }
@@ -2262,18 +2300,18 @@ var no_redundant_should_component_update_default = createRule({
2262
2300
  type: "problem",
2263
2301
  docs: {
2264
2302
  description: "Disallow `shouldComponentUpdate` when extending `React.PureComponent`.",
2265
- [Symbol.for("rule_features")]: RULE_FEATURES38
2303
+ [Symbol.for("rule_features")]: RULE_FEATURES39
2266
2304
  },
2267
2305
  messages: {
2268
2306
  noRedundantShouldComponentUpdate: "'{{componentName}}' does not need 'shouldComponentUpdate' when extending 'React.PureComponent'."
2269
2307
  },
2270
2308
  schema: []
2271
2309
  },
2272
- name: RULE_NAME38,
2273
- create: create38,
2310
+ name: RULE_NAME39,
2311
+ create: create39,
2274
2312
  defaultOptions: []
2275
2313
  });
2276
- function create38(context) {
2314
+ function create39(context) {
2277
2315
  if (!context.sourceCode.text.includes("shouldComponentUpdate")) return {};
2278
2316
  const { ctx, listeners } = ER25.useComponentCollectorLegacy();
2279
2317
  return {
@@ -2300,25 +2338,25 @@ function create38(context) {
2300
2338
  }
2301
2339
  };
2302
2340
  }
2303
- var RULE_NAME39 = "no-set-state-in-component-did-mount";
2304
- var RULE_FEATURES39 = [];
2341
+ var RULE_NAME40 = "no-set-state-in-component-did-mount";
2342
+ var RULE_FEATURES40 = [];
2305
2343
  var no_set_state_in_component_did_mount_default = createRule({
2306
2344
  meta: {
2307
2345
  type: "problem",
2308
2346
  docs: {
2309
2347
  description: "Disallow calling `this.setState` in `componentDidMount` outside of functions, such as callbacks.",
2310
- [Symbol.for("rule_features")]: RULE_FEATURES39
2348
+ [Symbol.for("rule_features")]: RULE_FEATURES40
2311
2349
  },
2312
2350
  messages: {
2313
2351
  noSetStateInComponentDidMount: "Do not call `this.setState` in `componentDidMount` outside of functions, such as callbacks."
2314
2352
  },
2315
2353
  schema: []
2316
2354
  },
2317
- name: RULE_NAME39,
2318
- create: create39,
2355
+ name: RULE_NAME40,
2356
+ create: create40,
2319
2357
  defaultOptions: []
2320
2358
  });
2321
- function create39(context) {
2359
+ function create40(context) {
2322
2360
  if (!context.sourceCode.text.includes("componentDidMount")) return {};
2323
2361
  return {
2324
2362
  CallExpression(node) {
@@ -2339,25 +2377,25 @@ function create39(context) {
2339
2377
  }
2340
2378
  };
2341
2379
  }
2342
- var RULE_NAME40 = "no-set-state-in-component-did-update";
2343
- var RULE_FEATURES40 = [];
2380
+ var RULE_NAME41 = "no-set-state-in-component-did-update";
2381
+ var RULE_FEATURES41 = [];
2344
2382
  var no_set_state_in_component_did_update_default = createRule({
2345
2383
  meta: {
2346
2384
  type: "problem",
2347
2385
  docs: {
2348
2386
  description: "Disallow calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks.",
2349
- [Symbol.for("rule_features")]: RULE_FEATURES40
2387
+ [Symbol.for("rule_features")]: RULE_FEATURES41
2350
2388
  },
2351
2389
  messages: {
2352
2390
  noSetStateInComponentDidUpdate: "Do not call `this.setState` in `componentDidUpdate` outside of functions, such as callbacks."
2353
2391
  },
2354
2392
  schema: []
2355
2393
  },
2356
- name: RULE_NAME40,
2357
- create: create40,
2394
+ name: RULE_NAME41,
2395
+ create: create41,
2358
2396
  defaultOptions: []
2359
2397
  });
2360
- function create40(context) {
2398
+ function create41(context) {
2361
2399
  if (!context.sourceCode.text.includes("componentDidUpdate")) return {};
2362
2400
  return {
2363
2401
  CallExpression(node) {
@@ -2378,25 +2416,25 @@ function create40(context) {
2378
2416
  }
2379
2417
  };
2380
2418
  }
2381
- var RULE_NAME41 = "no-set-state-in-component-will-update";
2382
- var RULE_FEATURES41 = [];
2419
+ var RULE_NAME42 = "no-set-state-in-component-will-update";
2420
+ var RULE_FEATURES42 = [];
2383
2421
  var no_set_state_in_component_will_update_default = createRule({
2384
2422
  meta: {
2385
2423
  type: "problem",
2386
2424
  docs: {
2387
2425
  description: "Disallows calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.",
2388
- [Symbol.for("rule_features")]: RULE_FEATURES41
2426
+ [Symbol.for("rule_features")]: RULE_FEATURES42
2389
2427
  },
2390
2428
  messages: {
2391
2429
  noSetStateInComponentWillUpdate: "Do not call `this.setState` in `componentWillUpdate` outside of functions, such as callbacks."
2392
2430
  },
2393
2431
  schema: []
2394
2432
  },
2395
- name: RULE_NAME41,
2396
- create: create41,
2433
+ name: RULE_NAME42,
2434
+ create: create42,
2397
2435
  defaultOptions: []
2398
2436
  });
2399
- function create41(context) {
2437
+ function create42(context) {
2400
2438
  if (!context.sourceCode.text.includes("componentWillUpdate")) return {};
2401
2439
  return {
2402
2440
  CallExpression(node) {
@@ -2417,8 +2455,8 @@ function create41(context) {
2417
2455
  }
2418
2456
  };
2419
2457
  }
2420
- var RULE_NAME42 = "no-string-refs";
2421
- var RULE_FEATURES42 = [
2458
+ var RULE_NAME43 = "no-string-refs";
2459
+ var RULE_FEATURES43 = [
2422
2460
  "MOD"
2423
2461
  ];
2424
2462
  var no_string_refs_default = createRule({
@@ -2426,7 +2464,7 @@ var no_string_refs_default = createRule({
2426
2464
  type: "problem",
2427
2465
  docs: {
2428
2466
  description: "Replaces string refs with callback refs.",
2429
- [Symbol.for("rule_features")]: RULE_FEATURES42
2467
+ [Symbol.for("rule_features")]: RULE_FEATURES43
2430
2468
  },
2431
2469
  fixable: "code",
2432
2470
  messages: {
@@ -2434,11 +2472,11 @@ var no_string_refs_default = createRule({
2434
2472
  },
2435
2473
  schema: []
2436
2474
  },
2437
- name: RULE_NAME42,
2438
- create: create42,
2475
+ name: RULE_NAME43,
2476
+ create: create43,
2439
2477
  defaultOptions: []
2440
2478
  });
2441
- function create42(context) {
2479
+ function create43(context) {
2442
2480
  const state = {
2443
2481
  isWithinClassComponent: false
2444
2482
  };
@@ -2482,8 +2520,8 @@ function getAttributeValueText(context, node) {
2482
2520
  return null;
2483
2521
  }
2484
2522
  }
2485
- var RULE_NAME43 = "no-unsafe-component-will-mount";
2486
- var RULE_FEATURES43 = [];
2523
+ var RULE_NAME44 = "no-unsafe-component-will-mount";
2524
+ var RULE_FEATURES44 = [];
2487
2525
  function isUnsafeComponentWillMount(node) {
2488
2526
  return AST8.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillMount";
2489
2527
  }
@@ -2492,18 +2530,18 @@ var no_unsafe_component_will_mount_default = createRule({
2492
2530
  type: "problem",
2493
2531
  docs: {
2494
2532
  description: "Warns the usage of `UNSAFE_componentWillMount` in class components.",
2495
- [Symbol.for("rule_features")]: RULE_FEATURES43
2533
+ [Symbol.for("rule_features")]: RULE_FEATURES44
2496
2534
  },
2497
2535
  messages: {
2498
2536
  noUnsafeComponentWillMount: "Do not use 'UNSAFE_componentWillMount'."
2499
2537
  },
2500
2538
  schema: []
2501
2539
  },
2502
- name: RULE_NAME43,
2503
- create: create43,
2540
+ name: RULE_NAME44,
2541
+ create: create44,
2504
2542
  defaultOptions: []
2505
2543
  });
2506
- function create43(context) {
2544
+ function create44(context) {
2507
2545
  if (!context.sourceCode.text.includes("UNSAFE_componentWillMount")) return {};
2508
2546
  const { ctx, listeners } = ER25.useComponentCollectorLegacy();
2509
2547
  return {
@@ -2524,8 +2562,8 @@ function create43(context) {
2524
2562
  }
2525
2563
  };
2526
2564
  }
2527
- var RULE_NAME44 = "no-unsafe-component-will-receive-props";
2528
- var RULE_FEATURES44 = [];
2565
+ var RULE_NAME45 = "no-unsafe-component-will-receive-props";
2566
+ var RULE_FEATURES45 = [];
2529
2567
  function isUnsafeComponentWillReceiveProps(node) {
2530
2568
  return AST8.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillReceiveProps";
2531
2569
  }
@@ -2534,18 +2572,18 @@ var no_unsafe_component_will_receive_props_default = createRule({
2534
2572
  type: "problem",
2535
2573
  docs: {
2536
2574
  description: "Warns the usage of `UNSAFE_componentWillReceiveProps` in class components.",
2537
- [Symbol.for("rule_features")]: RULE_FEATURES44
2575
+ [Symbol.for("rule_features")]: RULE_FEATURES45
2538
2576
  },
2539
2577
  messages: {
2540
2578
  noUnsafeComponentWillReceiveProps: "Do not use 'UNSAFE_componentWillReceiveProps'."
2541
2579
  },
2542
2580
  schema: []
2543
2581
  },
2544
- name: RULE_NAME44,
2545
- create: create44,
2582
+ name: RULE_NAME45,
2583
+ create: create45,
2546
2584
  defaultOptions: []
2547
2585
  });
2548
- function create44(context) {
2586
+ function create45(context) {
2549
2587
  if (!context.sourceCode.text.includes("UNSAFE_componentWillReceiveProps")) {
2550
2588
  return {};
2551
2589
  }
@@ -2568,8 +2606,8 @@ function create44(context) {
2568
2606
  }
2569
2607
  };
2570
2608
  }
2571
- var RULE_NAME45 = "no-unsafe-component-will-update";
2572
- var RULE_FEATURES45 = [];
2609
+ var RULE_NAME46 = "no-unsafe-component-will-update";
2610
+ var RULE_FEATURES46 = [];
2573
2611
  function isUnsafeComponentWillUpdate(node) {
2574
2612
  return AST8.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillUpdate";
2575
2613
  }
@@ -2578,18 +2616,18 @@ var no_unsafe_component_will_update_default = createRule({
2578
2616
  type: "problem",
2579
2617
  docs: {
2580
2618
  description: "Warns the usage of `UNSAFE_componentWillUpdate` in class components.",
2581
- [Symbol.for("rule_features")]: RULE_FEATURES45
2619
+ [Symbol.for("rule_features")]: RULE_FEATURES46
2582
2620
  },
2583
2621
  messages: {
2584
2622
  noUnsafeComponentWillUpdate: "Do not use 'UNSAFE_componentWillUpdate'."
2585
2623
  },
2586
2624
  schema: []
2587
2625
  },
2588
- name: RULE_NAME45,
2589
- create: create45,
2626
+ name: RULE_NAME46,
2627
+ create: create46,
2590
2628
  defaultOptions: []
2591
2629
  });
2592
- function create45(context) {
2630
+ function create46(context) {
2593
2631
  if (!context.sourceCode.text.includes("UNSAFE_componentWillUpdate")) return {};
2594
2632
  const { ctx, listeners } = ER25.useComponentCollectorLegacy();
2595
2633
  return {
@@ -2610,25 +2648,25 @@ function create45(context) {
2610
2648
  }
2611
2649
  };
2612
2650
  }
2613
- var RULE_NAME46 = "no-unstable-context-value";
2614
- var RULE_FEATURES46 = [];
2651
+ var RULE_NAME47 = "no-unstable-context-value";
2652
+ var RULE_FEATURES47 = [];
2615
2653
  var no_unstable_context_value_default = createRule({
2616
2654
  meta: {
2617
2655
  type: "problem",
2618
2656
  docs: {
2619
2657
  description: "Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`.",
2620
- [Symbol.for("rule_features")]: RULE_FEATURES46
2658
+ [Symbol.for("rule_features")]: RULE_FEATURES47
2621
2659
  },
2622
2660
  messages: {
2623
2661
  unstableContextValue: "A/an '{{type}}' passed as the value prop to the context provider should not be constructed. It will change on every render. {{suggestion}}"
2624
2662
  },
2625
2663
  schema: []
2626
2664
  },
2627
- name: RULE_NAME46,
2628
- create: create46,
2665
+ name: RULE_NAME47,
2666
+ create: create47,
2629
2667
  defaultOptions: []
2630
2668
  });
2631
- function create46(context) {
2669
+ function create47(context) {
2632
2670
  const { version: version2 } = getSettingsFromContext(context);
2633
2671
  const isReact18OrBelow = compare(version2, "19.0.0", "<");
2634
2672
  const { ctx, listeners } = ER25.useComponentCollector(context);
@@ -2683,25 +2721,25 @@ function isContextName(name5, isReact18OrBelow) {
2683
2721
  }
2684
2722
  return false;
2685
2723
  }
2686
- var RULE_NAME47 = "no-unstable-default-props";
2687
- var RULE_FEATURES47 = [];
2724
+ var RULE_NAME48 = "no-unstable-default-props";
2725
+ var RULE_FEATURES48 = [];
2688
2726
  var no_unstable_default_props_default = createRule({
2689
2727
  meta: {
2690
2728
  type: "problem",
2691
2729
  docs: {
2692
2730
  description: "Prevents using referential-type values as default props in object destructuring.",
2693
- [Symbol.for("rule_features")]: RULE_FEATURES47
2731
+ [Symbol.for("rule_features")]: RULE_FEATURES48
2694
2732
  },
2695
2733
  messages: {
2696
2734
  noUnstableDefaultProps: "A/an '{{forbiddenType}}' as default prop. This could lead to potential infinite render loop in React. Use a variable instead of '{{forbiddenType}}'."
2697
2735
  },
2698
2736
  schema: []
2699
2737
  },
2700
- name: RULE_NAME47,
2701
- create: create47,
2738
+ name: RULE_NAME48,
2739
+ create: create48,
2702
2740
  defaultOptions: []
2703
2741
  });
2704
- function create47(context) {
2742
+ function create48(context) {
2705
2743
  const { ctx, listeners } = ER25.useComponentCollector(context);
2706
2744
  const declarators = /* @__PURE__ */ new WeakMap();
2707
2745
  return {
@@ -2757,8 +2795,8 @@ function create47(context) {
2757
2795
  }
2758
2796
  };
2759
2797
  }
2760
- var RULE_NAME48 = "no-unused-class-component-members";
2761
- var RULE_FEATURES48 = [];
2798
+ var RULE_NAME49 = "no-unused-class-component-members";
2799
+ var RULE_FEATURES49 = [];
2762
2800
  var LIFECYCLE_METHODS = /* @__PURE__ */ new Set([
2763
2801
  "componentDidCatch",
2764
2802
  "componentDidMount",
@@ -2784,18 +2822,18 @@ var no_unused_class_component_members_default = createRule({
2784
2822
  type: "problem",
2785
2823
  docs: {
2786
2824
  description: "Warns unused class component methods and properties.",
2787
- [Symbol.for("rule_features")]: RULE_FEATURES48
2825
+ [Symbol.for("rule_features")]: RULE_FEATURES49
2788
2826
  },
2789
2827
  messages: {
2790
2828
  noUnusedClassComponentMembers: "Unused method or property '{{methodName}}'' of class '{{className}}'."
2791
2829
  },
2792
2830
  schema: []
2793
2831
  },
2794
- name: RULE_NAME48,
2795
- create: create48,
2832
+ name: RULE_NAME49,
2833
+ create: create49,
2796
2834
  defaultOptions: []
2797
2835
  });
2798
- function create48(context) {
2836
+ function create49(context) {
2799
2837
  const classEntries = [];
2800
2838
  const methodEntries = [];
2801
2839
  const propertyDefs = /* @__PURE__ */ new WeakMap();
@@ -2905,8 +2943,8 @@ function create48(context) {
2905
2943
  }
2906
2944
  };
2907
2945
  }
2908
- var RULE_NAME49 = "no-unused-state";
2909
- var RULE_FEATURES49 = [];
2946
+ var RULE_NAME50 = "no-unused-state";
2947
+ var RULE_FEATURES50 = [];
2910
2948
  function isKeyLiteral3(node, key) {
2911
2949
  return match(key).with({ type: AST_NODE_TYPES.Literal }, constTrue).with({ type: AST_NODE_TYPES.TemplateLiteral, expressions: [] }, constTrue).with({ type: AST_NODE_TYPES.Identifier }, () => !node.computed).otherwise(constFalse);
2912
2950
  }
@@ -2915,18 +2953,18 @@ var no_unused_state_default = createRule({
2915
2953
  type: "problem",
2916
2954
  docs: {
2917
2955
  description: "Warns unused class component state.",
2918
- [Symbol.for("rule_features")]: RULE_FEATURES49
2956
+ [Symbol.for("rule_features")]: RULE_FEATURES50
2919
2957
  },
2920
2958
  messages: {
2921
2959
  noUnusedState: "Unused class component state in '{{className}}'"
2922
2960
  },
2923
2961
  schema: []
2924
2962
  },
2925
- name: RULE_NAME49,
2926
- create: create49,
2963
+ name: RULE_NAME50,
2964
+ create: create50,
2927
2965
  defaultOptions: []
2928
2966
  });
2929
- function create49(context) {
2967
+ function create50(context) {
2930
2968
  const classEntries = [];
2931
2969
  const methodEntries = [];
2932
2970
  const constructorEntries = [];
@@ -3060,8 +3098,8 @@ function create49(context) {
3060
3098
  }
3061
3099
  };
3062
3100
  }
3063
- var RULE_NAME50 = "no-use-context";
3064
- var RULE_FEATURES50 = [
3101
+ var RULE_NAME51 = "no-use-context";
3102
+ var RULE_FEATURES51 = [
3065
3103
  "MOD"
3066
3104
  ];
3067
3105
  var no_use_context_default = createRule({
@@ -3069,7 +3107,7 @@ var no_use_context_default = createRule({
3069
3107
  type: "problem",
3070
3108
  docs: {
3071
3109
  description: "Replaces usages of `useContext` with `use`.",
3072
- [Symbol.for("rule_features")]: RULE_FEATURES50
3110
+ [Symbol.for("rule_features")]: RULE_FEATURES51
3073
3111
  },
3074
3112
  fixable: "code",
3075
3113
  messages: {
@@ -3077,11 +3115,11 @@ var no_use_context_default = createRule({
3077
3115
  },
3078
3116
  schema: []
3079
3117
  },
3080
- name: RULE_NAME50,
3081
- create: create50,
3118
+ name: RULE_NAME51,
3119
+ create: create51,
3082
3120
  defaultOptions: []
3083
3121
  });
3084
- function create50(context) {
3122
+ function create51(context) {
3085
3123
  if (!context.sourceCode.text.includes("useContext")) return {};
3086
3124
  const settings4 = getSettingsFromContext(context);
3087
3125
  if (compare(settings4.version, "19.0.0", "<")) {
@@ -3164,25 +3202,25 @@ function getCorrelativeTokens(context, node) {
3164
3202
  }
3165
3203
  return tokens;
3166
3204
  }
3167
- var RULE_NAME51 = "no-useless-forward-ref";
3168
- var RULE_FEATURES51 = [];
3205
+ var RULE_NAME52 = "no-useless-forward-ref";
3206
+ var RULE_FEATURES52 = [];
3169
3207
  var no_useless_forward_ref_default = createRule({
3170
3208
  meta: {
3171
3209
  type: "problem",
3172
3210
  docs: {
3173
3211
  description: "Disallow useless `forwardRef` calls on components that don't use `ref`s.",
3174
- [Symbol.for("rule_features")]: RULE_FEATURES51
3212
+ [Symbol.for("rule_features")]: RULE_FEATURES52
3175
3213
  },
3176
3214
  messages: {
3177
3215
  noUselessForwardRef: "A 'forwardRef' is used with this component but no 'ref' parameter is set."
3178
3216
  },
3179
3217
  schema: []
3180
3218
  },
3181
- name: RULE_NAME51,
3182
- create: create51,
3219
+ name: RULE_NAME52,
3220
+ create: create52,
3183
3221
  defaultOptions: []
3184
3222
  });
3185
- function create51(context) {
3223
+ function create52(context) {
3186
3224
  return {
3187
3225
  CallExpression(node) {
3188
3226
  if (!ER25.isForwardRefCall(context, node)) {
@@ -3203,7 +3241,7 @@ function create51(context) {
3203
3241
  }
3204
3242
  };
3205
3243
  }
3206
- var RULE_NAME52 = "no-useless-fragment";
3244
+ var RULE_NAME53 = "no-useless-fragment";
3207
3245
  var defaultOptions = [{
3208
3246
  allowExpressions: true
3209
3247
  }];
@@ -3229,11 +3267,11 @@ var no_useless_fragment_default = createRule({
3229
3267
  }
3230
3268
  }]
3231
3269
  },
3232
- name: RULE_NAME52,
3233
- create: create52,
3270
+ name: RULE_NAME53,
3271
+ create: create53,
3234
3272
  defaultOptions
3235
3273
  });
3236
- function create52(context, [option]) {
3274
+ function create53(context, [option]) {
3237
3275
  const { allowExpressions = true } = option;
3238
3276
  return {
3239
3277
  JSXElement(node) {
@@ -3353,8 +3391,8 @@ function canFix(context, node) {
3353
3391
  }
3354
3392
  return true;
3355
3393
  }
3356
- var RULE_NAME53 = "prefer-destructuring-assignment";
3357
- var RULE_FEATURES52 = [];
3394
+ var RULE_NAME54 = "prefer-destructuring-assignment";
3395
+ var RULE_FEATURES53 = [];
3358
3396
  function isMemberExpressionWithObjectName(node) {
3359
3397
  return node.object.type === AST_NODE_TYPES.Identifier && "name" in node.object;
3360
3398
  }
@@ -3363,18 +3401,18 @@ var prefer_destructuring_assignment_default = createRule({
3363
3401
  type: "problem",
3364
3402
  docs: {
3365
3403
  description: "Enforces destructuring assignment for component props and context.",
3366
- [Symbol.for("rule_features")]: RULE_FEATURES52
3404
+ [Symbol.for("rule_features")]: RULE_FEATURES53
3367
3405
  },
3368
3406
  messages: {
3369
3407
  preferDestructuringAssignment: "Use destructuring assignment for {{name}}."
3370
3408
  },
3371
3409
  schema: []
3372
3410
  },
3373
- name: RULE_NAME53,
3374
- create: create53,
3411
+ name: RULE_NAME54,
3412
+ create: create54,
3375
3413
  defaultOptions: []
3376
3414
  });
3377
- function create53(context) {
3415
+ function create54(context) {
3378
3416
  const { ctx, listeners } = ER25.useComponentCollector(context);
3379
3417
  const memberExpressionWithNames = [];
3380
3418
  return {
@@ -3434,8 +3472,8 @@ function create53(context) {
3434
3472
  }
3435
3473
  };
3436
3474
  }
3437
- var RULE_NAME54 = "prefer-react-namespace-import";
3438
- var RULE_FEATURES53 = [
3475
+ var RULE_NAME55 = "prefer-react-namespace-import";
3476
+ var RULE_FEATURES54 = [
3439
3477
  "FIX"
3440
3478
  ];
3441
3479
  var prefer_react_namespace_import_default = createRule({
@@ -3443,7 +3481,7 @@ var prefer_react_namespace_import_default = createRule({
3443
3481
  type: "problem",
3444
3482
  docs: {
3445
3483
  description: "Enforces React is imported via a namespace import.",
3446
- [Symbol.for("rule_features")]: RULE_FEATURES53
3484
+ [Symbol.for("rule_features")]: RULE_FEATURES54
3447
3485
  },
3448
3486
  fixable: "code",
3449
3487
  messages: {
@@ -3451,11 +3489,11 @@ var prefer_react_namespace_import_default = createRule({
3451
3489
  },
3452
3490
  schema: []
3453
3491
  },
3454
- name: RULE_NAME54,
3455
- create: create54,
3492
+ name: RULE_NAME55,
3493
+ create: create55,
3456
3494
  defaultOptions: []
3457
3495
  });
3458
- function create54(context) {
3496
+ function create55(context) {
3459
3497
  const { importSource } = getSettingsFromContext(context);
3460
3498
  return {
3461
3499
  [`ImportDeclaration[source.value="${importSource}"] ImportDefaultSpecifier`](node) {
@@ -3490,8 +3528,8 @@ function create54(context) {
3490
3528
  }
3491
3529
  };
3492
3530
  }
3493
- var RULE_NAME55 = "prefer-read-only-props";
3494
- var RULE_FEATURES54 = [
3531
+ var RULE_NAME56 = "prefer-read-only-props";
3532
+ var RULE_FEATURES55 = [
3495
3533
  "TSC",
3496
3534
  "EXP"
3497
3535
  ];
@@ -3500,18 +3538,18 @@ var prefer_read_only_props_default = createRule({
3500
3538
  type: "problem",
3501
3539
  docs: {
3502
3540
  description: "Enforces read-only props in components.",
3503
- [Symbol.for("rule_features")]: RULE_FEATURES54
3541
+ [Symbol.for("rule_features")]: RULE_FEATURES55
3504
3542
  },
3505
3543
  messages: {
3506
3544
  preferReadOnlyProps: "A function component's props should be read-only."
3507
3545
  },
3508
3546
  schema: []
3509
3547
  },
3510
- name: RULE_NAME55,
3511
- create: create55,
3548
+ name: RULE_NAME56,
3549
+ create: create56,
3512
3550
  defaultOptions: []
3513
3551
  });
3514
- function create55(context) {
3552
+ function create56(context) {
3515
3553
  const services = ESLintUtils.getParserServices(context, false);
3516
3554
  const { ctx, listeners } = ER25.useComponentCollector(context);
3517
3555
  return {
@@ -3541,8 +3579,8 @@ function isTypeReadonlyLoose(services, type) {
3541
3579
  return true;
3542
3580
  }
3543
3581
  }
3544
- var RULE_NAME56 = "prefer-shorthand-boolean";
3545
- var RULE_FEATURES55 = [
3582
+ var RULE_NAME57 = "prefer-shorthand-boolean";
3583
+ var RULE_FEATURES56 = [
3546
3584
  "FIX"
3547
3585
  ];
3548
3586
  var prefer_shorthand_boolean_default = createRule({
@@ -3550,7 +3588,7 @@ var prefer_shorthand_boolean_default = createRule({
3550
3588
  type: "problem",
3551
3589
  docs: {
3552
3590
  description: "Enforces shorthand syntax for boolean attributes.",
3553
- [Symbol.for("rule_features")]: RULE_FEATURES55
3591
+ [Symbol.for("rule_features")]: RULE_FEATURES56
3554
3592
  },
3555
3593
  fixable: "code",
3556
3594
  messages: {
@@ -3558,11 +3596,11 @@ var prefer_shorthand_boolean_default = createRule({
3558
3596
  },
3559
3597
  schema: []
3560
3598
  },
3561
- name: RULE_NAME56,
3562
- create: create56,
3599
+ name: RULE_NAME57,
3600
+ create: create57,
3563
3601
  defaultOptions: []
3564
3602
  });
3565
- function create56(context) {
3603
+ function create57(context) {
3566
3604
  return {
3567
3605
  JSXAttribute(node) {
3568
3606
  const { value } = node;
@@ -3582,8 +3620,8 @@ function create56(context) {
3582
3620
  }
3583
3621
  };
3584
3622
  }
3585
- var RULE_NAME57 = "prefer-shorthand-fragment";
3586
- var RULE_FEATURES56 = [
3623
+ var RULE_NAME58 = "prefer-shorthand-fragment";
3624
+ var RULE_FEATURES57 = [
3587
3625
  "FIX"
3588
3626
  ];
3589
3627
  var prefer_shorthand_fragment_default = createRule({
@@ -3591,7 +3629,7 @@ var prefer_shorthand_fragment_default = createRule({
3591
3629
  type: "problem",
3592
3630
  docs: {
3593
3631
  description: "Enforces shorthand syntax for fragments.",
3594
- [Symbol.for("rule_features")]: RULE_FEATURES56
3632
+ [Symbol.for("rule_features")]: RULE_FEATURES57
3595
3633
  },
3596
3634
  fixable: "code",
3597
3635
  messages: {
@@ -3599,11 +3637,11 @@ var prefer_shorthand_fragment_default = createRule({
3599
3637
  },
3600
3638
  schema: []
3601
3639
  },
3602
- name: RULE_NAME57,
3603
- create: create57,
3640
+ name: RULE_NAME58,
3641
+ create: create58,
3604
3642
  defaultOptions: []
3605
3643
  });
3606
- function create57(context) {
3644
+ function create58(context) {
3607
3645
  return {
3608
3646
  JSXElement(node) {
3609
3647
  if (!ER25.isFragmentElement(context, node)) return;
@@ -3691,6 +3729,7 @@ var plugin = {
3691
3729
  // Part: JSX only rules
3692
3730
  "jsx-key-before-spread": jsx_key_before_spread_default,
3693
3731
  "jsx-no-duplicate-props": jsx_no_duplicate_props_default,
3732
+ "jsx-no-iife": jsx_no_iife_default,
3694
3733
  "jsx-no-undef": jsx_no_undef_default,
3695
3734
  "jsx-uses-react": jsx_uses_react_default,
3696
3735
  "jsx-uses-vars": jsx_uses_vars_default,