eslint-plugin-react-x 2.4.0-beta.11 → 2.4.0-beta.13

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.
Files changed (2) hide show
  1. package/dist/index.js +68 -323
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -34,7 +34,7 @@ var __export = (all, symbols) => {
34
34
  //#endregion
35
35
  //#region package.json
36
36
  var name$6 = "eslint-plugin-react-x";
37
- var version = "2.4.0-beta.11";
37
+ var version = "2.4.0-beta.13";
38
38
 
39
39
  //#endregion
40
40
  //#region src/utils/create-rule.ts
@@ -125,14 +125,10 @@ function getTypeVariants(types) {
125
125
  //#endregion
126
126
  //#region src/rules/jsx-dollar.ts
127
127
  const RULE_NAME$62 = "jsx-dollar";
128
- const RULE_FEATURES$62 = [];
129
128
  var jsx_dollar_default = createRule({
130
129
  meta: {
131
130
  type: "problem",
132
- docs: {
133
- description: "Prevents dollar signs from being inserted as text nodes before expressions.",
134
- [Symbol.for("rule_features")]: RULE_FEATURES$62
135
- },
131
+ docs: { description: "Prevents dollar signs from being inserted as text nodes before expressions." },
136
132
  fixable: "code",
137
133
  hasSuggestions: true,
138
134
  messages: {
@@ -178,23 +174,16 @@ function create$62(context) {
178
174
  });
179
175
  }
180
176
  };
181
- return {
182
- JSXElement: visitorFunction,
183
- JSXFragment: visitorFunction
184
- };
177
+ return Object.fromEntries(["JSXElement", "JSXFragment"].map((nodeType) => [nodeType, visitorFunction]));
185
178
  }
186
179
 
187
180
  //#endregion
188
181
  //#region src/rules/jsx-key-before-spread.ts
189
182
  const RULE_NAME$61 = "jsx-key-before-spread";
190
- const RULE_FEATURES$61 = ["EXP"];
191
183
  var jsx_key_before_spread_default = createRule({
192
184
  meta: {
193
185
  type: "problem",
194
- docs: {
195
- description: "Enforces that the 'key' prop is placed before the spread prop in JSX elements.",
196
- [Symbol.for("rule_features")]: RULE_FEATURES$61
197
- },
186
+ docs: { description: "Enforces that the 'key' prop is placed before the spread prop in JSX elements." },
198
187
  messages: { jsxKeyBeforeSpread: "The 'key' prop must be placed before any spread props." },
199
188
  schema: []
200
189
  },
@@ -222,14 +211,10 @@ function create$61(context) {
222
211
  //#endregion
223
212
  //#region src/rules/jsx-no-comment-textnodes.ts
224
213
  const RULE_NAME$60 = "jsx-no-comment-textnodes";
225
- const RULE_FEATURES$60 = [];
226
214
  var jsx_no_comment_textnodes_default = createRule({
227
215
  meta: {
228
216
  type: "problem",
229
- docs: {
230
- description: "Prevents comments from being inserted as text nodes.",
231
- [Symbol.for("rule_features")]: RULE_FEATURES$60
232
- },
217
+ docs: { description: "Prevents comments from being inserted as text nodes." },
233
218
  messages: { jsxNoCommentTextnodes: "Possible misused comment in text node. Comments inside children section of tag should be placed inside braces." },
234
219
  schema: []
235
220
  },
@@ -259,14 +244,10 @@ function create$60(context) {
259
244
  //#endregion
260
245
  //#region src/rules/jsx-no-duplicate-props.ts
261
246
  const RULE_NAME$59 = "jsx-no-duplicate-props";
262
- const RULE_FEATURES$59 = [];
263
247
  var jsx_no_duplicate_props_default = createRule({
264
248
  meta: {
265
249
  type: "problem",
266
- docs: {
267
- description: "Disallow duplicate props in JSX elements.",
268
- [Symbol.for("rule_features")]: RULE_FEATURES$59
269
- },
250
+ docs: { description: "Disallow duplicate props in JSX elements." },
270
251
  messages: { jsxNoDuplicateProps: "This JSX property is assigned multiple times." },
271
252
  schema: []
272
253
  },
@@ -296,14 +277,10 @@ function create$59(context) {
296
277
  //#endregion
297
278
  //#region src/rules/jsx-no-iife.ts
298
279
  const RULE_NAME$58 = "jsx-no-iife";
299
- const RULE_FEATURES$58 = ["EXP"];
300
280
  var jsx_no_iife_default = createRule({
301
281
  meta: {
302
282
  type: "problem",
303
- docs: {
304
- description: "Disallows 'IIFE' in JSX elements.",
305
- [Symbol.for("rule_features")]: RULE_FEATURES$58
306
- },
283
+ docs: { description: "Disallows 'IIFE' in JSX elements." },
307
284
  messages: { jsxNoIife: "Avoid using IIFE in JSX elements." },
308
285
  schema: []
309
286
  },
@@ -331,14 +308,10 @@ function create$58(context) {
331
308
  //#endregion
332
309
  //#region src/rules/jsx-no-undef.ts
333
310
  const RULE_NAME$57 = "jsx-no-undef";
334
- const RULE_FEATURES$57 = [];
335
311
  var jsx_no_undef_default = createRule({
336
312
  meta: {
337
313
  type: "problem",
338
- docs: {
339
- description: "Disallow undefined variables in JSX.",
340
- [Symbol.for("rule_features")]: RULE_FEATURES$57
341
- },
314
+ docs: { description: "Disallow undefined variables in JSX." },
342
315
  messages: { jsxNoUndef: "JSX variable '{{name}}' is not defined." },
343
316
  schema: []
344
317
  },
@@ -366,7 +339,6 @@ function create$57(context) {
366
339
  //#endregion
367
340
  //#region src/rules/jsx-shorthand-boolean.ts
368
341
  const RULE_NAME$56 = "jsx-shorthand-boolean";
369
- const RULE_FEATURES$56 = ["CFG", "FIX"];
370
342
  const defaultOptions$4 = [1];
371
343
  const schema$3 = [{
372
344
  type: "integer",
@@ -375,10 +347,7 @@ const schema$3 = [{
375
347
  var jsx_shorthand_boolean_default = createRule({
376
348
  meta: {
377
349
  type: "problem",
378
- docs: {
379
- description: "Enforces shorthand syntax for boolean attributes.",
380
- [Symbol.for("rule_features")]: RULE_FEATURES$56
381
- },
350
+ docs: { description: "Enforces shorthand syntax for boolean attributes." },
382
351
  fixable: "code",
383
352
  messages: { jsxShorthandBoolean: "{{message}}" },
384
353
  schema: schema$3
@@ -416,7 +385,6 @@ function create$56(context) {
416
385
  //#endregion
417
386
  //#region src/rules/jsx-shorthand-fragment.ts
418
387
  const RULE_NAME$55 = "jsx-shorthand-fragment";
419
- const RULE_FEATURES$55 = ["CFG", "FIX"];
420
388
  const defaultOptions$3 = [1];
421
389
  const schema$2 = [{
422
390
  type: "integer",
@@ -425,10 +393,7 @@ const schema$2 = [{
425
393
  var jsx_shorthand_fragment_default = createRule({
426
394
  meta: {
427
395
  type: "problem",
428
- docs: {
429
- description: "Enforces shorthand syntax for fragments.",
430
- [Symbol.for("rule_features")]: RULE_FEATURES$55
431
- },
396
+ docs: { description: "Enforces shorthand syntax for fragments." },
432
397
  fixable: "code",
433
398
  messages: { jsxShorthandFragment: "{{message}}" },
434
399
  schema: schema$2
@@ -472,14 +437,10 @@ function create$55(context) {
472
437
  //#endregion
473
438
  //#region src/rules/jsx-uses-react.ts
474
439
  const RULE_NAME$54 = "jsx-uses-react";
475
- const RULE_FEATURES$54 = [];
476
440
  var jsx_uses_react_default = createRule({
477
441
  meta: {
478
442
  type: "problem",
479
- docs: {
480
- description: "Marks React variables as used when JSX is used.",
481
- [Symbol.for("rule_features")]: RULE_FEATURES$54
482
- },
443
+ docs: { description: "Marks React variables as used when JSX is used." },
483
444
  messages: { jsxUsesReact: "Marked {{name}} as used." },
484
445
  schema: []
485
446
  },
@@ -519,14 +480,10 @@ function debugReport(context, node, name$7) {
519
480
  //#endregion
520
481
  //#region src/rules/jsx-uses-vars.ts
521
482
  const RULE_NAME$53 = "jsx-uses-vars";
522
- const RULE_FEATURES$53 = [];
523
483
  var jsx_uses_vars_default = createRule({
524
484
  meta: {
525
485
  type: "problem",
526
- docs: {
527
- description: "Marks variables used in JSX elements as used.",
528
- [Symbol.for("rule_features")]: RULE_FEATURES$53
529
- },
486
+ docs: { description: "Marks variables used in JSX elements as used." },
530
487
  messages: { jsxUsesVars: "An identifier in JSX is marked as used." },
531
488
  schema: []
532
489
  },
@@ -553,7 +510,6 @@ function create$53(context) {
553
510
  //#endregion
554
511
  //#region src/rules/no-access-state-in-setstate.ts
555
512
  const RULE_NAME$52 = "no-access-state-in-setstate";
556
- const RULE_FEATURES$52 = [];
557
513
  function isKeyLiteral$2(node, key) {
558
514
  return match(key).with({ type: AST_NODE_TYPES.Literal }, constTrue).with({
559
515
  type: AST_NODE_TYPES.TemplateLiteral,
@@ -563,10 +519,7 @@ function isKeyLiteral$2(node, key) {
563
519
  var no_access_state_in_setstate_default = createRule({
564
520
  meta: {
565
521
  type: "problem",
566
- docs: {
567
- description: "Disallow accessing `this.state` inside `setState` calls.",
568
- [Symbol.for("rule_features")]: RULE_FEATURES$52
569
- },
522
+ docs: { description: "Disallow accessing `this.state` inside `setState` calls." },
570
523
  messages: { noAccessStateInSetstate: "Do not access 'this.state' within 'setState'. Use the update function instead." },
571
524
  schema: []
572
525
  },
@@ -646,7 +599,6 @@ function create$52(context) {
646
599
  //#endregion
647
600
  //#region src/rules/no-array-index-key.ts
648
601
  const RULE_NAME$51 = "no-array-index-key";
649
- const RULE_FEATURES$51 = [];
650
602
  const REACT_CHILDREN_METHOD = ["forEach", "map"];
651
603
  function isReactChildrenMethod(name$7) {
652
604
  return REACT_CHILDREN_METHOD.includes(name$7);
@@ -658,7 +610,7 @@ function isUsingReactChildren(context, node) {
658
610
  if (!isReactChildrenMethod(callee.property.name)) return false;
659
611
  const initialScope = context.sourceCode.getScope(node);
660
612
  if (callee.object.type === AST_NODE_TYPES.Identifier && callee.object.name === "Children") return true;
661
- if (callee.object.type === AST_NODE_TYPES.MemberExpression && "name" in callee.object.object) return isInitializedFromReact(callee.object.object.name, importSource, initialScope);
613
+ if (callee.object.type === AST_NODE_TYPES.MemberExpression && "name" in callee.object.object) return isInitializedFromReact(callee.object.object.name, initialScope, importSource);
662
614
  return false;
663
615
  }
664
616
  function getMapIndexParamName(context, node) {
@@ -684,10 +636,7 @@ function getIdentifiersFromBinaryExpression(side) {
684
636
  var no_array_index_key_default = createRule({
685
637
  meta: {
686
638
  type: "problem",
687
- docs: {
688
- description: "Disallow an item's index in the array as its key.",
689
- [Symbol.for("rule_features")]: RULE_FEATURES$51
690
- },
639
+ docs: { description: "Disallow an item's index in the array as its key." },
691
640
  messages: { noArrayIndexKey: "Do not use item index in the array as its key." },
692
641
  schema: []
693
642
  },
@@ -762,14 +711,10 @@ function create$51(context) {
762
711
  //#endregion
763
712
  //#region src/rules/no-children-count.ts
764
713
  const RULE_NAME$50 = "no-children-count";
765
- const RULE_FEATURES$50 = [];
766
714
  var no_children_count_default = createRule({
767
715
  meta: {
768
716
  type: "problem",
769
- docs: {
770
- description: "Disallow `Children.count`.",
771
- [Symbol.for("rule_features")]: RULE_FEATURES$50
772
- },
717
+ docs: { description: "Disallow `Children.count`." },
773
718
  messages: { noChildrenCount: "Using 'Children.count' is uncommon and can lead to fragile code. Use alternatives instead." },
774
719
  schema: []
775
720
  },
@@ -789,14 +734,10 @@ function create$50(context) {
789
734
  //#endregion
790
735
  //#region src/rules/no-children-for-each.ts
791
736
  const RULE_NAME$49 = "no-children-for-each";
792
- const RULE_FEATURES$49 = [];
793
737
  var no_children_for_each_default = createRule({
794
738
  meta: {
795
739
  type: "problem",
796
- docs: {
797
- description: "Disallow 'Children.forEach'.",
798
- [Symbol.for("rule_features")]: RULE_FEATURES$49
799
- },
740
+ docs: { description: "Disallow 'Children.forEach'." },
800
741
  messages: { noChildrenForEach: "Using 'Children.forEach' is uncommon and can lead to fragile code. Use alternatives instead." },
801
742
  schema: []
802
743
  },
@@ -816,14 +757,10 @@ function create$49(context) {
816
757
  //#endregion
817
758
  //#region src/rules/no-children-map.ts
818
759
  const RULE_NAME$48 = "no-children-map";
819
- const RULE_FEATURES$48 = [];
820
760
  var no_children_map_default = createRule({
821
761
  meta: {
822
762
  type: "problem",
823
- docs: {
824
- description: "Disallow `Children.map`.",
825
- [Symbol.for("rule_features")]: RULE_FEATURES$48
826
- },
763
+ docs: { description: "Disallow `Children.map`." },
827
764
  messages: { noChildrenMap: "Using 'Children.map' is uncommon and can lead to fragile code. Use alternatives instead." },
828
765
  schema: []
829
766
  },
@@ -843,14 +780,10 @@ function create$48(context) {
843
780
  //#endregion
844
781
  //#region src/rules/no-children-only.ts
845
782
  const RULE_NAME$47 = "no-children-only";
846
- const RULE_FEATURES$47 = [];
847
783
  var no_children_only_default = createRule({
848
784
  meta: {
849
785
  type: "problem",
850
- docs: {
851
- description: "Disallow `Children.only`.",
852
- [Symbol.for("rule_features")]: RULE_FEATURES$47
853
- },
786
+ docs: { description: "Disallow `Children.only`." },
854
787
  messages: { noChildrenOnly: "Using 'Children.only' is uncommon and can lead to fragile code. Use alternatives instead." },
855
788
  schema: []
856
789
  },
@@ -870,14 +803,10 @@ function create$47(context) {
870
803
  //#endregion
871
804
  //#region src/rules/no-children-prop.ts
872
805
  const RULE_NAME$46 = "no-children-prop";
873
- const RULE_FEATURES$46 = [];
874
806
  var no_children_prop_default = createRule({
875
807
  meta: {
876
808
  type: "problem",
877
- docs: {
878
- description: "Disallow passing `children` as a prop.",
879
- [Symbol.for("rule_features")]: RULE_FEATURES$46
880
- },
809
+ docs: { description: "Disallow passing `children` as a prop." },
881
810
  messages: { noChildrenProp: "Do not pass 'children' as props." },
882
811
  schema: []
883
812
  },
@@ -898,14 +827,10 @@ function create$46(context) {
898
827
  //#endregion
899
828
  //#region src/rules/no-children-to-array.ts
900
829
  const RULE_NAME$45 = "no-children-to-array";
901
- const RULE_FEATURES$45 = [];
902
830
  var no_children_to_array_default = createRule({
903
831
  meta: {
904
832
  type: "problem",
905
- docs: {
906
- description: "Disallow `Children.toArray`.",
907
- [Symbol.for("rule_features")]: RULE_FEATURES$45
908
- },
833
+ docs: { description: "Disallow `Children.toArray`." },
909
834
  messages: { noChildrenToArray: "Using 'Children.toArray' is uncommon and can lead to fragile code. Use alternatives instead." },
910
835
  schema: []
911
836
  },
@@ -925,14 +850,10 @@ function create$45(context) {
925
850
  //#endregion
926
851
  //#region src/rules/no-class-component.ts
927
852
  const RULE_NAME$44 = "no-class-component";
928
- const RULE_FEATURES$44 = [];
929
853
  var no_class_component_default = createRule({
930
854
  meta: {
931
855
  type: "problem",
932
- docs: {
933
- description: "Disallow class components except for error boundaries.",
934
- [Symbol.for("rule_features")]: RULE_FEATURES$44
935
- },
856
+ docs: { description: "Disallow class components except for error boundaries." },
936
857
  messages: { noClassComponent: "Avoid using class components. Use function components instead." },
937
858
  schema: []
938
859
  },
@@ -961,14 +882,10 @@ function create$44(context) {
961
882
  //#endregion
962
883
  //#region src/rules/no-clone-element.ts
963
884
  const RULE_NAME$43 = "no-clone-element";
964
- const RULE_FEATURES$43 = [];
965
885
  var no_clone_element_default = createRule({
966
886
  meta: {
967
887
  type: "problem",
968
- docs: {
969
- description: "Disallow `cloneElement`.",
970
- [Symbol.for("rule_features")]: RULE_FEATURES$43
971
- },
888
+ docs: { description: "Disallow `cloneElement`." },
972
889
  messages: { noCloneElement: "Using 'cloneElement' is uncommon and can lead to fragile code. Use alternatives instead." },
973
890
  schema: []
974
891
  },
@@ -988,14 +905,10 @@ function create$43(context) {
988
905
  //#endregion
989
906
  //#region src/rules/no-component-will-mount.ts
990
907
  const RULE_NAME$42 = "no-component-will-mount";
991
- const RULE_FEATURES$42 = ["MOD"];
992
908
  var no_component_will_mount_default = createRule({
993
909
  meta: {
994
910
  type: "problem",
995
- docs: {
996
- description: "Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`.",
997
- [Symbol.for("rule_features")]: RULE_FEATURES$42
998
- },
911
+ docs: { description: "Replace usages of `componentWillMount` with `UNSAFE_componentWillMount`." },
999
912
  fixable: "code",
1000
913
  messages: { noComponentWillMount: "[Deprecated] Use 'UNSAFE_componentWillMount' instead." },
1001
914
  schema: []
@@ -1028,14 +941,10 @@ function create$42(context) {
1028
941
  //#endregion
1029
942
  //#region src/rules/no-component-will-receive-props.ts
1030
943
  const RULE_NAME$41 = "no-component-will-receive-props";
1031
- const RULE_FEATURES$41 = ["MOD"];
1032
944
  var no_component_will_receive_props_default = createRule({
1033
945
  meta: {
1034
946
  type: "problem",
1035
- docs: {
1036
- description: "Replace usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`.",
1037
- [Symbol.for("rule_features")]: RULE_FEATURES$41
1038
- },
947
+ docs: { description: "Replace usages of `componentWillReceiveProps` with `UNSAFE_componentWillReceiveProps`." },
1039
948
  fixable: "code",
1040
949
  messages: { noComponentWillReceiveProps: "[Deprecated] Use 'UNSAFE_componentWillReceiveProps' instead." },
1041
950
  schema: []
@@ -1068,14 +977,10 @@ function create$41(context) {
1068
977
  //#endregion
1069
978
  //#region src/rules/no-component-will-update.ts
1070
979
  const RULE_NAME$40 = "no-component-will-update";
1071
- const RULE_FEATURES$40 = ["MOD"];
1072
980
  var no_component_will_update_default = createRule({
1073
981
  meta: {
1074
982
  type: "problem",
1075
- docs: {
1076
- description: "Replace usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`.",
1077
- [Symbol.for("rule_features")]: RULE_FEATURES$40
1078
- },
983
+ docs: { description: "Replace usages of `componentWillUpdate` with `UNSAFE_componentWillUpdate`." },
1079
984
  fixable: "code",
1080
985
  messages: { noComponentWillUpdate: "[Deprecated] Use 'UNSAFE_componentWillUpdate' instead." },
1081
986
  schema: []
@@ -1108,14 +1013,10 @@ function create$40(context) {
1108
1013
  //#endregion
1109
1014
  //#region src/rules/no-context-provider.ts
1110
1015
  const RULE_NAME$39 = "no-context-provider";
1111
- const RULE_FEATURES$39 = ["MOD"];
1112
1016
  var no_context_provider_default = createRule({
1113
1017
  meta: {
1114
1018
  type: "problem",
1115
- docs: {
1116
- description: "Replace usages of `<Context.Provider>` with `<Context>`.",
1117
- [Symbol.for("rule_features")]: RULE_FEATURES$39
1118
- },
1019
+ docs: { description: "Replace usages of `<Context.Provider>` with `<Context>`." },
1119
1020
  fixable: "code",
1120
1021
  messages: { noContextProvider: "In React 19, you can render '<Context>' as a provider instead of '<Context.Provider>'." },
1121
1022
  schema: []
@@ -1152,14 +1053,10 @@ function create$39(context) {
1152
1053
  //#endregion
1153
1054
  //#region src/rules/no-create-ref.ts
1154
1055
  const RULE_NAME$38 = "no-create-ref";
1155
- const RULE_FEATURES$38 = [];
1156
1056
  var no_create_ref_default = createRule({
1157
1057
  meta: {
1158
1058
  type: "problem",
1159
- docs: {
1160
- description: "Disallow `createRef` in function components.",
1161
- [Symbol.for("rule_features")]: RULE_FEATURES$38
1162
- },
1059
+ docs: { description: "Disallow `createRef` in function components." },
1163
1060
  messages: { noCreateRef: "[Deprecated] Use 'useRef' instead." },
1164
1061
  schema: []
1165
1062
  },
@@ -1179,14 +1076,10 @@ function create$38(context) {
1179
1076
  //#endregion
1180
1077
  //#region src/rules/no-default-props.ts
1181
1078
  const RULE_NAME$37 = "no-default-props";
1182
- const RULE_FEATURES$37 = [];
1183
1079
  var no_default_props_default = createRule({
1184
1080
  meta: {
1185
1081
  type: "problem",
1186
- docs: {
1187
- description: "Disallow `defaultProps` property in favor of ES6 default parameters.",
1188
- [Symbol.for("rule_features")]: RULE_FEATURES$37
1189
- },
1082
+ docs: { description: "Disallow `defaultProps` property in favor of ES6 default parameters." },
1190
1083
  messages: { noDefaultProps: "[Deprecated] Use ES6 default parameters instead." },
1191
1084
  schema: []
1192
1085
  },
@@ -1215,17 +1108,13 @@ function create$37(context) {
1215
1108
  //#endregion
1216
1109
  //#region src/rules/no-direct-mutation-state.ts
1217
1110
  const RULE_NAME$36 = "no-direct-mutation-state";
1218
- const RULE_FEATURES$36 = [];
1219
1111
  function isConstructorFunction(node) {
1220
1112
  return AST.isOneOf([AST_NODE_TYPES.FunctionDeclaration, AST_NODE_TYPES.FunctionExpression])(node) && AST.isMethodOrProperty(node.parent) && node.parent.key.type === AST_NODE_TYPES.Identifier && node.parent.key.name === "constructor";
1221
1113
  }
1222
1114
  var no_direct_mutation_state_default = createRule({
1223
1115
  meta: {
1224
1116
  type: "problem",
1225
- docs: {
1226
- description: "Disallow direct mutation of `this.state`.",
1227
- [Symbol.for("rule_features")]: RULE_FEATURES$36
1228
- },
1117
+ docs: { description: "Disallow direct mutation of `this.state`." },
1229
1118
  messages: { noDirectMutationState: "Do not mutate state directly. Use 'setState()' instead." },
1230
1119
  schema: []
1231
1120
  },
@@ -1248,14 +1137,10 @@ function create$36(context) {
1248
1137
  //#endregion
1249
1138
  //#region src/rules/no-duplicate-key.ts
1250
1139
  const RULE_NAME$35 = "no-duplicate-key";
1251
- const RULE_FEATURES$35 = [];
1252
1140
  var no_duplicate_key_default = createRule({
1253
1141
  meta: {
1254
1142
  type: "problem",
1255
- docs: {
1256
- description: "Disallow duplicate `key` on elements in the same array or a list of `children`.",
1257
- [Symbol.for("rule_features")]: RULE_FEATURES$35
1258
- },
1143
+ docs: { description: "Disallow duplicate `key` on elements in the same array or a list of `children`." },
1259
1144
  messages: { noDuplicateKey: "A key must be unique. '{{value}}' is duplicated." },
1260
1145
  schema: []
1261
1146
  },
@@ -1319,14 +1204,10 @@ function create$35(context) {
1319
1204
  //#endregion
1320
1205
  //#region src/rules/no-forward-ref.ts
1321
1206
  const RULE_NAME$34 = "no-forward-ref";
1322
- const RULE_FEATURES$34 = ["MOD"];
1323
1207
  var no_forward_ref_default = createRule({
1324
1208
  meta: {
1325
1209
  type: "problem",
1326
- docs: {
1327
- description: "Replaces usages of `forwardRef` with passing `ref` as a prop.",
1328
- [Symbol.for("rule_features")]: RULE_FEATURES$34
1329
- },
1210
+ docs: { description: "Replaces usages of `forwardRef` with passing `ref` as a prop." },
1330
1211
  fixable: "code",
1331
1212
  messages: { noForwardRef: "In React 19, 'forwardRef' is no longer necessary. Pass 'ref' as a prop instead." },
1332
1213
  schema: []
@@ -1362,8 +1243,8 @@ function canFix(context, node) {
1362
1243
  const { importSource } = getSettingsFromContext(context);
1363
1244
  const initialScope = context.sourceCode.getScope(node);
1364
1245
  switch (node.callee.type) {
1365
- case AST_NODE_TYPES.Identifier: return isInitializedFromReact(node.callee.name, importSource, initialScope);
1366
- case AST_NODE_TYPES.MemberExpression: return node.callee.object.type === AST_NODE_TYPES.Identifier && isInitializedFromReact(node.callee.object.name, importSource, initialScope);
1246
+ case AST_NODE_TYPES.Identifier: return isInitializedFromReact(node.callee.name, initialScope, importSource);
1247
+ case AST_NODE_TYPES.MemberExpression: return node.callee.object.type === AST_NODE_TYPES.Identifier && isInitializedFromReact(node.callee.object.name, initialScope, importSource);
1367
1248
  default: return false;
1368
1249
  }
1369
1250
  }
@@ -1431,14 +1312,10 @@ function getComponentPropsFixes(context, fixer, node, typeArguments) {
1431
1312
  //#endregion
1432
1313
  //#region src/rules/no-implicit-key.ts
1433
1314
  const RULE_NAME$33 = "no-implicit-key";
1434
- const RULE_FEATURES$33 = ["EXP"];
1435
1315
  var no_implicit_key_default = createRule({
1436
1316
  meta: {
1437
1317
  type: "problem",
1438
- docs: {
1439
- description: "Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects).",
1440
- [Symbol.for("rule_features")]: RULE_FEATURES$33
1441
- },
1318
+ docs: { description: "Prevents `key` from not being explicitly specified (e.g. spreading `key` from objects)." },
1442
1319
  messages: { noImplicitKey: "Do not use implicit 'key' props." },
1443
1320
  schema: []
1444
1321
  },
@@ -1460,14 +1337,10 @@ function create$33(context) {
1460
1337
  //#endregion
1461
1338
  //#region src/rules/no-leaked-conditional-rendering.ts
1462
1339
  const RULE_NAME$32 = "no-leaked-conditional-rendering";
1463
- const RULE_FEATURES$32 = ["TSC"];
1464
1340
  var no_leaked_conditional_rendering_default = createRule({
1465
1341
  meta: {
1466
1342
  type: "problem",
1467
- docs: {
1468
- description: "Prevents problematic leaked values from being rendered.",
1469
- [Symbol.for("rule_features")]: RULE_FEATURES$32
1470
- },
1343
+ docs: { description: "Prevents problematic leaked values from being rendered." },
1471
1344
  messages: { noLeakedConditionalRendering: "Potential leaked value {{value}} that might cause unintentionally rendered values or rendering crashes." },
1472
1345
  schema: []
1473
1346
  },
@@ -1532,14 +1405,10 @@ function create$32(context) {
1532
1405
  //#endregion
1533
1406
  //#region src/rules/no-missing-component-display-name.ts
1534
1407
  const RULE_NAME$31 = "no-missing-component-display-name";
1535
- const RULE_FEATURES$31 = [];
1536
1408
  var no_missing_component_display_name_default = createRule({
1537
1409
  meta: {
1538
1410
  type: "problem",
1539
- docs: {
1540
- description: "Enforces that all components have a `displayName` which can be used in devtools.",
1541
- [Symbol.for("rule_features")]: RULE_FEATURES$31
1542
- },
1411
+ docs: { description: "Enforces that all components have a `displayName` which can be used in devtools." },
1543
1412
  messages: { noMissingComponentDisplayName: "Add missing 'displayName' for component." },
1544
1413
  schema: []
1545
1414
  },
@@ -1574,14 +1443,10 @@ function create$31(context) {
1574
1443
  //#endregion
1575
1444
  //#region src/rules/no-missing-context-display-name.ts
1576
1445
  const RULE_NAME$30 = "no-missing-context-display-name";
1577
- const RULE_FEATURES$30 = ["FIX"];
1578
1446
  var no_missing_context_display_name_default = createRule({
1579
1447
  meta: {
1580
1448
  type: "problem",
1581
- docs: {
1582
- description: "Enforces that all contexts have a `displayName` which can be used in devtools.",
1583
- [Symbol.for("rule_features")]: RULE_FEATURES$30
1584
- },
1449
+ docs: { description: "Enforces that all contexts have a `displayName` which can be used in devtools." },
1585
1450
  fixable: "code",
1586
1451
  messages: { noMissingContextDisplayName: "Add missing 'displayName' for context." },
1587
1452
  schema: []
@@ -1643,14 +1508,10 @@ function create$30(context) {
1643
1508
  //#endregion
1644
1509
  //#region src/rules/no-missing-key.ts
1645
1510
  const RULE_NAME$29 = "no-missing-key";
1646
- const RULE_FEATURES$29 = [];
1647
1511
  var no_missing_key_default = createRule({
1648
1512
  meta: {
1649
1513
  type: "problem",
1650
- docs: {
1651
- description: "Disallow missing `key` on items in list rendering.",
1652
- [Symbol.for("rule_features")]: RULE_FEATURES$29
1653
- },
1514
+ docs: { description: "Disallow missing `key` on items in list rendering." },
1654
1515
  messages: {
1655
1516
  missingKey: "Missing 'key' for element when rendering list.",
1656
1517
  unexpectedFragmentSyntax: "Use fragment component instead of '<>' because it does not support `key`."
@@ -1740,14 +1601,10 @@ function create$29(context) {
1740
1601
  //#endregion
1741
1602
  //#region src/rules/no-misused-capture-owner-stack.ts
1742
1603
  const RULE_NAME$28 = "no-misused-capture-owner-stack";
1743
- const RULE_FEATURES$28 = ["EXP"];
1744
1604
  var no_misused_capture_owner_stack_default = createRule({
1745
1605
  meta: {
1746
1606
  type: "problem",
1747
- docs: {
1748
- description: "Prevents incorrect usage of `captureOwnerStack`.",
1749
- [Symbol.for("rule_features")]: RULE_FEATURES$28
1750
- },
1607
+ docs: { description: "Prevents incorrect usage of `captureOwnerStack`." },
1751
1608
  fixable: "code",
1752
1609
  messages: {
1753
1610
  missingDevelopmentOnlyCheck: `Don't call 'captureOwnerStack' directly. Use 'if (process.env.NODE_ENV !== "production") {...}' to conditionally access it.`,
@@ -1792,14 +1649,10 @@ function isDevelopmentOnlyCheck(node) {
1792
1649
  //#endregion
1793
1650
  //#region src/rules/no-nested-component-definitions.ts
1794
1651
  const RULE_NAME$27 = "no-nested-component-definitions";
1795
- const RULE_FEATURES$27 = [];
1796
1652
  var no_nested_component_definitions_default = createRule({
1797
1653
  meta: {
1798
1654
  type: "problem",
1799
- docs: {
1800
- description: "Disallow nesting component definitions inside other components.",
1801
- [Symbol.for("rule_features")]: RULE_FEATURES$27
1802
- },
1655
+ docs: { description: "Disallow nesting component definitions inside other components." },
1803
1656
  messages: { noNestedComponentDefinitions: "Do not nest component definitions inside other components or props. {{suggestion}}" },
1804
1657
  schema: []
1805
1658
  },
@@ -1916,14 +1769,10 @@ function isInsideCreateElementProps(context, node) {
1916
1769
  //#endregion
1917
1770
  //#region src/rules/no-nested-lazy-component-declarations.ts
1918
1771
  const RULE_NAME$26 = "no-nested-lazy-component-declarations";
1919
- const RULE_FEATURES$26 = [];
1920
1772
  var no_nested_lazy_component_declarations_default = createRule({
1921
1773
  meta: {
1922
1774
  type: "problem",
1923
- docs: {
1924
- description: "Disallow nesting lazy component declarations inside other components.",
1925
- [Symbol.for("rule_features")]: RULE_FEATURES$26
1926
- },
1775
+ docs: { description: "Disallow nesting lazy component declarations inside other components." },
1927
1776
  messages: { noNestedLazyComponentDeclarations: "Do not declare lazy components inside other components. Instead, always declare them at the top level of your module." },
1928
1777
  schema: []
1929
1778
  },
@@ -1963,14 +1812,10 @@ function create$26(context) {
1963
1812
  //#endregion
1964
1813
  //#region src/rules/no-prop-types.ts
1965
1814
  const RULE_NAME$25 = "no-prop-types";
1966
- const RULE_FEATURES$25 = [];
1967
1815
  var no_prop_types_default = createRule({
1968
1816
  meta: {
1969
1817
  type: "problem",
1970
- docs: {
1971
- description: "Disallow `propTypes` in favor of TypeScript or another type-checking solution.",
1972
- [Symbol.for("rule_features")]: RULE_FEATURES$25
1973
- },
1818
+ docs: { description: "Disallow `propTypes` in favor of TypeScript or another type-checking solution." },
1974
1819
  messages: { noPropTypes: "[Deprecated] Use TypeScript or another type-checking solution instead." },
1975
1820
  schema: []
1976
1821
  },
@@ -2007,17 +1852,13 @@ function create$25(context) {
2007
1852
  //#endregion
2008
1853
  //#region src/rules/no-redundant-should-component-update.ts
2009
1854
  const RULE_NAME$24 = "no-redundant-should-component-update";
2010
- const RULE_FEATURES$24 = [];
2011
1855
  function isShouldComponentUpdate(node) {
2012
1856
  return AST.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "shouldComponentUpdate";
2013
1857
  }
2014
1858
  var no_redundant_should_component_update_default = createRule({
2015
1859
  meta: {
2016
1860
  type: "problem",
2017
- docs: {
2018
- description: "Disallow `shouldComponentUpdate` when extending `React.PureComponent`.",
2019
- [Symbol.for("rule_features")]: RULE_FEATURES$24
2020
- },
1861
+ docs: { description: "Disallow `shouldComponentUpdate` when extending `React.PureComponent`." },
2021
1862
  messages: { noRedundantShouldComponentUpdate: "'{{componentName}}' does not need 'shouldComponentUpdate' when extending 'React.PureComponent'." },
2022
1863
  schema: []
2023
1864
  },
@@ -2047,14 +1888,10 @@ function create$24(context) {
2047
1888
  //#endregion
2048
1889
  //#region src/rules/no-set-state-in-component-did-mount.ts
2049
1890
  const RULE_NAME$23 = "no-set-state-in-component-did-mount";
2050
- const RULE_FEATURES$23 = [];
2051
1891
  var no_set_state_in_component_did_mount_default = createRule({
2052
1892
  meta: {
2053
1893
  type: "problem",
2054
- docs: {
2055
- description: "Disallow calling `this.setState` in `componentDidMount` outside of functions, such as callbacks.",
2056
- [Symbol.for("rule_features")]: RULE_FEATURES$23
2057
- },
1894
+ docs: { description: "Disallow calling `this.setState` in `componentDidMount` outside of functions, such as callbacks." },
2058
1895
  messages: { noSetStateInComponentDidMount: "Do not call `this.setState` in `componentDidMount` outside of functions, such as callbacks." },
2059
1896
  schema: []
2060
1897
  },
@@ -2081,14 +1918,10 @@ function create$23(context) {
2081
1918
  //#endregion
2082
1919
  //#region src/rules/no-set-state-in-component-did-update.ts
2083
1920
  const RULE_NAME$22 = "no-set-state-in-component-did-update";
2084
- const RULE_FEATURES$22 = [];
2085
1921
  var no_set_state_in_component_did_update_default = createRule({
2086
1922
  meta: {
2087
1923
  type: "problem",
2088
- docs: {
2089
- description: "Disallow calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks.",
2090
- [Symbol.for("rule_features")]: RULE_FEATURES$22
2091
- },
1924
+ docs: { description: "Disallow calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks." },
2092
1925
  messages: { noSetStateInComponentDidUpdate: "Do not call `this.setState` in `componentDidUpdate` outside of functions, such as callbacks." },
2093
1926
  schema: []
2094
1927
  },
@@ -2115,14 +1948,10 @@ function create$22(context) {
2115
1948
  //#endregion
2116
1949
  //#region src/rules/no-set-state-in-component-will-update.ts
2117
1950
  const RULE_NAME$21 = "no-set-state-in-component-will-update";
2118
- const RULE_FEATURES$21 = [];
2119
1951
  var no_set_state_in_component_will_update_default = createRule({
2120
1952
  meta: {
2121
1953
  type: "problem",
2122
- docs: {
2123
- description: "Disallow calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks.",
2124
- [Symbol.for("rule_features")]: RULE_FEATURES$21
2125
- },
1954
+ docs: { description: "Disallow calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks." },
2126
1955
  messages: { noSetStateInComponentWillUpdate: "Do not call `this.setState` in `componentWillUpdate` outside of functions, such as callbacks." },
2127
1956
  schema: []
2128
1957
  },
@@ -2149,14 +1978,10 @@ function create$21(context) {
2149
1978
  //#endregion
2150
1979
  //#region src/rules/no-string-refs.ts
2151
1980
  const RULE_NAME$20 = "no-string-refs";
2152
- const RULE_FEATURES$20 = ["MOD"];
2153
1981
  var no_string_refs_default = createRule({
2154
1982
  meta: {
2155
1983
  type: "problem",
2156
- docs: {
2157
- description: "Replaces string refs with callback refs.",
2158
- [Symbol.for("rule_features")]: RULE_FEATURES$20
2159
- },
1984
+ docs: { description: "Replaces string refs with callback refs." },
2160
1985
  fixable: "code",
2161
1986
  messages: { noStringRefs: "[Deprecated] Use callback refs instead." },
2162
1987
  schema: []
@@ -2211,14 +2036,10 @@ function getJsxAttributeValueText(context, node) {
2211
2036
  //#endregion
2212
2037
  //#region src/rules/no-unnecessary-key.ts
2213
2038
  const RULE_NAME$19 = "no-unnecessary-key";
2214
- const RULE_FEATURES$19 = ["EXP"];
2215
2039
  var no_unnecessary_key_default = createRule({
2216
2040
  meta: {
2217
2041
  type: "problem",
2218
- docs: {
2219
- description: "Prevents the use of unnecessary `key` props on JSX elements when rendering lists.",
2220
- [Symbol.for("rule_features")]: RULE_FEATURES$19
2221
- },
2042
+ docs: { description: "Prevents the use of unnecessary `key` props on JSX elements when rendering lists." },
2222
2043
  messages: { noUnnecessaryKey: "Unnecessary `key` prop on this element. The `key` should be on the top-level element returned from the array." },
2223
2044
  schema: []
2224
2045
  },
@@ -2259,14 +2080,10 @@ function isMapCallback(node) {
2259
2080
  //#endregion
2260
2081
  //#region src/rules/no-unnecessary-use-callback.ts
2261
2082
  const RULE_NAME$18 = "no-unnecessary-use-callback";
2262
- const RULE_FEATURES$18 = ["EXP"];
2263
2083
  var no_unnecessary_use_callback_default = createRule({
2264
2084
  meta: {
2265
2085
  type: "problem",
2266
- docs: {
2267
- description: "Disallow unnecessary usage of `useCallback`.",
2268
- [Symbol.for("rule_features")]: RULE_FEATURES$18
2269
- },
2086
+ docs: { description: "Disallow unnecessary usage of `useCallback`." },
2270
2087
  messages: {
2271
2088
  noUnnecessaryUseCallback: "An 'useCallback' with empty deps and no references to the component scope may be unnecessary.",
2272
2089
  noUnnecessaryUseCallbackInsideUseEffect: "{{name}} is only used inside 1 useEffect, which may be unnecessary. You can move the computation into useEffect directly and merge the dependency arrays."
@@ -2336,14 +2153,10 @@ function checkForUsageInsideUseEffect$1(sourceCode, node) {
2336
2153
  //#endregion
2337
2154
  //#region src/rules/no-unnecessary-use-memo.ts
2338
2155
  const RULE_NAME$17 = "no-unnecessary-use-memo";
2339
- const RULE_FEATURES$17 = ["EXP"];
2340
2156
  var no_unnecessary_use_memo_default = createRule({
2341
2157
  meta: {
2342
2158
  type: "problem",
2343
- docs: {
2344
- description: "Disallow unnecessary usage of `useMemo`.",
2345
- [Symbol.for("rule_features")]: RULE_FEATURES$17
2346
- },
2159
+ docs: { description: "Disallow unnecessary usage of `useMemo`." },
2347
2160
  messages: {
2348
2161
  noUnnecessaryUseMemo: "An 'useMemo' with empty deps and no references to the component scope may be unnecessary.",
2349
2162
  noUnnecessaryUseMemoInsideUseEffect: "{{name}} is only used inside 1 useEffect, which may be unnecessary. You can move the computation into useEffect directly and merge the dependency arrays."
@@ -2417,7 +2230,6 @@ function checkForUsageInsideUseEffect(sourceCode, node) {
2417
2230
  //#endregion
2418
2231
  //#region src/rules/no-unnecessary-use-prefix.ts
2419
2232
  const RULE_NAME$16 = "no-unnecessary-use-prefix";
2420
- const RULE_FEATURES$16 = ["EXP"];
2421
2233
  const WELL_KNOWN_HOOKS = ["useMDXComponents"];
2422
2234
  function containsUseComments(context, node) {
2423
2235
  return context.sourceCode.getCommentsInside(node).some(({ value }) => /use\([\s\S]*?\)/u.test(value) || /use[A-Z0-9]\w*\([\s\S]*?\)/u.test(value));
@@ -2425,10 +2237,7 @@ function containsUseComments(context, node) {
2425
2237
  var no_unnecessary_use_prefix_default = createRule({
2426
2238
  meta: {
2427
2239
  type: "problem",
2428
- docs: {
2429
- description: "Enforces that a function with the `use` prefix should use at least one Hook inside of it.",
2430
- [Symbol.for("rule_features")]: RULE_FEATURES$16
2431
- },
2240
+ docs: { description: "Enforces that a function with the `use` prefix should use at least one Hook inside of it." },
2432
2241
  messages: { noUnnecessaryUsePrefix: "If your function doesn't call any Hooks, avoid the 'use' prefix. Instead, write it as a regular function without the 'use' prefix." },
2433
2242
  schema: []
2434
2243
  },
@@ -2460,14 +2269,10 @@ function create$16(context) {
2460
2269
  //#endregion
2461
2270
  //#region src/rules/no-unsafe-component-will-mount.ts
2462
2271
  const RULE_NAME$15 = "no-unsafe-component-will-mount";
2463
- const RULE_FEATURES$15 = [];
2464
2272
  var no_unsafe_component_will_mount_default = createRule({
2465
2273
  meta: {
2466
2274
  type: "problem",
2467
- docs: {
2468
- description: "Warns the usage of `UNSAFE_componentWillMount` in class components.",
2469
- [Symbol.for("rule_features")]: RULE_FEATURES$15
2470
- },
2275
+ docs: { description: "Warns the usage of `UNSAFE_componentWillMount` in class components." },
2471
2276
  messages: { noUnsafeComponentWillMount: "Do not use 'UNSAFE_componentWillMount'." },
2472
2277
  schema: []
2473
2278
  },
@@ -2495,14 +2300,10 @@ function create$15(context) {
2495
2300
  //#endregion
2496
2301
  //#region src/rules/no-unsafe-component-will-receive-props.ts
2497
2302
  const RULE_NAME$14 = "no-unsafe-component-will-receive-props";
2498
- const RULE_FEATURES$14 = [];
2499
2303
  var no_unsafe_component_will_receive_props_default = createRule({
2500
2304
  meta: {
2501
2305
  type: "problem",
2502
- docs: {
2503
- description: "Warns the usage of `UNSAFE_componentWillReceiveProps` in class components.",
2504
- [Symbol.for("rule_features")]: RULE_FEATURES$14
2505
- },
2306
+ docs: { description: "Warns the usage of `UNSAFE_componentWillReceiveProps` in class components." },
2506
2307
  messages: { noUnsafeComponentWillReceiveProps: "Do not use 'UNSAFE_componentWillReceiveProps'." },
2507
2308
  schema: []
2508
2309
  },
@@ -2530,14 +2331,10 @@ function create$14(context) {
2530
2331
  //#endregion
2531
2332
  //#region src/rules/no-unsafe-component-will-update.ts
2532
2333
  const RULE_NAME$13 = "no-unsafe-component-will-update";
2533
- const RULE_FEATURES$13 = [];
2534
2334
  var no_unsafe_component_will_update_default = createRule({
2535
2335
  meta: {
2536
2336
  type: "problem",
2537
- docs: {
2538
- description: "Warns the usage of `UNSAFE_componentWillUpdate` in class components.",
2539
- [Symbol.for("rule_features")]: RULE_FEATURES$13
2540
- },
2337
+ docs: { description: "Warns the usage of `UNSAFE_componentWillUpdate` in class components." },
2541
2338
  messages: { noUnsafeComponentWillUpdate: "Do not use 'UNSAFE_componentWillUpdate'." },
2542
2339
  schema: []
2543
2340
  },
@@ -2565,14 +2362,10 @@ function create$13(context) {
2565
2362
  //#endregion
2566
2363
  //#region src/rules/no-unstable-context-value.ts
2567
2364
  const RULE_NAME$12 = "no-unstable-context-value";
2568
- const RULE_FEATURES$12 = [];
2569
2365
  var no_unstable_context_value_default = createRule({
2570
2366
  meta: {
2571
2367
  type: "problem",
2572
- docs: {
2573
- description: "Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`.",
2574
- [Symbol.for("rule_features")]: RULE_FEATURES$12
2575
- },
2368
+ docs: { description: "Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`." },
2576
2369
  messages: { unstableContextValue: "A/an '{{type}}' passed as the value prop to the context provider should not be constructed. It will change on every render. {{suggestion}}" },
2577
2370
  schema: []
2578
2371
  },
@@ -2628,7 +2421,6 @@ function isContextName(name$7, isReact18OrBelow) {
2628
2421
  //#endregion
2629
2422
  //#region src/rules/no-unstable-default-props.ts
2630
2423
  const RULE_NAME$11 = "no-unstable-default-props";
2631
- const RULE_FEATURES$11 = [];
2632
2424
  const defaultOptions$2 = [{ safeDefaultProps: [] }];
2633
2425
  const schema$1 = [{
2634
2426
  type: "object",
@@ -2641,10 +2433,7 @@ const schema$1 = [{
2641
2433
  var no_unstable_default_props_default = createRule({
2642
2434
  meta: {
2643
2435
  type: "problem",
2644
- docs: {
2645
- description: "Prevents using referential-type values as default props in object destructuring.",
2646
- [Symbol.for("rule_features")]: RULE_FEATURES$11
2647
- },
2436
+ docs: { description: "Prevents using referential-type values as default props in object destructuring." },
2648
2437
  messages: { noUnstableDefaultProps: "A/an '{{forbiddenType}}' as default prop. This could lead to potential infinite render loop in React. Use a variable instead of '{{forbiddenType}}'." },
2649
2438
  schema: schema$1
2650
2439
  },
@@ -2706,7 +2495,6 @@ function create$11(context, [options]) {
2706
2495
  //#endregion
2707
2496
  //#region src/rules/no-unused-class-component-members.ts
2708
2497
  const RULE_NAME$10 = "no-unused-class-component-members";
2709
- const RULE_FEATURES$10 = [];
2710
2498
  const LIFECYCLE_METHODS = new Set([
2711
2499
  "componentDidCatch",
2712
2500
  "componentDidMount",
@@ -2733,10 +2521,7 @@ function isKeyLiteral$1(node, key) {
2733
2521
  var no_unused_class_component_members_default = createRule({
2734
2522
  meta: {
2735
2523
  type: "problem",
2736
- docs: {
2737
- description: "Warns unused class component methods and properties.",
2738
- [Symbol.for("rule_features")]: RULE_FEATURES$10
2739
- },
2524
+ docs: { description: "Warns unused class component methods and properties." },
2740
2525
  messages: { noUnusedClassComponentMembers: "Unused method or property '{{methodName}}'' of class '{{className}}'." },
2741
2526
  schema: []
2742
2527
  },
@@ -2826,14 +2611,10 @@ function create$10(context) {
2826
2611
  //#endregion
2827
2612
  //#region src/rules/no-unused-props.ts
2828
2613
  const RULE_NAME$9 = "no-unused-props";
2829
- const RULE_FEATURES$9 = ["TSC", "EXP"];
2830
2614
  var no_unused_props_default = createRule({
2831
2615
  meta: {
2832
2616
  type: "problem",
2833
- docs: {
2834
- description: "Warns component props that are defined but never used.",
2835
- [Symbol.for("rule_features")]: RULE_FEATURES$9
2836
- },
2617
+ docs: { description: "Warns component props that are defined but never used." },
2837
2618
  messages: { noUnusedProps: "Prop `{{name}}` is declared but never used" },
2838
2619
  schema: []
2839
2620
  },
@@ -2943,7 +2724,6 @@ function reportUnusedProp(context, services, prop) {
2943
2724
  //#endregion
2944
2725
  //#region src/rules/no-unused-state.ts
2945
2726
  const RULE_NAME$8 = "no-unused-state";
2946
- const RULE_FEATURES$8 = [];
2947
2727
  function isKeyLiteral(node, key) {
2948
2728
  return match(key).with({ type: AST_NODE_TYPES.Literal }, constTrue).with({
2949
2729
  type: AST_NODE_TYPES.TemplateLiteral,
@@ -2953,10 +2733,7 @@ function isKeyLiteral(node, key) {
2953
2733
  var no_unused_state_default = createRule({
2954
2734
  meta: {
2955
2735
  type: "problem",
2956
- docs: {
2957
- description: "Warns unused class component state.",
2958
- [Symbol.for("rule_features")]: RULE_FEATURES$8
2959
- },
2736
+ docs: { description: "Warns unused class component state." },
2960
2737
  messages: { noUnusedState: "Unused class component state in '{{className}}'" },
2961
2738
  schema: []
2962
2739
  },
@@ -3074,14 +2851,10 @@ function create$8(context) {
3074
2851
  //#endregion
3075
2852
  //#region src/rules/no-use-context.ts
3076
2853
  const RULE_NAME$7 = "no-use-context";
3077
- const RULE_FEATURES$7 = ["MOD"];
3078
2854
  var no_use_context_default = createRule({
3079
2855
  meta: {
3080
2856
  type: "problem",
3081
- docs: {
3082
- description: "Replaces usages of `useContext` with `use`.",
3083
- [Symbol.for("rule_features")]: RULE_FEATURES$7
3084
- },
2857
+ docs: { description: "Replaces usages of `useContext` with `use`." },
3085
2858
  fixable: "code",
3086
2859
  messages: { noUseContext: "In React 19, 'use' is preferred over 'useContext' because it is more flexible." },
3087
2860
  schema: []
@@ -3156,14 +2929,10 @@ function getCorrelativeTokens(context, node) {
3156
2929
  //#endregion
3157
2930
  //#region src/rules/no-useless-forward-ref.ts
3158
2931
  const RULE_NAME$6 = "no-useless-forward-ref";
3159
- const RULE_FEATURES$6 = [];
3160
2932
  var no_useless_forward_ref_default = createRule({
3161
2933
  meta: {
3162
2934
  type: "problem",
3163
- docs: {
3164
- description: "Disallow useless `forwardRef` calls on components that don't use `ref`s.",
3165
- [Symbol.for("rule_features")]: RULE_FEATURES$6
3166
- },
2935
+ docs: { description: "Disallow useless `forwardRef` calls on components that don't use `ref`s." },
3167
2936
  messages: { noUselessForwardRef: "A 'forwardRef' is used with this component but no 'ref' parameter is set." },
3168
2937
  schema: []
3169
2938
  },
@@ -3187,7 +2956,6 @@ function create$6(context) {
3187
2956
  //#endregion
3188
2957
  //#region src/rules/no-useless-fragment.ts
3189
2958
  const RULE_NAME$5 = "no-useless-fragment";
3190
- const RULE_FEATURES$5 = ["FIX", "CFG"];
3191
2959
  const defaultOptions$1 = [{
3192
2960
  allowEmptyFragment: false,
3193
2961
  allowExpressions: true
@@ -3210,10 +2978,7 @@ var no_useless_fragment_default = createRule({
3210
2978
  meta: {
3211
2979
  type: "problem",
3212
2980
  defaultOptions: [...defaultOptions$1],
3213
- docs: {
3214
- description: "Disallow useless fragment elements.",
3215
- [Symbol.for("rule_features")]: RULE_FEATURES$5
3216
- },
2981
+ docs: { description: "Disallow useless fragment elements." },
3217
2982
  fixable: "code",
3218
2983
  messages: { noUselessFragment: "A fragment {{reason}} is useless." },
3219
2984
  schema
@@ -3327,17 +3092,13 @@ function trimLikeReact(text) {
3327
3092
  //#endregion
3328
3093
  //#region src/rules/prefer-destructuring-assignment.ts
3329
3094
  const RULE_NAME$4 = "prefer-destructuring-assignment";
3330
- const RULE_FEATURES$4 = [];
3331
3095
  function isMemberExpressionWithObjectName(node) {
3332
3096
  return node.object.type === AST_NODE_TYPES.Identifier && "name" in node.object;
3333
3097
  }
3334
3098
  var prefer_destructuring_assignment_default = createRule({
3335
3099
  meta: {
3336
3100
  type: "problem",
3337
- docs: {
3338
- description: "Enforces destructuring assignment for component props and context.",
3339
- [Symbol.for("rule_features")]: RULE_FEATURES$4
3340
- },
3101
+ docs: { description: "Enforces destructuring assignment for component props and context." },
3341
3102
  messages: { preferDestructuringAssignment: "Use destructuring assignment for {{name}}." },
3342
3103
  schema: []
3343
3104
  },
@@ -3388,14 +3149,10 @@ function create$4(context) {
3388
3149
  //#endregion
3389
3150
  //#region src/rules/prefer-namespace-import.ts
3390
3151
  const RULE_NAME$3 = "prefer-namespace-import";
3391
- const RULE_FEATURES$3 = ["FIX"];
3392
3152
  var prefer_namespace_import_default = createRule({
3393
3153
  meta: {
3394
3154
  type: "problem",
3395
- docs: {
3396
- description: "Enforces React is imported via a namespace import.",
3397
- [Symbol.for("rule_features")]: RULE_FEATURES$3
3398
- },
3155
+ docs: { description: "Enforces React is imported via a namespace import." },
3399
3156
  fixable: "code",
3400
3157
  messages: { preferNamespaceImport: "Prefer importing React as 'import * as React from \"{{importSource}}\"';" },
3401
3158
  schema: []
@@ -3429,14 +3186,10 @@ function create$3(context) {
3429
3186
  //#endregion
3430
3187
  //#region src/rules/prefer-read-only-props.ts
3431
3188
  const RULE_NAME$2 = "prefer-read-only-props";
3432
- const RULE_FEATURES$2 = ["TSC", "EXP"];
3433
3189
  var prefer_read_only_props_default = createRule({
3434
3190
  meta: {
3435
3191
  type: "problem",
3436
- docs: {
3437
- description: "Enforces read-only props in components.",
3438
- [Symbol.for("rule_features")]: RULE_FEATURES$2
3439
- },
3192
+ docs: { description: "Enforces read-only props in components." },
3440
3193
  messages: { preferReadOnlyProps: "A function component's props should be read-only." },
3441
3194
  schema: []
3442
3195
  },
@@ -3489,7 +3242,6 @@ function isClassOrInterfaceReadonlyLoose(checker, type) {
3489
3242
  //#endregion
3490
3243
  //#region src/rules/prefer-use-state-lazy-initialization.ts
3491
3244
  const RULE_NAME$1 = "prefer-use-state-lazy-initialization";
3492
- const RULE_FEATURES$1 = ["EXP"];
3493
3245
  const ALLOW_LIST = [
3494
3246
  "Boolean",
3495
3247
  "String",
@@ -3498,10 +3250,7 @@ const ALLOW_LIST = [
3498
3250
  var prefer_use_state_lazy_initialization_default = createRule({
3499
3251
  meta: {
3500
3252
  type: "problem",
3501
- docs: {
3502
- description: "Enforces function calls made inside `useState` to be wrapped in an `initializer function`.",
3503
- [Symbol.for("rule_features")]: RULE_FEATURES$1
3504
- },
3253
+ docs: { description: "Enforces function calls made inside `useState` to be wrapped in an `initializer function`." },
3505
3254
  messages: { preferUseStateLazyInitialization: "To prevent re-computation, consider using lazy initial state for useState calls that involve function calls. Ex: 'useState(() => getValue())'." },
3506
3255
  schema: []
3507
3256
  },
@@ -3539,7 +3288,6 @@ function create$1(context) {
3539
3288
  //#endregion
3540
3289
  //#region src/rules-removed/no-forbidden-props.ts
3541
3290
  const RULE_NAME = "no-forbidden-props";
3542
- const RULE_FEATURES = ["CFG", "EXP"];
3543
3291
  const messageId = camelCase(RULE_NAME);
3544
3292
  const defaultOptions = [{ forbid: [{ prop: "/_/" }] }];
3545
3293
  var no_forbidden_props_default = createRule({
@@ -3554,10 +3302,7 @@ var no_forbidden_props_default = createRule({
3554
3302
  url: "https://eslint.org/docs/latest/rules/no-restricted-syntax"
3555
3303
  } }]
3556
3304
  },
3557
- docs: {
3558
- description: "Disallow certain props on components.",
3559
- [Symbol.for("rule_features")]: RULE_FEATURES
3560
- },
3305
+ docs: { description: "Disallow certain props on components." },
3561
3306
  messages: { [messageId]: "Prop \"{{name}}\" is forbidden." },
3562
3307
  schema: [{
3563
3308
  type: "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "2.4.0-beta.11",
3
+ "version": "2.4.0-beta.13",
4
4
  "description": "A set of composable ESLint rules for for libraries and frameworks that use React as a UI runtime.",
5
5
  "keywords": [
6
6
  "react",
@@ -46,11 +46,11 @@
46
46
  "string-ts": "^2.3.1",
47
47
  "ts-api-utils": "^2.1.0",
48
48
  "ts-pattern": "^5.9.0",
49
- "@eslint-react/ast": "2.4.0-beta.11",
50
- "@eslint-react/core": "2.4.0-beta.11",
51
- "@eslint-react/eff": "2.4.0-beta.11",
52
- "@eslint-react/shared": "2.4.0-beta.11",
53
- "@eslint-react/var": "2.4.0-beta.11"
49
+ "@eslint-react/ast": "2.4.0-beta.13",
50
+ "@eslint-react/core": "2.4.0-beta.13",
51
+ "@eslint-react/eff": "2.4.0-beta.13",
52
+ "@eslint-react/var": "2.4.0-beta.13",
53
+ "@eslint-react/shared": "2.4.0-beta.13"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/react": "^19.2.7",