eslint-plugin-react-x 1.36.1 → 1.36.2-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +54 -160
  2. package/dist/index.mjs +56 -162
  3. package/package.json +7 -7
package/dist/index.js CHANGED
@@ -136,14 +136,12 @@ var settings3 = {
136
136
 
137
137
  // package.json
138
138
  var name4 = "eslint-plugin-react-x";
139
- var version = "1.36.1";
139
+ var version = "1.36.2-beta.1";
140
140
  var createRule = shared.createRuleForPlugin("x");
141
141
 
142
142
  // src/rules/avoid-shorthand-boolean.ts
143
143
  var RULE_NAME = "avoid-shorthand-boolean";
144
- var RULE_FEATURES = [
145
- "CHK"
146
- ];
144
+ var RULE_FEATURES = [];
147
145
  var avoid_shorthand_boolean_default = createRule({
148
146
  meta: {
149
147
  type: "problem",
@@ -180,9 +178,7 @@ function create(context) {
180
178
 
181
179
  // src/rules/avoid-shorthand-fragment.ts
182
180
  var RULE_NAME2 = "avoid-shorthand-fragment";
183
- var RULE_FEATURES2 = [
184
- "CHK"
185
- ];
181
+ var RULE_FEATURES2 = [];
186
182
  var avoid_shorthand_fragment_default = createRule({
187
183
  meta: {
188
184
  type: "problem",
@@ -210,9 +206,7 @@ function create2(context) {
210
206
  };
211
207
  }
212
208
  var RULE_NAME3 = "no-access-state-in-setstate";
213
- var RULE_FEATURES3 = [
214
- "CHK"
215
- ];
209
+ var RULE_FEATURES3 = [];
216
210
  function isKeyLiteral(node, key) {
217
211
  return tsPattern.match(key).with({ type: types.AST_NODE_TYPES.Literal }, eff.constTrue).with({ type: types.AST_NODE_TYPES.TemplateLiteral, expressions: [] }, eff.constTrue).with({ type: types.AST_NODE_TYPES.Identifier }, () => !node.computed).otherwise(eff.constFalse);
218
212
  }
@@ -324,9 +318,7 @@ function create3(context) {
324
318
  };
325
319
  }
326
320
  var RULE_NAME4 = "no-array-index-key";
327
- var RULE_FEATURES4 = [
328
- "CHK"
329
- ];
321
+ var RULE_FEATURES4 = [];
330
322
  var reactChildrenMethod = ["forEach", "map"];
331
323
  var iteratorFunctionIndexParamPosition = /* @__PURE__ */ new Map([
332
324
  ["every", 1],
@@ -498,10 +490,7 @@ function create4(context) {
498
490
  if (!("value" in prop)) {
499
491
  continue;
500
492
  }
501
- const descriptors = getReportDescriptors(prop.value);
502
- for (const descriptor of descriptors) {
503
- context.report(descriptor);
504
- }
493
+ getReportDescriptors(prop.value).map(shared.report(context));
505
494
  }
506
495
  },
507
496
  "CallExpression:exit"() {
@@ -517,17 +506,12 @@ function create4(context) {
517
506
  if (node.value?.type !== types.AST_NODE_TYPES.JSXExpressionContainer) {
518
507
  return;
519
508
  }
520
- const descriptors = getReportDescriptors(node.value.expression);
521
- for (const descriptor of descriptors) {
522
- context.report(descriptor);
523
- }
509
+ getReportDescriptors(node.value.expression).map(shared.report(context));
524
510
  }
525
511
  };
526
512
  }
527
513
  var RULE_NAME5 = "no-children-count";
528
- var RULE_FEATURES5 = [
529
- "CHK"
530
- ];
514
+ var RULE_FEATURES5 = [];
531
515
  var no_children_count_default = createRule({
532
516
  meta: {
533
517
  type: "problem",
@@ -557,9 +541,7 @@ function create5(context) {
557
541
  };
558
542
  }
559
543
  var RULE_NAME6 = "no-children-for-each";
560
- var RULE_FEATURES6 = [
561
- "CHK"
562
- ];
544
+ var RULE_FEATURES6 = [];
563
545
  var no_children_for_each_default = createRule({
564
546
  meta: {
565
547
  type: "problem",
@@ -589,9 +571,7 @@ function create6(context) {
589
571
  };
590
572
  }
591
573
  var RULE_NAME7 = "no-children-map";
592
- var RULE_FEATURES7 = [
593
- "CHK"
594
- ];
574
+ var RULE_FEATURES7 = [];
595
575
  var no_children_map_default = createRule({
596
576
  meta: {
597
577
  type: "problem",
@@ -620,9 +600,7 @@ var no_children_map_default = createRule({
620
600
  defaultOptions: []
621
601
  });
622
602
  var RULE_NAME8 = "no-children-only";
623
- var RULE_FEATURES8 = [
624
- "CHK"
625
- ];
603
+ var RULE_FEATURES8 = [];
626
604
  var no_children_only_default = createRule({
627
605
  meta: {
628
606
  type: "problem",
@@ -652,9 +630,7 @@ function create7(context) {
652
630
  };
653
631
  }
654
632
  var RULE_NAME9 = "no-children-prop";
655
- var RULE_FEATURES9 = [
656
- "CHK"
657
- ];
633
+ var RULE_FEATURES9 = [];
658
634
  var no_children_prop_default = createRule({
659
635
  meta: {
660
636
  type: "problem",
@@ -689,9 +665,7 @@ function create8(context) {
689
665
  };
690
666
  }
691
667
  var RULE_NAME10 = "no-children-to-array";
692
- var RULE_FEATURES10 = [
693
- "CHK"
694
- ];
668
+ var RULE_FEATURES10 = [];
695
669
  var no_children_to_array_default = createRule({
696
670
  meta: {
697
671
  type: "problem",
@@ -721,9 +695,7 @@ function create9(context) {
721
695
  };
722
696
  }
723
697
  var RULE_NAME11 = "no-class-component";
724
- var RULE_FEATURES11 = [
725
- "CHK"
726
- ];
698
+ var RULE_FEATURES11 = [];
727
699
  var no_class_component_default = createRule({
728
700
  meta: {
729
701
  type: "problem",
@@ -763,9 +735,7 @@ function create10(context) {
763
735
  };
764
736
  }
765
737
  var RULE_NAME12 = "no-clone-element";
766
- var RULE_FEATURES12 = [
767
- "CHK"
768
- ];
738
+ var RULE_FEATURES12 = [];
769
739
  var no_clone_element_default = createRule({
770
740
  meta: {
771
741
  type: "problem",
@@ -796,9 +766,7 @@ function create11(context) {
796
766
  };
797
767
  }
798
768
  var RULE_NAME13 = "no-comment-textnodes";
799
- var RULE_FEATURES13 = [
800
- "CHK"
801
- ];
769
+ var RULE_FEATURES13 = [];
802
770
  var no_comment_textnodes_default = createRule({
803
771
  meta: {
804
772
  type: "problem",
@@ -843,9 +811,7 @@ var no_comment_textnodes_default = createRule({
843
811
  defaultOptions: []
844
812
  });
845
813
  var RULE_NAME14 = "no-complex-conditional-rendering";
846
- var RULE_FEATURES14 = [
847
- "CHK"
848
- ];
814
+ var RULE_FEATURES14 = [];
849
815
  var no_complex_conditional_rendering_default = createRule({
850
816
  meta: {
851
817
  type: "problem",
@@ -889,7 +855,6 @@ function create12(context) {
889
855
  }
890
856
  var RULE_NAME15 = "no-component-will-mount";
891
857
  var RULE_FEATURES15 = [
892
- "CHK",
893
858
  "MOD"
894
859
  ];
895
860
  function isComponentWillMount(node) {
@@ -941,7 +906,6 @@ function create13(context) {
941
906
  }
942
907
  var RULE_NAME16 = "no-component-will-receive-props";
943
908
  var RULE_FEATURES16 = [
944
- "CHK",
945
909
  "MOD"
946
910
  ];
947
911
  function isComponentWillUpdate(node) {
@@ -993,7 +957,6 @@ function create14(context) {
993
957
  }
994
958
  var RULE_NAME17 = "no-component-will-update";
995
959
  var RULE_FEATURES17 = [
996
- "CHK",
997
960
  "MOD"
998
961
  ];
999
962
  function isComponentWillUpdate2(node) {
@@ -1045,7 +1008,6 @@ function create15(context) {
1045
1008
  }
1046
1009
  var RULE_NAME18 = "no-context-provider";
1047
1010
  var RULE_FEATURES18 = [
1048
- "CHK",
1049
1011
  "MOD"
1050
1012
  ];
1051
1013
  var no_context_provider_default = createRule({
@@ -1098,9 +1060,7 @@ function create16(context) {
1098
1060
  };
1099
1061
  }
1100
1062
  var RULE_NAME19 = "no-create-ref";
1101
- var RULE_FEATURES19 = [
1102
- "CHK"
1103
- ];
1063
+ var RULE_FEATURES19 = [];
1104
1064
  var no_create_ref_default = createRule({
1105
1065
  meta: {
1106
1066
  type: "problem",
@@ -1127,9 +1087,7 @@ function create17(context) {
1127
1087
  };
1128
1088
  }
1129
1089
  var RULE_NAME20 = "no-default-props";
1130
- var RULE_FEATURES20 = [
1131
- "CHK"
1132
- ];
1090
+ var RULE_FEATURES20 = [];
1133
1091
  var no_default_props_default = createRule({
1134
1092
  meta: {
1135
1093
  type: "problem",
@@ -1181,9 +1139,7 @@ function create18(context) {
1181
1139
  };
1182
1140
  }
1183
1141
  var RULE_NAME21 = "no-direct-mutation-state";
1184
- var RULE_FEATURES21 = [
1185
- "CHK"
1186
- ];
1142
+ var RULE_FEATURES21 = [];
1187
1143
  function isConstructorFunction(node) {
1188
1144
  return AST11__namespace.isOneOf([types.AST_NODE_TYPES.FunctionDeclaration, types.AST_NODE_TYPES.FunctionExpression])(node) && AST11__namespace.isMethodOrProperty(node.parent) && node.parent.key.type === types.AST_NODE_TYPES.Identifier && node.parent.key.name === "constructor";
1189
1145
  }
@@ -1225,9 +1181,7 @@ function create19(context) {
1225
1181
  };
1226
1182
  }
1227
1183
  var RULE_NAME22 = "no-duplicate-jsx-props";
1228
- var RULE_FEATURES22 = [
1229
- "CHK"
1230
- ];
1184
+ var RULE_FEATURES22 = [];
1231
1185
  var no_duplicate_jsx_props_default = createRule({
1232
1186
  meta: {
1233
1187
  type: "problem",
@@ -1269,9 +1223,7 @@ function create20(context) {
1269
1223
  };
1270
1224
  }
1271
1225
  var RULE_NAME23 = "no-duplicate-key";
1272
- var RULE_FEATURES23 = [
1273
- "CHK"
1274
- ];
1226
+ var RULE_FEATURES23 = [];
1275
1227
  var no_duplicate_key_default = createRule({
1276
1228
  meta: {
1277
1229
  type: "problem",
@@ -1354,7 +1306,6 @@ function create21(context) {
1354
1306
  }
1355
1307
  var RULE_NAME24 = "no-forward-ref";
1356
1308
  var RULE_FEATURES24 = [
1357
- "CHK",
1358
1309
  "MOD"
1359
1310
  ];
1360
1311
  var no_forward_ref_default = createRule({
@@ -1463,9 +1414,7 @@ function getComponentPropsFixes(context, fixer, node, typeArguments) {
1463
1414
  ];
1464
1415
  }
1465
1416
  var RULE_NAME25 = "no-implicit-key";
1466
- var RULE_FEATURES25 = [
1467
- "CHK"
1468
- ];
1417
+ var RULE_FEATURES25 = [];
1469
1418
  var no_implicit_key_default = createRule({
1470
1419
  meta: {
1471
1420
  type: "problem",
@@ -1498,7 +1447,6 @@ function create23(context) {
1498
1447
  }
1499
1448
  var RULE_NAME26 = "no-leaked-conditional-rendering";
1500
1449
  var RULE_FEATURES26 = [
1501
- "CHK",
1502
1450
  "TSC"
1503
1451
  ];
1504
1452
  var tsHelpers = {
@@ -1646,20 +1594,14 @@ function create24(context) {
1646
1594
  return getReportDescriptor(initExpression);
1647
1595
  }).otherwise(() => eff._);
1648
1596
  }
1649
- const visitorFunction = (node) => {
1650
- const descriptor = getReportDescriptor(node);
1651
- if (descriptor == null) return;
1652
- context.report(descriptor);
1653
- };
1597
+ const visitorFunction = eff.flow(getReportDescriptor, shared.report(context));
1654
1598
  return {
1655
1599
  "JSXExpressionContainer > ConditionalExpression": visitorFunction,
1656
1600
  "JSXExpressionContainer > LogicalExpression": visitorFunction
1657
1601
  };
1658
1602
  }
1659
1603
  var RULE_NAME27 = "no-missing-component-display-name";
1660
- var RULE_FEATURES27 = [
1661
- "CHK"
1662
- ];
1604
+ var RULE_FEATURES27 = [];
1663
1605
  var no_missing_component_display_name_default = createRule({
1664
1606
  meta: {
1665
1607
  type: "problem",
@@ -1712,9 +1654,7 @@ function create25(context) {
1712
1654
  };
1713
1655
  }
1714
1656
  var RULE_NAME28 = "no-missing-context-display-name";
1715
- var RULE_FEATURES28 = [
1716
- "CHK"
1717
- ];
1657
+ var RULE_FEATURES28 = [];
1718
1658
  var no_missing_context_display_name_default = createRule({
1719
1659
  meta: {
1720
1660
  type: "problem",
@@ -1770,9 +1710,7 @@ function create26(context) {
1770
1710
  };
1771
1711
  }
1772
1712
  var RULE_NAME29 = "no-missing-key";
1773
- var RULE_FEATURES29 = [
1774
- "CHK"
1775
- ];
1713
+ var RULE_FEATURES29 = [];
1776
1714
  var no_missing_key_default = createRule({
1777
1715
  meta: {
1778
1716
  type: "problem",
@@ -1836,13 +1774,9 @@ function create27(context) {
1836
1774
  function checkBlockStatement(node) {
1837
1775
  const descriptors = [];
1838
1776
  for (const statement of AST11__namespace.getNestedReturnStatements(node)) {
1839
- if (statement.argument == null) {
1840
- continue;
1841
- }
1777
+ if (statement.argument == null) continue;
1842
1778
  const descriptor = checkIteratorElement(statement.argument);
1843
- if (descriptor != null) {
1844
- descriptors.push(descriptor);
1845
- }
1779
+ if (descriptor != null) descriptors.push(descriptor);
1846
1780
  }
1847
1781
  return descriptors;
1848
1782
  }
@@ -1858,7 +1792,7 @@ function create27(context) {
1858
1792
  const initialScope = context.sourceCode.getScope(node);
1859
1793
  for (const element of elements) {
1860
1794
  if (!JSX8__namespace.hasAttribute("key", element.openingElement.attributes, initialScope)) {
1861
- context.report({
1795
+ shared.report(context)({
1862
1796
  messageId: "missingKey",
1863
1797
  node: element
1864
1798
  });
@@ -1870,24 +1804,21 @@ function create27(context) {
1870
1804
  if (state.isWithinChildrenToArray) {
1871
1805
  return;
1872
1806
  }
1873
- const isMapCallLike = AST11__namespace.isMapCallLoose(node);
1874
- if (!isMapCallLike && !isArrayFromCall(node)) {
1807
+ const isMapCall = AST11__namespace.isMapCallLoose(node);
1808
+ if (!isMapCall && !isArrayFromCall(node)) {
1875
1809
  return;
1876
1810
  }
1877
- const fn = node.arguments[isMapCallLike ? 0 : 1];
1878
- if (fn?.type !== types.AST_NODE_TYPES.ArrowFunctionExpression && fn?.type !== types.AST_NODE_TYPES.FunctionExpression) {
1811
+ const fn = node.arguments[isMapCall ? 0 : 1];
1812
+ if (!AST11__namespace.isFunction(fn)) {
1879
1813
  return;
1880
1814
  }
1881
1815
  if (fn.body.type === types.AST_NODE_TYPES.BlockStatement) {
1882
- for (const descriptor2 of checkBlockStatement(fn.body)) {
1883
- context.report(descriptor2);
1816
+ for (const descriptor of checkBlockStatement(fn.body)) {
1817
+ shared.report(context)(descriptor);
1884
1818
  }
1885
1819
  return;
1886
1820
  }
1887
- const descriptor = checkExpression(fn.body);
1888
- if (descriptor != null) {
1889
- context.report(descriptor);
1890
- }
1821
+ shared.report(context)(checkExpression(fn.body));
1891
1822
  },
1892
1823
  "CallExpression:exit"(node) {
1893
1824
  if (!core.isChildrenToArrayCall(context, node)) {
@@ -1900,7 +1831,7 @@ function create27(context) {
1900
1831
  return;
1901
1832
  }
1902
1833
  if (node.parent.type === types.AST_NODE_TYPES.ArrayExpression) {
1903
- context.report({
1834
+ shared.report(context)({
1904
1835
  messageId: "unexpectedFragmentSyntax",
1905
1836
  node
1906
1837
  });
@@ -1912,9 +1843,7 @@ function isArrayFromCall(node) {
1912
1843
  return node.type === types.AST_NODE_TYPES.CallExpression && node.callee.type === types.AST_NODE_TYPES.MemberExpression && node.callee.property.type === types.AST_NODE_TYPES.Identifier && node.callee.property.name === "from";
1913
1844
  }
1914
1845
  var RULE_NAME30 = "no-nested-component-definitions";
1915
- var RULE_FEATURES30 = [
1916
- "CHK"
1917
- ];
1846
+ var RULE_FEATURES30 = [];
1918
1847
  var no_nested_component_definitions_default = createRule({
1919
1848
  meta: {
1920
1849
  type: "problem",
@@ -2024,9 +1953,7 @@ function isInsideCreateElementProps(context, node) {
2024
1953
  return prop === call.arguments[1];
2025
1954
  }
2026
1955
  var RULE_NAME31 = "no-prop-types";
2027
- var RULE_FEATURES31 = [
2028
- "CHK"
2029
- ];
1956
+ var RULE_FEATURES31 = [];
2030
1957
  var no_prop_types_default = createRule({
2031
1958
  meta: {
2032
1959
  type: "problem",
@@ -2080,9 +2007,7 @@ function create29(context) {
2080
2007
  };
2081
2008
  }
2082
2009
  var RULE_NAME32 = "no-redundant-should-component-update";
2083
- var RULE_FEATURES32 = [
2084
- "CHK"
2085
- ];
2010
+ var RULE_FEATURES32 = [];
2086
2011
  function isShouldComponentUpdate(node) {
2087
2012
  return AST11__namespace.isMethodOrProperty(node) && node.key.type === types.AST_NODE_TYPES.Identifier && node.key.name === "shouldComponentUpdate";
2088
2013
  }
@@ -2130,9 +2055,7 @@ function create30(context) {
2130
2055
  };
2131
2056
  }
2132
2057
  var RULE_NAME33 = "no-set-state-in-component-did-mount";
2133
- var RULE_FEATURES33 = [
2134
- "CHK"
2135
- ];
2058
+ var RULE_FEATURES33 = [];
2136
2059
  function isComponentDidMount(node) {
2137
2060
  return AST11__namespace.isMethodOrProperty(node) && node.key.type === types.AST_NODE_TYPES.Identifier && node.key.name === "componentDidMount";
2138
2061
  }
@@ -2174,9 +2097,7 @@ function create31(context) {
2174
2097
  };
2175
2098
  }
2176
2099
  var RULE_NAME34 = "no-set-state-in-component-did-update";
2177
- var RULE_FEATURES34 = [
2178
- "CHK"
2179
- ];
2100
+ var RULE_FEATURES34 = [];
2180
2101
  function isComponentDidUpdate(node) {
2181
2102
  return AST11__namespace.isMethodOrProperty(node) && node.key.type === types.AST_NODE_TYPES.Identifier && node.key.name === "componentDidUpdate";
2182
2103
  }
@@ -2218,9 +2139,7 @@ function create32(context) {
2218
2139
  };
2219
2140
  }
2220
2141
  var RULE_NAME35 = "no-set-state-in-component-will-update";
2221
- var RULE_FEATURES35 = [
2222
- "CHK"
2223
- ];
2142
+ var RULE_FEATURES35 = [];
2224
2143
  function isComponentWillUpdate3(node) {
2225
2144
  return AST11__namespace.isMethodOrProperty(node) && node.key.type === types.AST_NODE_TYPES.Identifier && node.key.name === "componentWillUpdate";
2226
2145
  }
@@ -2262,9 +2181,7 @@ function create33(context) {
2262
2181
  };
2263
2182
  }
2264
2183
  var RULE_NAME36 = "no-string-refs";
2265
- var RULE_FEATURES36 = [
2266
- "CHK"
2267
- ];
2184
+ var RULE_FEATURES36 = [];
2268
2185
  function containsStringLiteral({ value }) {
2269
2186
  return value?.type === types.AST_NODE_TYPES.Literal && typeof value.value === "string";
2270
2187
  }
@@ -2309,9 +2226,7 @@ function create34(context) {
2309
2226
  };
2310
2227
  }
2311
2228
  var RULE_NAME37 = "no-unsafe-component-will-mount";
2312
- var RULE_FEATURES37 = [
2313
- "CHK"
2314
- ];
2229
+ var RULE_FEATURES37 = [];
2315
2230
  function isUnsafeComponentWillMount(node) {
2316
2231
  return AST11__namespace.isMethodOrProperty(node) && node.key.type === types.AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillMount";
2317
2232
  }
@@ -2353,9 +2268,7 @@ function create35(context) {
2353
2268
  };
2354
2269
  }
2355
2270
  var RULE_NAME38 = "no-unsafe-component-will-receive-props";
2356
- var RULE_FEATURES38 = [
2357
- "CHK"
2358
- ];
2271
+ var RULE_FEATURES38 = [];
2359
2272
  function isUnsafeComponentWillReceiveProps(node) {
2360
2273
  return AST11__namespace.isMethodOrProperty(node) && node.key.type === types.AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillReceiveProps";
2361
2274
  }
@@ -2399,9 +2312,7 @@ function create36(context) {
2399
2312
  };
2400
2313
  }
2401
2314
  var RULE_NAME39 = "no-unsafe-component-will-update";
2402
- var RULE_FEATURES39 = [
2403
- "CHK"
2404
- ];
2315
+ var RULE_FEATURES39 = [];
2405
2316
  function isUnsafeComponentWillUpdate(node) {
2406
2317
  return AST11__namespace.isMethodOrProperty(node) && node.key.type === types.AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillUpdate";
2407
2318
  }
@@ -2443,9 +2354,7 @@ function create37(context) {
2443
2354
  };
2444
2355
  }
2445
2356
  var RULE_NAME40 = "no-unstable-context-value";
2446
- var RULE_FEATURES40 = [
2447
- "CHK"
2448
- ];
2357
+ var RULE_FEATURES40 = [];
2449
2358
  var no_unstable_context_value_default = createRule({
2450
2359
  meta: {
2451
2360
  type: "problem",
@@ -2518,9 +2427,7 @@ function isContextName(name5, isReact18OrBelow) {
2518
2427
  return false;
2519
2428
  }
2520
2429
  var RULE_NAME41 = "no-unstable-default-props";
2521
- var RULE_FEATURES41 = [
2522
- "CHK"
2523
- ];
2430
+ var RULE_FEATURES41 = [];
2524
2431
  var no_unstable_default_props_default = createRule({
2525
2432
  meta: {
2526
2433
  type: "problem",
@@ -2594,9 +2501,7 @@ function create39(context) {
2594
2501
  };
2595
2502
  }
2596
2503
  var RULE_NAME42 = "no-unused-class-component-members";
2597
- var RULE_FEATURES42 = [
2598
- "CHK"
2599
- ];
2504
+ var RULE_FEATURES42 = [];
2600
2505
  var LIFECYCLE_METHODS = /* @__PURE__ */ new Set([
2601
2506
  "componentDidCatch",
2602
2507
  "componentDidMount",
@@ -2744,9 +2649,7 @@ function create40(context) {
2744
2649
  };
2745
2650
  }
2746
2651
  var RULE_NAME43 = "no-unused-state";
2747
- var RULE_FEATURES43 = [
2748
- "CHK"
2749
- ];
2652
+ var RULE_FEATURES43 = [];
2750
2653
  function isKeyLiteral3(node, key) {
2751
2654
  return tsPattern.match(key).with({ type: types.AST_NODE_TYPES.Literal }, eff.constTrue).with({ type: types.AST_NODE_TYPES.TemplateLiteral, expressions: [] }, eff.constTrue).with({ type: types.AST_NODE_TYPES.Identifier }, () => !node.computed).otherwise(eff.constFalse);
2752
2655
  }
@@ -2902,7 +2805,6 @@ function create41(context) {
2902
2805
  }
2903
2806
  var RULE_NAME44 = "no-use-context";
2904
2807
  var RULE_FEATURES44 = [
2905
- "CHK",
2906
2808
  "MOD"
2907
2809
  ];
2908
2810
  var no_use_context_default = createRule({
@@ -3001,9 +2903,7 @@ function getAssociatedTokens(context, node) {
3001
2903
  }
3002
2904
  }
3003
2905
  var RULE_NAME45 = "no-useless-forward-ref";
3004
- var RULE_FEATURES45 = [
3005
- "CHK"
3006
- ];
2906
+ var RULE_FEATURES45 = [];
3007
2907
  var no_useless_forward_ref_default = createRule({
3008
2908
  meta: {
3009
2909
  type: "problem",
@@ -3184,9 +3084,7 @@ function create44(context, [option]) {
3184
3084
  };
3185
3085
  }
3186
3086
  var RULE_NAME47 = "prefer-destructuring-assignment";
3187
- var RULE_FEATURES46 = [
3188
- "CHK"
3189
- ];
3087
+ var RULE_FEATURES46 = [];
3190
3088
  function isMemberExpressionWithObjectName(node) {
3191
3089
  return node.object.type === types.AST_NODE_TYPES.Identifier && "name" in node.object;
3192
3090
  }
@@ -3268,7 +3166,6 @@ function create45(context) {
3268
3166
  }
3269
3167
  var RULE_NAME48 = "prefer-react-namespace-import";
3270
3168
  var RULE_FEATURES47 = [
3271
- "CHK",
3272
3169
  "FIX"
3273
3170
  ];
3274
3171
  var prefer_react_namespace_import_default = createRule({
@@ -3323,7 +3220,6 @@ ${importStringPrefix} ${specifiers} from ${importSourceQuoted}${semiColon}`
3323
3220
  }
3324
3221
  var RULE_NAME49 = "prefer-read-only-props";
3325
3222
  var RULE_FEATURES48 = [
3326
- "CHK",
3327
3223
  "TSC"
3328
3224
  ];
3329
3225
  var prefer_read_only_props_default = createRule({
@@ -3365,7 +3261,6 @@ function create47(context) {
3365
3261
  }
3366
3262
  var RULE_NAME50 = "prefer-shorthand-boolean";
3367
3263
  var RULE_FEATURES49 = [
3368
- "CHK",
3369
3264
  "FIX"
3370
3265
  ];
3371
3266
  var prefer_shorthand_boolean_default = createRule({
@@ -3407,7 +3302,6 @@ function create48(context) {
3407
3302
  }
3408
3303
  var RULE_NAME51 = "prefer-shorthand-fragment";
3409
3304
  var RULE_FEATURES50 = [
3410
- "CHK",
3411
3305
  "FIX"
3412
3306
  ];
3413
3307
  var prefer_shorthand_fragment_default = createRule({
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { createRuleForPlugin, getSettingsFromContext, unsafeDecodeSettings, DEFAULT_ESLINT_REACT_SETTINGS } from '@eslint-react/shared';
1
+ import { createRuleForPlugin, report, getSettingsFromContext, unsafeDecodeSettings, DEFAULT_ESLINT_REACT_SETTINGS } from '@eslint-react/shared';
2
2
  import * as JSX8 from '@eslint-react/jsx';
3
3
  import * as AST11 from '@eslint-react/ast';
4
4
  import { isClassComponent, isThisSetState, isChildrenCount, isChildrenForEach, isChildrenMap, isChildrenOnly, isChildrenToArray, useComponentCollectorLegacy, isComponentDidCatch, isGetDerivedStateFromError, isCloneElementCall, isComponentNameLoose, isCreateRefCall, isAssignmentToThisState, isForwardRefCall, useComponentCollector, DEFAULT_COMPONENT_HINT, ERComponentFlag, getInstanceId, isInstanceIdEqual, DISPLAY_NAME_ASSIGNMENT_SELECTOR, isCreateContextCall, isChildrenToArrayCall, ERComponentHint, isDirectValueOfRenderPropertyLoose, isDeclaredInRenderPropLoose, isInsideRenderMethod, isCreateElementCall, isReactHookCall, isReactHookCallWithNameAlias, isGetDerivedStateFromProps, isInitializedFromReact } from '@eslint-react/core';
5
- import { _, getOrUpdate, constTrue, constFalse, identity } from '@eslint-react/eff';
5
+ import { _, flow, getOrUpdate, constTrue, constFalse, identity } from '@eslint-react/eff';
6
6
  import { AST_NODE_TYPES } from '@typescript-eslint/types';
7
7
  import { isMatching, match, P } from 'ts-pattern';
8
8
  import { compare } from 'compare-versions';
@@ -109,14 +109,12 @@ var settings3 = {
109
109
 
110
110
  // package.json
111
111
  var name4 = "eslint-plugin-react-x";
112
- var version = "1.36.1";
112
+ var version = "1.36.2-beta.1";
113
113
  var createRule = createRuleForPlugin("x");
114
114
 
115
115
  // src/rules/avoid-shorthand-boolean.ts
116
116
  var RULE_NAME = "avoid-shorthand-boolean";
117
- var RULE_FEATURES = [
118
- "CHK"
119
- ];
117
+ var RULE_FEATURES = [];
120
118
  var avoid_shorthand_boolean_default = createRule({
121
119
  meta: {
122
120
  type: "problem",
@@ -153,9 +151,7 @@ function create(context) {
153
151
 
154
152
  // src/rules/avoid-shorthand-fragment.ts
155
153
  var RULE_NAME2 = "avoid-shorthand-fragment";
156
- var RULE_FEATURES2 = [
157
- "CHK"
158
- ];
154
+ var RULE_FEATURES2 = [];
159
155
  var avoid_shorthand_fragment_default = createRule({
160
156
  meta: {
161
157
  type: "problem",
@@ -183,9 +179,7 @@ function create2(context) {
183
179
  };
184
180
  }
185
181
  var RULE_NAME3 = "no-access-state-in-setstate";
186
- var RULE_FEATURES3 = [
187
- "CHK"
188
- ];
182
+ var RULE_FEATURES3 = [];
189
183
  function isKeyLiteral(node, key) {
190
184
  return match(key).with({ type: AST_NODE_TYPES.Literal }, constTrue).with({ type: AST_NODE_TYPES.TemplateLiteral, expressions: [] }, constTrue).with({ type: AST_NODE_TYPES.Identifier }, () => !node.computed).otherwise(constFalse);
191
185
  }
@@ -297,9 +291,7 @@ function create3(context) {
297
291
  };
298
292
  }
299
293
  var RULE_NAME4 = "no-array-index-key";
300
- var RULE_FEATURES4 = [
301
- "CHK"
302
- ];
294
+ var RULE_FEATURES4 = [];
303
295
  var reactChildrenMethod = ["forEach", "map"];
304
296
  var iteratorFunctionIndexParamPosition = /* @__PURE__ */ new Map([
305
297
  ["every", 1],
@@ -471,10 +463,7 @@ function create4(context) {
471
463
  if (!("value" in prop)) {
472
464
  continue;
473
465
  }
474
- const descriptors = getReportDescriptors(prop.value);
475
- for (const descriptor of descriptors) {
476
- context.report(descriptor);
477
- }
466
+ getReportDescriptors(prop.value).map(report(context));
478
467
  }
479
468
  },
480
469
  "CallExpression:exit"() {
@@ -490,17 +479,12 @@ function create4(context) {
490
479
  if (node.value?.type !== AST_NODE_TYPES.JSXExpressionContainer) {
491
480
  return;
492
481
  }
493
- const descriptors = getReportDescriptors(node.value.expression);
494
- for (const descriptor of descriptors) {
495
- context.report(descriptor);
496
- }
482
+ getReportDescriptors(node.value.expression).map(report(context));
497
483
  }
498
484
  };
499
485
  }
500
486
  var RULE_NAME5 = "no-children-count";
501
- var RULE_FEATURES5 = [
502
- "CHK"
503
- ];
487
+ var RULE_FEATURES5 = [];
504
488
  var no_children_count_default = createRule({
505
489
  meta: {
506
490
  type: "problem",
@@ -530,9 +514,7 @@ function create5(context) {
530
514
  };
531
515
  }
532
516
  var RULE_NAME6 = "no-children-for-each";
533
- var RULE_FEATURES6 = [
534
- "CHK"
535
- ];
517
+ var RULE_FEATURES6 = [];
536
518
  var no_children_for_each_default = createRule({
537
519
  meta: {
538
520
  type: "problem",
@@ -562,9 +544,7 @@ function create6(context) {
562
544
  };
563
545
  }
564
546
  var RULE_NAME7 = "no-children-map";
565
- var RULE_FEATURES7 = [
566
- "CHK"
567
- ];
547
+ var RULE_FEATURES7 = [];
568
548
  var no_children_map_default = createRule({
569
549
  meta: {
570
550
  type: "problem",
@@ -593,9 +573,7 @@ var no_children_map_default = createRule({
593
573
  defaultOptions: []
594
574
  });
595
575
  var RULE_NAME8 = "no-children-only";
596
- var RULE_FEATURES8 = [
597
- "CHK"
598
- ];
576
+ var RULE_FEATURES8 = [];
599
577
  var no_children_only_default = createRule({
600
578
  meta: {
601
579
  type: "problem",
@@ -625,9 +603,7 @@ function create7(context) {
625
603
  };
626
604
  }
627
605
  var RULE_NAME9 = "no-children-prop";
628
- var RULE_FEATURES9 = [
629
- "CHK"
630
- ];
606
+ var RULE_FEATURES9 = [];
631
607
  var no_children_prop_default = createRule({
632
608
  meta: {
633
609
  type: "problem",
@@ -662,9 +638,7 @@ function create8(context) {
662
638
  };
663
639
  }
664
640
  var RULE_NAME10 = "no-children-to-array";
665
- var RULE_FEATURES10 = [
666
- "CHK"
667
- ];
641
+ var RULE_FEATURES10 = [];
668
642
  var no_children_to_array_default = createRule({
669
643
  meta: {
670
644
  type: "problem",
@@ -694,9 +668,7 @@ function create9(context) {
694
668
  };
695
669
  }
696
670
  var RULE_NAME11 = "no-class-component";
697
- var RULE_FEATURES11 = [
698
- "CHK"
699
- ];
671
+ var RULE_FEATURES11 = [];
700
672
  var no_class_component_default = createRule({
701
673
  meta: {
702
674
  type: "problem",
@@ -736,9 +708,7 @@ function create10(context) {
736
708
  };
737
709
  }
738
710
  var RULE_NAME12 = "no-clone-element";
739
- var RULE_FEATURES12 = [
740
- "CHK"
741
- ];
711
+ var RULE_FEATURES12 = [];
742
712
  var no_clone_element_default = createRule({
743
713
  meta: {
744
714
  type: "problem",
@@ -769,9 +739,7 @@ function create11(context) {
769
739
  };
770
740
  }
771
741
  var RULE_NAME13 = "no-comment-textnodes";
772
- var RULE_FEATURES13 = [
773
- "CHK"
774
- ];
742
+ var RULE_FEATURES13 = [];
775
743
  var no_comment_textnodes_default = createRule({
776
744
  meta: {
777
745
  type: "problem",
@@ -816,9 +784,7 @@ var no_comment_textnodes_default = createRule({
816
784
  defaultOptions: []
817
785
  });
818
786
  var RULE_NAME14 = "no-complex-conditional-rendering";
819
- var RULE_FEATURES14 = [
820
- "CHK"
821
- ];
787
+ var RULE_FEATURES14 = [];
822
788
  var no_complex_conditional_rendering_default = createRule({
823
789
  meta: {
824
790
  type: "problem",
@@ -862,7 +828,6 @@ function create12(context) {
862
828
  }
863
829
  var RULE_NAME15 = "no-component-will-mount";
864
830
  var RULE_FEATURES15 = [
865
- "CHK",
866
831
  "MOD"
867
832
  ];
868
833
  function isComponentWillMount(node) {
@@ -914,7 +879,6 @@ function create13(context) {
914
879
  }
915
880
  var RULE_NAME16 = "no-component-will-receive-props";
916
881
  var RULE_FEATURES16 = [
917
- "CHK",
918
882
  "MOD"
919
883
  ];
920
884
  function isComponentWillUpdate(node) {
@@ -966,7 +930,6 @@ function create14(context) {
966
930
  }
967
931
  var RULE_NAME17 = "no-component-will-update";
968
932
  var RULE_FEATURES17 = [
969
- "CHK",
970
933
  "MOD"
971
934
  ];
972
935
  function isComponentWillUpdate2(node) {
@@ -1018,7 +981,6 @@ function create15(context) {
1018
981
  }
1019
982
  var RULE_NAME18 = "no-context-provider";
1020
983
  var RULE_FEATURES18 = [
1021
- "CHK",
1022
984
  "MOD"
1023
985
  ];
1024
986
  var no_context_provider_default = createRule({
@@ -1071,9 +1033,7 @@ function create16(context) {
1071
1033
  };
1072
1034
  }
1073
1035
  var RULE_NAME19 = "no-create-ref";
1074
- var RULE_FEATURES19 = [
1075
- "CHK"
1076
- ];
1036
+ var RULE_FEATURES19 = [];
1077
1037
  var no_create_ref_default = createRule({
1078
1038
  meta: {
1079
1039
  type: "problem",
@@ -1100,9 +1060,7 @@ function create17(context) {
1100
1060
  };
1101
1061
  }
1102
1062
  var RULE_NAME20 = "no-default-props";
1103
- var RULE_FEATURES20 = [
1104
- "CHK"
1105
- ];
1063
+ var RULE_FEATURES20 = [];
1106
1064
  var no_default_props_default = createRule({
1107
1065
  meta: {
1108
1066
  type: "problem",
@@ -1154,9 +1112,7 @@ function create18(context) {
1154
1112
  };
1155
1113
  }
1156
1114
  var RULE_NAME21 = "no-direct-mutation-state";
1157
- var RULE_FEATURES21 = [
1158
- "CHK"
1159
- ];
1115
+ var RULE_FEATURES21 = [];
1160
1116
  function isConstructorFunction(node) {
1161
1117
  return AST11.isOneOf([AST_NODE_TYPES.FunctionDeclaration, AST_NODE_TYPES.FunctionExpression])(node) && AST11.isMethodOrProperty(node.parent) && node.parent.key.type === AST_NODE_TYPES.Identifier && node.parent.key.name === "constructor";
1162
1118
  }
@@ -1198,9 +1154,7 @@ function create19(context) {
1198
1154
  };
1199
1155
  }
1200
1156
  var RULE_NAME22 = "no-duplicate-jsx-props";
1201
- var RULE_FEATURES22 = [
1202
- "CHK"
1203
- ];
1157
+ var RULE_FEATURES22 = [];
1204
1158
  var no_duplicate_jsx_props_default = createRule({
1205
1159
  meta: {
1206
1160
  type: "problem",
@@ -1242,9 +1196,7 @@ function create20(context) {
1242
1196
  };
1243
1197
  }
1244
1198
  var RULE_NAME23 = "no-duplicate-key";
1245
- var RULE_FEATURES23 = [
1246
- "CHK"
1247
- ];
1199
+ var RULE_FEATURES23 = [];
1248
1200
  var no_duplicate_key_default = createRule({
1249
1201
  meta: {
1250
1202
  type: "problem",
@@ -1327,7 +1279,6 @@ function create21(context) {
1327
1279
  }
1328
1280
  var RULE_NAME24 = "no-forward-ref";
1329
1281
  var RULE_FEATURES24 = [
1330
- "CHK",
1331
1282
  "MOD"
1332
1283
  ];
1333
1284
  var no_forward_ref_default = createRule({
@@ -1436,9 +1387,7 @@ function getComponentPropsFixes(context, fixer, node, typeArguments) {
1436
1387
  ];
1437
1388
  }
1438
1389
  var RULE_NAME25 = "no-implicit-key";
1439
- var RULE_FEATURES25 = [
1440
- "CHK"
1441
- ];
1390
+ var RULE_FEATURES25 = [];
1442
1391
  var no_implicit_key_default = createRule({
1443
1392
  meta: {
1444
1393
  type: "problem",
@@ -1471,7 +1420,6 @@ function create23(context) {
1471
1420
  }
1472
1421
  var RULE_NAME26 = "no-leaked-conditional-rendering";
1473
1422
  var RULE_FEATURES26 = [
1474
- "CHK",
1475
1423
  "TSC"
1476
1424
  ];
1477
1425
  var tsHelpers = {
@@ -1619,20 +1567,14 @@ function create24(context) {
1619
1567
  return getReportDescriptor(initExpression);
1620
1568
  }).otherwise(() => _);
1621
1569
  }
1622
- const visitorFunction = (node) => {
1623
- const descriptor = getReportDescriptor(node);
1624
- if (descriptor == null) return;
1625
- context.report(descriptor);
1626
- };
1570
+ const visitorFunction = flow(getReportDescriptor, report(context));
1627
1571
  return {
1628
1572
  "JSXExpressionContainer > ConditionalExpression": visitorFunction,
1629
1573
  "JSXExpressionContainer > LogicalExpression": visitorFunction
1630
1574
  };
1631
1575
  }
1632
1576
  var RULE_NAME27 = "no-missing-component-display-name";
1633
- var RULE_FEATURES27 = [
1634
- "CHK"
1635
- ];
1577
+ var RULE_FEATURES27 = [];
1636
1578
  var no_missing_component_display_name_default = createRule({
1637
1579
  meta: {
1638
1580
  type: "problem",
@@ -1685,9 +1627,7 @@ function create25(context) {
1685
1627
  };
1686
1628
  }
1687
1629
  var RULE_NAME28 = "no-missing-context-display-name";
1688
- var RULE_FEATURES28 = [
1689
- "CHK"
1690
- ];
1630
+ var RULE_FEATURES28 = [];
1691
1631
  var no_missing_context_display_name_default = createRule({
1692
1632
  meta: {
1693
1633
  type: "problem",
@@ -1743,9 +1683,7 @@ function create26(context) {
1743
1683
  };
1744
1684
  }
1745
1685
  var RULE_NAME29 = "no-missing-key";
1746
- var RULE_FEATURES29 = [
1747
- "CHK"
1748
- ];
1686
+ var RULE_FEATURES29 = [];
1749
1687
  var no_missing_key_default = createRule({
1750
1688
  meta: {
1751
1689
  type: "problem",
@@ -1809,13 +1747,9 @@ function create27(context) {
1809
1747
  function checkBlockStatement(node) {
1810
1748
  const descriptors = [];
1811
1749
  for (const statement of AST11.getNestedReturnStatements(node)) {
1812
- if (statement.argument == null) {
1813
- continue;
1814
- }
1750
+ if (statement.argument == null) continue;
1815
1751
  const descriptor = checkIteratorElement(statement.argument);
1816
- if (descriptor != null) {
1817
- descriptors.push(descriptor);
1818
- }
1752
+ if (descriptor != null) descriptors.push(descriptor);
1819
1753
  }
1820
1754
  return descriptors;
1821
1755
  }
@@ -1831,7 +1765,7 @@ function create27(context) {
1831
1765
  const initialScope = context.sourceCode.getScope(node);
1832
1766
  for (const element of elements) {
1833
1767
  if (!JSX8.hasAttribute("key", element.openingElement.attributes, initialScope)) {
1834
- context.report({
1768
+ report(context)({
1835
1769
  messageId: "missingKey",
1836
1770
  node: element
1837
1771
  });
@@ -1843,24 +1777,21 @@ function create27(context) {
1843
1777
  if (state.isWithinChildrenToArray) {
1844
1778
  return;
1845
1779
  }
1846
- const isMapCallLike = AST11.isMapCallLoose(node);
1847
- if (!isMapCallLike && !isArrayFromCall(node)) {
1780
+ const isMapCall = AST11.isMapCallLoose(node);
1781
+ if (!isMapCall && !isArrayFromCall(node)) {
1848
1782
  return;
1849
1783
  }
1850
- const fn = node.arguments[isMapCallLike ? 0 : 1];
1851
- if (fn?.type !== AST_NODE_TYPES.ArrowFunctionExpression && fn?.type !== AST_NODE_TYPES.FunctionExpression) {
1784
+ const fn = node.arguments[isMapCall ? 0 : 1];
1785
+ if (!AST11.isFunction(fn)) {
1852
1786
  return;
1853
1787
  }
1854
1788
  if (fn.body.type === AST_NODE_TYPES.BlockStatement) {
1855
- for (const descriptor2 of checkBlockStatement(fn.body)) {
1856
- context.report(descriptor2);
1789
+ for (const descriptor of checkBlockStatement(fn.body)) {
1790
+ report(context)(descriptor);
1857
1791
  }
1858
1792
  return;
1859
1793
  }
1860
- const descriptor = checkExpression(fn.body);
1861
- if (descriptor != null) {
1862
- context.report(descriptor);
1863
- }
1794
+ report(context)(checkExpression(fn.body));
1864
1795
  },
1865
1796
  "CallExpression:exit"(node) {
1866
1797
  if (!isChildrenToArrayCall(context, node)) {
@@ -1873,7 +1804,7 @@ function create27(context) {
1873
1804
  return;
1874
1805
  }
1875
1806
  if (node.parent.type === AST_NODE_TYPES.ArrayExpression) {
1876
- context.report({
1807
+ report(context)({
1877
1808
  messageId: "unexpectedFragmentSyntax",
1878
1809
  node
1879
1810
  });
@@ -1885,9 +1816,7 @@ function isArrayFromCall(node) {
1885
1816
  return node.type === AST_NODE_TYPES.CallExpression && node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === "from";
1886
1817
  }
1887
1818
  var RULE_NAME30 = "no-nested-component-definitions";
1888
- var RULE_FEATURES30 = [
1889
- "CHK"
1890
- ];
1819
+ var RULE_FEATURES30 = [];
1891
1820
  var no_nested_component_definitions_default = createRule({
1892
1821
  meta: {
1893
1822
  type: "problem",
@@ -1997,9 +1926,7 @@ function isInsideCreateElementProps(context, node) {
1997
1926
  return prop === call.arguments[1];
1998
1927
  }
1999
1928
  var RULE_NAME31 = "no-prop-types";
2000
- var RULE_FEATURES31 = [
2001
- "CHK"
2002
- ];
1929
+ var RULE_FEATURES31 = [];
2003
1930
  var no_prop_types_default = createRule({
2004
1931
  meta: {
2005
1932
  type: "problem",
@@ -2053,9 +1980,7 @@ function create29(context) {
2053
1980
  };
2054
1981
  }
2055
1982
  var RULE_NAME32 = "no-redundant-should-component-update";
2056
- var RULE_FEATURES32 = [
2057
- "CHK"
2058
- ];
1983
+ var RULE_FEATURES32 = [];
2059
1984
  function isShouldComponentUpdate(node) {
2060
1985
  return AST11.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "shouldComponentUpdate";
2061
1986
  }
@@ -2103,9 +2028,7 @@ function create30(context) {
2103
2028
  };
2104
2029
  }
2105
2030
  var RULE_NAME33 = "no-set-state-in-component-did-mount";
2106
- var RULE_FEATURES33 = [
2107
- "CHK"
2108
- ];
2031
+ var RULE_FEATURES33 = [];
2109
2032
  function isComponentDidMount(node) {
2110
2033
  return AST11.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "componentDidMount";
2111
2034
  }
@@ -2147,9 +2070,7 @@ function create31(context) {
2147
2070
  };
2148
2071
  }
2149
2072
  var RULE_NAME34 = "no-set-state-in-component-did-update";
2150
- var RULE_FEATURES34 = [
2151
- "CHK"
2152
- ];
2073
+ var RULE_FEATURES34 = [];
2153
2074
  function isComponentDidUpdate(node) {
2154
2075
  return AST11.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "componentDidUpdate";
2155
2076
  }
@@ -2191,9 +2112,7 @@ function create32(context) {
2191
2112
  };
2192
2113
  }
2193
2114
  var RULE_NAME35 = "no-set-state-in-component-will-update";
2194
- var RULE_FEATURES35 = [
2195
- "CHK"
2196
- ];
2115
+ var RULE_FEATURES35 = [];
2197
2116
  function isComponentWillUpdate3(node) {
2198
2117
  return AST11.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "componentWillUpdate";
2199
2118
  }
@@ -2235,9 +2154,7 @@ function create33(context) {
2235
2154
  };
2236
2155
  }
2237
2156
  var RULE_NAME36 = "no-string-refs";
2238
- var RULE_FEATURES36 = [
2239
- "CHK"
2240
- ];
2157
+ var RULE_FEATURES36 = [];
2241
2158
  function containsStringLiteral({ value }) {
2242
2159
  return value?.type === AST_NODE_TYPES.Literal && typeof value.value === "string";
2243
2160
  }
@@ -2282,9 +2199,7 @@ function create34(context) {
2282
2199
  };
2283
2200
  }
2284
2201
  var RULE_NAME37 = "no-unsafe-component-will-mount";
2285
- var RULE_FEATURES37 = [
2286
- "CHK"
2287
- ];
2202
+ var RULE_FEATURES37 = [];
2288
2203
  function isUnsafeComponentWillMount(node) {
2289
2204
  return AST11.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillMount";
2290
2205
  }
@@ -2326,9 +2241,7 @@ function create35(context) {
2326
2241
  };
2327
2242
  }
2328
2243
  var RULE_NAME38 = "no-unsafe-component-will-receive-props";
2329
- var RULE_FEATURES38 = [
2330
- "CHK"
2331
- ];
2244
+ var RULE_FEATURES38 = [];
2332
2245
  function isUnsafeComponentWillReceiveProps(node) {
2333
2246
  return AST11.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillReceiveProps";
2334
2247
  }
@@ -2372,9 +2285,7 @@ function create36(context) {
2372
2285
  };
2373
2286
  }
2374
2287
  var RULE_NAME39 = "no-unsafe-component-will-update";
2375
- var RULE_FEATURES39 = [
2376
- "CHK"
2377
- ];
2288
+ var RULE_FEATURES39 = [];
2378
2289
  function isUnsafeComponentWillUpdate(node) {
2379
2290
  return AST11.isMethodOrProperty(node) && node.key.type === AST_NODE_TYPES.Identifier && node.key.name === "UNSAFE_componentWillUpdate";
2380
2291
  }
@@ -2416,9 +2327,7 @@ function create37(context) {
2416
2327
  };
2417
2328
  }
2418
2329
  var RULE_NAME40 = "no-unstable-context-value";
2419
- var RULE_FEATURES40 = [
2420
- "CHK"
2421
- ];
2330
+ var RULE_FEATURES40 = [];
2422
2331
  var no_unstable_context_value_default = createRule({
2423
2332
  meta: {
2424
2333
  type: "problem",
@@ -2491,9 +2400,7 @@ function isContextName(name5, isReact18OrBelow) {
2491
2400
  return false;
2492
2401
  }
2493
2402
  var RULE_NAME41 = "no-unstable-default-props";
2494
- var RULE_FEATURES41 = [
2495
- "CHK"
2496
- ];
2403
+ var RULE_FEATURES41 = [];
2497
2404
  var no_unstable_default_props_default = createRule({
2498
2405
  meta: {
2499
2406
  type: "problem",
@@ -2567,9 +2474,7 @@ function create39(context) {
2567
2474
  };
2568
2475
  }
2569
2476
  var RULE_NAME42 = "no-unused-class-component-members";
2570
- var RULE_FEATURES42 = [
2571
- "CHK"
2572
- ];
2477
+ var RULE_FEATURES42 = [];
2573
2478
  var LIFECYCLE_METHODS = /* @__PURE__ */ new Set([
2574
2479
  "componentDidCatch",
2575
2480
  "componentDidMount",
@@ -2717,9 +2622,7 @@ function create40(context) {
2717
2622
  };
2718
2623
  }
2719
2624
  var RULE_NAME43 = "no-unused-state";
2720
- var RULE_FEATURES43 = [
2721
- "CHK"
2722
- ];
2625
+ var RULE_FEATURES43 = [];
2723
2626
  function isKeyLiteral3(node, key) {
2724
2627
  return match(key).with({ type: AST_NODE_TYPES.Literal }, constTrue).with({ type: AST_NODE_TYPES.TemplateLiteral, expressions: [] }, constTrue).with({ type: AST_NODE_TYPES.Identifier }, () => !node.computed).otherwise(constFalse);
2725
2628
  }
@@ -2875,7 +2778,6 @@ function create41(context) {
2875
2778
  }
2876
2779
  var RULE_NAME44 = "no-use-context";
2877
2780
  var RULE_FEATURES44 = [
2878
- "CHK",
2879
2781
  "MOD"
2880
2782
  ];
2881
2783
  var no_use_context_default = createRule({
@@ -2974,9 +2876,7 @@ function getAssociatedTokens(context, node) {
2974
2876
  }
2975
2877
  }
2976
2878
  var RULE_NAME45 = "no-useless-forward-ref";
2977
- var RULE_FEATURES45 = [
2978
- "CHK"
2979
- ];
2879
+ var RULE_FEATURES45 = [];
2980
2880
  var no_useless_forward_ref_default = createRule({
2981
2881
  meta: {
2982
2882
  type: "problem",
@@ -3157,9 +3057,7 @@ function create44(context, [option]) {
3157
3057
  };
3158
3058
  }
3159
3059
  var RULE_NAME47 = "prefer-destructuring-assignment";
3160
- var RULE_FEATURES46 = [
3161
- "CHK"
3162
- ];
3060
+ var RULE_FEATURES46 = [];
3163
3061
  function isMemberExpressionWithObjectName(node) {
3164
3062
  return node.object.type === AST_NODE_TYPES.Identifier && "name" in node.object;
3165
3063
  }
@@ -3241,7 +3139,6 @@ function create45(context) {
3241
3139
  }
3242
3140
  var RULE_NAME48 = "prefer-react-namespace-import";
3243
3141
  var RULE_FEATURES47 = [
3244
- "CHK",
3245
3142
  "FIX"
3246
3143
  ];
3247
3144
  var prefer_react_namespace_import_default = createRule({
@@ -3296,7 +3193,6 @@ ${importStringPrefix} ${specifiers} from ${importSourceQuoted}${semiColon}`
3296
3193
  }
3297
3194
  var RULE_NAME49 = "prefer-read-only-props";
3298
3195
  var RULE_FEATURES48 = [
3299
- "CHK",
3300
3196
  "TSC"
3301
3197
  ];
3302
3198
  var prefer_read_only_props_default = createRule({
@@ -3338,7 +3234,6 @@ function create47(context) {
3338
3234
  }
3339
3235
  var RULE_NAME50 = "prefer-shorthand-boolean";
3340
3236
  var RULE_FEATURES49 = [
3341
- "CHK",
3342
3237
  "FIX"
3343
3238
  ];
3344
3239
  var prefer_shorthand_boolean_default = createRule({
@@ -3380,7 +3275,6 @@ function create48(context) {
3380
3275
  }
3381
3276
  var RULE_NAME51 = "prefer-shorthand-fragment";
3382
3277
  var RULE_FEATURES50 = [
3383
- "CHK",
3384
3278
  "FIX"
3385
3279
  ];
3386
3280
  var prefer_shorthand_fragment_default = createRule({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "1.36.1",
3
+ "version": "1.36.2-beta.1",
4
4
  "description": "A set of composable linting rules for libraries and frameworks that use React as a UI runtime.",
5
5
  "keywords": [
6
6
  "react",
@@ -49,12 +49,12 @@
49
49
  "compare-versions": "^6.1.1",
50
50
  "string-ts": "^2.2.1",
51
51
  "ts-pattern": "^5.6.2",
52
- "@eslint-react/ast": "1.36.1",
53
- "@eslint-react/core": "1.36.1",
54
- "@eslint-react/eff": "1.36.1",
55
- "@eslint-react/jsx": "1.36.1",
56
- "@eslint-react/shared": "1.36.1",
57
- "@eslint-react/var": "1.36.1"
52
+ "@eslint-react/ast": "1.36.2-beta.1",
53
+ "@eslint-react/core": "1.36.2-beta.1",
54
+ "@eslint-react/eff": "1.36.2-beta.1",
55
+ "@eslint-react/jsx": "1.36.2-beta.1",
56
+ "@eslint-react/shared": "1.36.2-beta.1",
57
+ "@eslint-react/var": "1.36.2-beta.1"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/react": "^19.0.11",