eslint-plugin-react-x 2.4.0-next.10 → 2.4.0-next.12

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 +64 -316
  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-next.10";
37
+ var version = "2.4.0-next.12";
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: {
@@ -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,14 +280,10 @@ 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
- },
286
+ docs: { description: "Disallows 'IIFE' in JSX elements." },
307
287
  messages: { jsxNoIife: "Avoid using IIFE in JSX elements." },
308
288
  schema: []
309
289
  },
@@ -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 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 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);
@@ -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: "Replace 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: "Replace 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: "Replace 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: "Replace 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: []
@@ -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,14 +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
- },
1610
+ docs: { description: "Prevents incorrect usage of `captureOwnerStack`." },
1751
1611
  fixable: "code",
1752
1612
  messages: {
1753
1613
  missingDevelopmentOnlyCheck: `Don't call 'captureOwnerStack' directly. Use 'if (process.env.NODE_ENV !== "production") {...}' to conditionally access it.`,
@@ -1792,14 +1652,10 @@ function isDevelopmentOnlyCheck(node) {
1792
1652
  //#endregion
1793
1653
  //#region src/rules/no-nested-component-definitions.ts
1794
1654
  const RULE_NAME$27 = "no-nested-component-definitions";
1795
- const RULE_FEATURES$27 = [];
1796
1655
  var no_nested_component_definitions_default = createRule({
1797
1656
  meta: {
1798
1657
  type: "problem",
1799
- docs: {
1800
- description: "Disallow nesting component definitions inside other components.",
1801
- [Symbol.for("rule_features")]: RULE_FEATURES$27
1802
- },
1658
+ docs: { description: "Disallow nesting component definitions inside other components." },
1803
1659
  messages: { noNestedComponentDefinitions: "Do not nest component definitions inside other components or props. {{suggestion}}" },
1804
1660
  schema: []
1805
1661
  },
@@ -1916,14 +1772,10 @@ function isInsideCreateElementProps(context, node) {
1916
1772
  //#endregion
1917
1773
  //#region src/rules/no-nested-lazy-component-declarations.ts
1918
1774
  const RULE_NAME$26 = "no-nested-lazy-component-declarations";
1919
- const RULE_FEATURES$26 = [];
1920
1775
  var no_nested_lazy_component_declarations_default = createRule({
1921
1776
  meta: {
1922
1777
  type: "problem",
1923
- docs: {
1924
- description: "Disallow nesting lazy component declarations inside other components.",
1925
- [Symbol.for("rule_features")]: RULE_FEATURES$26
1926
- },
1778
+ docs: { description: "Disallow nesting lazy component declarations inside other components." },
1927
1779
  messages: { noNestedLazyComponentDeclarations: "Do not declare lazy components inside other components. Instead, always declare them at the top level of your module." },
1928
1780
  schema: []
1929
1781
  },
@@ -1963,14 +1815,10 @@ function create$26(context) {
1963
1815
  //#endregion
1964
1816
  //#region src/rules/no-prop-types.ts
1965
1817
  const RULE_NAME$25 = "no-prop-types";
1966
- const RULE_FEATURES$25 = [];
1967
1818
  var no_prop_types_default = createRule({
1968
1819
  meta: {
1969
1820
  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
- },
1821
+ docs: { description: "Disallow `propTypes` in favor of TypeScript or another type-checking solution." },
1974
1822
  messages: { noPropTypes: "[Deprecated] Use TypeScript or another type-checking solution instead." },
1975
1823
  schema: []
1976
1824
  },
@@ -2007,17 +1855,13 @@ function create$25(context) {
2007
1855
  //#endregion
2008
1856
  //#region src/rules/no-redundant-should-component-update.ts
2009
1857
  const RULE_NAME$24 = "no-redundant-should-component-update";
2010
- const RULE_FEATURES$24 = [];
2011
1858
  function isShouldComponentUpdate(node) {
2012
1859
  return AST.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "shouldComponentUpdate";
2013
1860
  }
2014
1861
  var no_redundant_should_component_update_default = createRule({
2015
1862
  meta: {
2016
1863
  type: "problem",
2017
- docs: {
2018
- description: "Disallow `shouldComponentUpdate` when extending `React.PureComponent`.",
2019
- [Symbol.for("rule_features")]: RULE_FEATURES$24
2020
- },
1864
+ docs: { description: "Disallow `shouldComponentUpdate` when extending `React.PureComponent`." },
2021
1865
  messages: { noRedundantShouldComponentUpdate: "'{{componentName}}' does not need 'shouldComponentUpdate' when extending 'React.PureComponent'." },
2022
1866
  schema: []
2023
1867
  },
@@ -2047,14 +1891,10 @@ function create$24(context) {
2047
1891
  //#endregion
2048
1892
  //#region src/rules/no-set-state-in-component-did-mount.ts
2049
1893
  const RULE_NAME$23 = "no-set-state-in-component-did-mount";
2050
- const RULE_FEATURES$23 = [];
2051
1894
  var no_set_state_in_component_did_mount_default = createRule({
2052
1895
  meta: {
2053
1896
  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
- },
1897
+ docs: { description: "Disallow calling `this.setState` in `componentDidMount` outside of functions, such as callbacks." },
2058
1898
  messages: { noSetStateInComponentDidMount: "Do not call `this.setState` in `componentDidMount` outside of functions, such as callbacks." },
2059
1899
  schema: []
2060
1900
  },
@@ -2081,14 +1921,10 @@ function create$23(context) {
2081
1921
  //#endregion
2082
1922
  //#region src/rules/no-set-state-in-component-did-update.ts
2083
1923
  const RULE_NAME$22 = "no-set-state-in-component-did-update";
2084
- const RULE_FEATURES$22 = [];
2085
1924
  var no_set_state_in_component_did_update_default = createRule({
2086
1925
  meta: {
2087
1926
  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
- },
1927
+ docs: { description: "Disallow calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks." },
2092
1928
  messages: { noSetStateInComponentDidUpdate: "Do not call `this.setState` in `componentDidUpdate` outside of functions, such as callbacks." },
2093
1929
  schema: []
2094
1930
  },
@@ -2115,14 +1951,10 @@ function create$22(context) {
2115
1951
  //#endregion
2116
1952
  //#region src/rules/no-set-state-in-component-will-update.ts
2117
1953
  const RULE_NAME$21 = "no-set-state-in-component-will-update";
2118
- const RULE_FEATURES$21 = [];
2119
1954
  var no_set_state_in_component_will_update_default = createRule({
2120
1955
  meta: {
2121
1956
  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
- },
1957
+ docs: { description: "Disallow calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks." },
2126
1958
  messages: { noSetStateInComponentWillUpdate: "Do not call `this.setState` in `componentWillUpdate` outside of functions, such as callbacks." },
2127
1959
  schema: []
2128
1960
  },
@@ -2149,14 +1981,10 @@ function create$21(context) {
2149
1981
  //#endregion
2150
1982
  //#region src/rules/no-string-refs.ts
2151
1983
  const RULE_NAME$20 = "no-string-refs";
2152
- const RULE_FEATURES$20 = ["MOD"];
2153
1984
  var no_string_refs_default = createRule({
2154
1985
  meta: {
2155
1986
  type: "problem",
2156
- docs: {
2157
- description: "Replaces string refs with callback refs.",
2158
- [Symbol.for("rule_features")]: RULE_FEATURES$20
2159
- },
1987
+ docs: { description: "Replaces string refs with callback refs." },
2160
1988
  fixable: "code",
2161
1989
  messages: { noStringRefs: "[Deprecated] Use callback refs instead." },
2162
1990
  schema: []
@@ -2211,14 +2039,10 @@ function getJsxAttributeValueText(context, node) {
2211
2039
  //#endregion
2212
2040
  //#region src/rules/no-unnecessary-key.ts
2213
2041
  const RULE_NAME$19 = "no-unnecessary-key";
2214
- const RULE_FEATURES$19 = ["EXP"];
2215
2042
  var no_unnecessary_key_default = createRule({
2216
2043
  meta: {
2217
2044
  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
- },
2045
+ docs: { description: "Prevents the use of unnecessary `key` props on JSX elements when rendering lists." },
2222
2046
  messages: { noUnnecessaryKey: "Unnecessary `key` prop on this element. The `key` should be on the top-level element returned from the array." },
2223
2047
  schema: []
2224
2048
  },
@@ -2259,14 +2083,10 @@ function isMapCallback(node) {
2259
2083
  //#endregion
2260
2084
  //#region src/rules/no-unnecessary-use-callback.ts
2261
2085
  const RULE_NAME$18 = "no-unnecessary-use-callback";
2262
- const RULE_FEATURES$18 = ["EXP"];
2263
2086
  var no_unnecessary_use_callback_default = createRule({
2264
2087
  meta: {
2265
2088
  type: "problem",
2266
- docs: {
2267
- description: "Disallow unnecessary usage of `useCallback`.",
2268
- [Symbol.for("rule_features")]: RULE_FEATURES$18
2269
- },
2089
+ docs: { description: "Disallow unnecessary usage of `useCallback`." },
2270
2090
  messages: {
2271
2091
  noUnnecessaryUseCallback: "An 'useCallback' with empty deps and no references to the component scope may be unnecessary.",
2272
2092
  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 +2156,10 @@ function checkForUsageInsideUseEffect$1(sourceCode, node) {
2336
2156
  //#endregion
2337
2157
  //#region src/rules/no-unnecessary-use-memo.ts
2338
2158
  const RULE_NAME$17 = "no-unnecessary-use-memo";
2339
- const RULE_FEATURES$17 = ["EXP"];
2340
2159
  var no_unnecessary_use_memo_default = createRule({
2341
2160
  meta: {
2342
2161
  type: "problem",
2343
- docs: {
2344
- description: "Disallow unnecessary usage of `useMemo`.",
2345
- [Symbol.for("rule_features")]: RULE_FEATURES$17
2346
- },
2162
+ docs: { description: "Disallow unnecessary usage of `useMemo`." },
2347
2163
  messages: {
2348
2164
  noUnnecessaryUseMemo: "An 'useMemo' with empty deps and no references to the component scope may be unnecessary.",
2349
2165
  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 +2233,6 @@ function checkForUsageInsideUseEffect(sourceCode, node) {
2417
2233
  //#endregion
2418
2234
  //#region src/rules/no-unnecessary-use-prefix.ts
2419
2235
  const RULE_NAME$16 = "no-unnecessary-use-prefix";
2420
- const RULE_FEATURES$16 = ["EXP"];
2421
2236
  const WELL_KNOWN_HOOKS = ["useMDXComponents"];
2422
2237
  function containsUseComments(context, node) {
2423
2238
  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 +2240,7 @@ function containsUseComments(context, node) {
2425
2240
  var no_unnecessary_use_prefix_default = createRule({
2426
2241
  meta: {
2427
2242
  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
- },
2243
+ docs: { description: "Enforces that a function with the `use` prefix should use at least one Hook inside of it." },
2432
2244
  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
2245
  schema: []
2434
2246
  },
@@ -2460,14 +2272,10 @@ function create$16(context) {
2460
2272
  //#endregion
2461
2273
  //#region src/rules/no-unsafe-component-will-mount.ts
2462
2274
  const RULE_NAME$15 = "no-unsafe-component-will-mount";
2463
- const RULE_FEATURES$15 = [];
2464
2275
  var no_unsafe_component_will_mount_default = createRule({
2465
2276
  meta: {
2466
2277
  type: "problem",
2467
- docs: {
2468
- description: "Warns the usage of `UNSAFE_componentWillMount` in class components.",
2469
- [Symbol.for("rule_features")]: RULE_FEATURES$15
2470
- },
2278
+ docs: { description: "Warns the usage of `UNSAFE_componentWillMount` in class components." },
2471
2279
  messages: { noUnsafeComponentWillMount: "Do not use 'UNSAFE_componentWillMount'." },
2472
2280
  schema: []
2473
2281
  },
@@ -2495,14 +2303,10 @@ function create$15(context) {
2495
2303
  //#endregion
2496
2304
  //#region src/rules/no-unsafe-component-will-receive-props.ts
2497
2305
  const RULE_NAME$14 = "no-unsafe-component-will-receive-props";
2498
- const RULE_FEATURES$14 = [];
2499
2306
  var no_unsafe_component_will_receive_props_default = createRule({
2500
2307
  meta: {
2501
2308
  type: "problem",
2502
- docs: {
2503
- description: "Warns the usage of `UNSAFE_componentWillReceiveProps` in class components.",
2504
- [Symbol.for("rule_features")]: RULE_FEATURES$14
2505
- },
2309
+ docs: { description: "Warns the usage of `UNSAFE_componentWillReceiveProps` in class components." },
2506
2310
  messages: { noUnsafeComponentWillReceiveProps: "Do not use 'UNSAFE_componentWillReceiveProps'." },
2507
2311
  schema: []
2508
2312
  },
@@ -2530,14 +2334,10 @@ function create$14(context) {
2530
2334
  //#endregion
2531
2335
  //#region src/rules/no-unsafe-component-will-update.ts
2532
2336
  const RULE_NAME$13 = "no-unsafe-component-will-update";
2533
- const RULE_FEATURES$13 = [];
2534
2337
  var no_unsafe_component_will_update_default = createRule({
2535
2338
  meta: {
2536
2339
  type: "problem",
2537
- docs: {
2538
- description: "Warns the usage of `UNSAFE_componentWillUpdate` in class components.",
2539
- [Symbol.for("rule_features")]: RULE_FEATURES$13
2540
- },
2340
+ docs: { description: "Warns the usage of `UNSAFE_componentWillUpdate` in class components." },
2541
2341
  messages: { noUnsafeComponentWillUpdate: "Do not use 'UNSAFE_componentWillUpdate'." },
2542
2342
  schema: []
2543
2343
  },
@@ -2565,14 +2365,10 @@ function create$13(context) {
2565
2365
  //#endregion
2566
2366
  //#region src/rules/no-unstable-context-value.ts
2567
2367
  const RULE_NAME$12 = "no-unstable-context-value";
2568
- const RULE_FEATURES$12 = [];
2569
2368
  var no_unstable_context_value_default = createRule({
2570
2369
  meta: {
2571
2370
  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
- },
2371
+ docs: { description: "Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`." },
2576
2372
  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
2373
  schema: []
2578
2374
  },
@@ -2628,7 +2424,6 @@ function isContextName(name$7, isReact18OrBelow) {
2628
2424
  //#endregion
2629
2425
  //#region src/rules/no-unstable-default-props.ts
2630
2426
  const RULE_NAME$11 = "no-unstable-default-props";
2631
- const RULE_FEATURES$11 = [];
2632
2427
  const defaultOptions$2 = [{ safeDefaultProps: [] }];
2633
2428
  const schema$1 = [{
2634
2429
  type: "object",
@@ -2641,10 +2436,7 @@ const schema$1 = [{
2641
2436
  var no_unstable_default_props_default = createRule({
2642
2437
  meta: {
2643
2438
  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
- },
2439
+ docs: { description: "Prevents using referential-type values as default props in object destructuring." },
2648
2440
  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
2441
  schema: schema$1
2650
2442
  },
@@ -2706,7 +2498,6 @@ function create$11(context, [options]) {
2706
2498
  //#endregion
2707
2499
  //#region src/rules/no-unused-class-component-members.ts
2708
2500
  const RULE_NAME$10 = "no-unused-class-component-members";
2709
- const RULE_FEATURES$10 = [];
2710
2501
  const LIFECYCLE_METHODS = new Set([
2711
2502
  "componentDidCatch",
2712
2503
  "componentDidMount",
@@ -2733,10 +2524,7 @@ function isKeyLiteral$1(node, key) {
2733
2524
  var no_unused_class_component_members_default = createRule({
2734
2525
  meta: {
2735
2526
  type: "problem",
2736
- docs: {
2737
- description: "Warns unused class component methods and properties.",
2738
- [Symbol.for("rule_features")]: RULE_FEATURES$10
2739
- },
2527
+ docs: { description: "Warns unused class component methods and properties." },
2740
2528
  messages: { noUnusedClassComponentMembers: "Unused method or property '{{methodName}}'' of class '{{className}}'." },
2741
2529
  schema: []
2742
2530
  },
@@ -2826,14 +2614,10 @@ function create$10(context) {
2826
2614
  //#endregion
2827
2615
  //#region src/rules/no-unused-props.ts
2828
2616
  const RULE_NAME$9 = "no-unused-props";
2829
- const RULE_FEATURES$9 = ["TSC", "EXP"];
2830
2617
  var no_unused_props_default = createRule({
2831
2618
  meta: {
2832
2619
  type: "problem",
2833
- docs: {
2834
- description: "Warns component props that are defined but never used.",
2835
- [Symbol.for("rule_features")]: RULE_FEATURES$9
2836
- },
2620
+ docs: { description: "Warns component props that are defined but never used." },
2837
2621
  messages: { noUnusedProps: "Prop `{{name}}` is declared but never used" },
2838
2622
  schema: []
2839
2623
  },
@@ -2943,7 +2727,6 @@ function reportUnusedProp(context, services, prop) {
2943
2727
  //#endregion
2944
2728
  //#region src/rules/no-unused-state.ts
2945
2729
  const RULE_NAME$8 = "no-unused-state";
2946
- const RULE_FEATURES$8 = [];
2947
2730
  function isKeyLiteral(node, key) {
2948
2731
  return match(key).with({ type: AST_NODE_TYPES.Literal }, constTrue).with({
2949
2732
  type: AST_NODE_TYPES.TemplateLiteral,
@@ -2953,10 +2736,7 @@ function isKeyLiteral(node, key) {
2953
2736
  var no_unused_state_default = createRule({
2954
2737
  meta: {
2955
2738
  type: "problem",
2956
- docs: {
2957
- description: "Warns unused class component state.",
2958
- [Symbol.for("rule_features")]: RULE_FEATURES$8
2959
- },
2739
+ docs: { description: "Warns unused class component state." },
2960
2740
  messages: { noUnusedState: "Unused class component state in '{{className}}'" },
2961
2741
  schema: []
2962
2742
  },
@@ -3074,14 +2854,10 @@ function create$8(context) {
3074
2854
  //#endregion
3075
2855
  //#region src/rules/no-use-context.ts
3076
2856
  const RULE_NAME$7 = "no-use-context";
3077
- const RULE_FEATURES$7 = ["MOD"];
3078
2857
  var no_use_context_default = createRule({
3079
2858
  meta: {
3080
2859
  type: "problem",
3081
- docs: {
3082
- description: "Replaces usages of `useContext` with `use`.",
3083
- [Symbol.for("rule_features")]: RULE_FEATURES$7
3084
- },
2860
+ docs: { description: "Replaces usages of `useContext` with `use`." },
3085
2861
  fixable: "code",
3086
2862
  messages: { noUseContext: "In React 19, 'use' is preferred over 'useContext' because it is more flexible." },
3087
2863
  schema: []
@@ -3156,14 +2932,10 @@ function getCorrelativeTokens(context, node) {
3156
2932
  //#endregion
3157
2933
  //#region src/rules/no-useless-forward-ref.ts
3158
2934
  const RULE_NAME$6 = "no-useless-forward-ref";
3159
- const RULE_FEATURES$6 = [];
3160
2935
  var no_useless_forward_ref_default = createRule({
3161
2936
  meta: {
3162
2937
  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
- },
2938
+ docs: { description: "Disallow useless `forwardRef` calls on components that don't use `ref`s." },
3167
2939
  messages: { noUselessForwardRef: "A 'forwardRef' is used with this component but no 'ref' parameter is set." },
3168
2940
  schema: []
3169
2941
  },
@@ -3187,7 +2959,6 @@ function create$6(context) {
3187
2959
  //#endregion
3188
2960
  //#region src/rules/no-useless-fragment.ts
3189
2961
  const RULE_NAME$5 = "no-useless-fragment";
3190
- const RULE_FEATURES$5 = ["FIX", "CFG"];
3191
2962
  const defaultOptions$1 = [{
3192
2963
  allowEmptyFragment: false,
3193
2964
  allowExpressions: true
@@ -3210,10 +2981,7 @@ var no_useless_fragment_default = createRule({
3210
2981
  meta: {
3211
2982
  type: "problem",
3212
2983
  defaultOptions: [...defaultOptions$1],
3213
- docs: {
3214
- description: "Disallow useless fragment elements.",
3215
- [Symbol.for("rule_features")]: RULE_FEATURES$5
3216
- },
2984
+ docs: { description: "Disallow useless fragment elements." },
3217
2985
  fixable: "code",
3218
2986
  messages: { noUselessFragment: "A fragment {{reason}} is useless." },
3219
2987
  schema
@@ -3327,17 +3095,13 @@ function trimLikeReact(text) {
3327
3095
  //#endregion
3328
3096
  //#region src/rules/prefer-destructuring-assignment.ts
3329
3097
  const RULE_NAME$4 = "prefer-destructuring-assignment";
3330
- const RULE_FEATURES$4 = [];
3331
3098
  function isMemberExpressionWithObjectName(node) {
3332
3099
  return node.object.type === AST_NODE_TYPES.Identifier && "name" in node.object;
3333
3100
  }
3334
3101
  var prefer_destructuring_assignment_default = createRule({
3335
3102
  meta: {
3336
3103
  type: "problem",
3337
- docs: {
3338
- description: "Enforces destructuring assignment for component props and context.",
3339
- [Symbol.for("rule_features")]: RULE_FEATURES$4
3340
- },
3104
+ docs: { description: "Enforces destructuring assignment for component props and context." },
3341
3105
  messages: { preferDestructuringAssignment: "Use destructuring assignment for {{name}}." },
3342
3106
  schema: []
3343
3107
  },
@@ -3388,14 +3152,10 @@ function create$4(context) {
3388
3152
  //#endregion
3389
3153
  //#region src/rules/prefer-namespace-import.ts
3390
3154
  const RULE_NAME$3 = "prefer-namespace-import";
3391
- const RULE_FEATURES$3 = ["FIX"];
3392
3155
  var prefer_namespace_import_default = createRule({
3393
3156
  meta: {
3394
3157
  type: "problem",
3395
- docs: {
3396
- description: "Enforces React is imported via a namespace import.",
3397
- [Symbol.for("rule_features")]: RULE_FEATURES$3
3398
- },
3158
+ docs: { description: "Enforces React is imported via a namespace import." },
3399
3159
  fixable: "code",
3400
3160
  messages: { preferNamespaceImport: "Prefer importing React as 'import * as React from \"{{importSource}}\"';" },
3401
3161
  schema: []
@@ -3429,14 +3189,10 @@ function create$3(context) {
3429
3189
  //#endregion
3430
3190
  //#region src/rules/prefer-read-only-props.ts
3431
3191
  const RULE_NAME$2 = "prefer-read-only-props";
3432
- const RULE_FEATURES$2 = ["TSC", "EXP"];
3433
3192
  var prefer_read_only_props_default = createRule({
3434
3193
  meta: {
3435
3194
  type: "problem",
3436
- docs: {
3437
- description: "Enforces read-only props in components.",
3438
- [Symbol.for("rule_features")]: RULE_FEATURES$2
3439
- },
3195
+ docs: { description: "Enforces read-only props in components." },
3440
3196
  messages: { preferReadOnlyProps: "A function component's props should be read-only." },
3441
3197
  schema: []
3442
3198
  },
@@ -3489,7 +3245,6 @@ function isClassOrInterfaceReadonlyLoose(checker, type) {
3489
3245
  //#endregion
3490
3246
  //#region src/rules/prefer-use-state-lazy-initialization.ts
3491
3247
  const RULE_NAME$1 = "prefer-use-state-lazy-initialization";
3492
- const RULE_FEATURES$1 = ["EXP"];
3493
3248
  const ALLOW_LIST = [
3494
3249
  "Boolean",
3495
3250
  "String",
@@ -3498,10 +3253,7 @@ const ALLOW_LIST = [
3498
3253
  var prefer_use_state_lazy_initialization_default = createRule({
3499
3254
  meta: {
3500
3255
  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
- },
3256
+ docs: { description: "Enforces function calls made inside `useState` to be wrapped in an `initializer function`." },
3505
3257
  messages: { preferUseStateLazyInitialization: "To prevent re-computation, consider using lazy initial state for useState calls that involve function calls. Ex: 'useState(() => getValue())'." },
3506
3258
  schema: []
3507
3259
  },
@@ -3539,7 +3291,6 @@ function create$1(context) {
3539
3291
  //#endregion
3540
3292
  //#region src/rules-removed/no-forbidden-props.ts
3541
3293
  const RULE_NAME = "no-forbidden-props";
3542
- const RULE_FEATURES = ["CFG", "EXP"];
3543
3294
  const messageId = camelCase(RULE_NAME);
3544
3295
  const defaultOptions = [{ forbid: [{ prop: "/_/" }] }];
3545
3296
  var no_forbidden_props_default = createRule({
@@ -3554,10 +3305,7 @@ var no_forbidden_props_default = createRule({
3554
3305
  url: "https://eslint.org/docs/latest/rules/no-restricted-syntax"
3555
3306
  } }]
3556
3307
  },
3557
- docs: {
3558
- description: "Disallow certain props on components.",
3559
- [Symbol.for("rule_features")]: RULE_FEATURES
3560
- },
3308
+ docs: { description: "Disallow certain props on components." },
3561
3309
  messages: { [messageId]: "Prop \"{{name}}\" is forbidden." },
3562
3310
  schema: [{
3563
3311
  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.10",
3
+ "version": "2.4.0-next.12",
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-next.10",
50
- "@eslint-react/core": "2.4.0-next.10",
51
- "@eslint-react/shared": "2.4.0-next.10",
52
- "@eslint-react/eff": "2.4.0-next.10",
53
- "@eslint-react/var": "2.4.0-next.10"
49
+ "@eslint-react/ast": "2.4.0-next.12",
50
+ "@eslint-react/core": "2.4.0-next.12",
51
+ "@eslint-react/eff": "2.4.0-next.12",
52
+ "@eslint-react/shared": "2.4.0-next.12",
53
+ "@eslint-react/var": "2.4.0-next.12"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@types/react": "^19.2.7",