eslint-plugin-react-x 2.4.0-next.9 → 2.4.1-beta.0

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