eslint-plugin-react-x 2.1.1-next.3 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3,19 +3,55 @@ import * as _eslint_react_kit0 from "@eslint-react/kit";
3
3
  //#region src/index.d.ts
4
4
  declare const _default: {
5
5
  configs: {
6
+ /**
7
+ * Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects
8
+ */
6
9
  recommended: {
7
10
  plugins: {};
8
11
  name?: string;
9
12
  rules?: Record<string, _eslint_react_kit0.RuleConfig>;
10
13
  settings?: _eslint_react_kit0.SettingsConfig;
11
14
  };
15
+ /**
16
+ * Same as the `recommended` preset but disables rules that can be enforced by TypeScript
17
+ */
18
+ "recommended-typescript": {
19
+ plugins: {};
20
+ name?: string;
21
+ rules?: Record<string, _eslint_react_kit0.RuleConfig>;
22
+ settings?: _eslint_react_kit0.SettingsConfig;
23
+ };
24
+ /**
25
+ * Same as the `recommended-typescript` preset but enables additional rules that require type information
26
+ */
12
27
  "recommended-type-checked": {
13
28
  plugins: {};
14
29
  name?: string;
15
30
  rules?: Record<string, _eslint_react_kit0.RuleConfig>;
16
31
  settings?: _eslint_react_kit0.SettingsConfig;
17
32
  };
18
- "recommended-typescript": {
33
+ /**
34
+ * More strict version of the `recommended` preset
35
+ */
36
+ strict: {
37
+ plugins: {};
38
+ name?: string;
39
+ rules?: Record<string, _eslint_react_kit0.RuleConfig>;
40
+ settings?: _eslint_react_kit0.SettingsConfig;
41
+ };
42
+ /**
43
+ * Same as the `strict` preset but enables additional rules that require type information
44
+ */
45
+ "strict-typescript": {
46
+ plugins: {};
47
+ name?: string;
48
+ rules?: Record<string, _eslint_react_kit0.RuleConfig>;
49
+ settings?: _eslint_react_kit0.SettingsConfig;
50
+ };
51
+ /**
52
+ * Same as the `strict-typescript` preset but enables additional rules that require type information
53
+ */
54
+ "strict-type-checked": {
19
55
  plugins: {};
20
56
  name?: string;
21
57
  rules?: Record<string, _eslint_react_kit0.RuleConfig>;
package/dist/index.js CHANGED
@@ -19,8 +19,8 @@ import { getTypeImmutability, isImmutable, isReadonlyDeep, isReadonlyShallow, is
19
19
  var __defProp = Object.defineProperty;
20
20
  var __export = (all) => {
21
21
  let target = {};
22
- for (var name$4 in all) __defProp(target, name$4, {
23
- get: all[name$4],
22
+ for (var name$7 in all) __defProp(target, name$7, {
23
+ get: all[name$7],
24
24
  enumerable: true
25
25
  });
26
26
  return target;
@@ -28,8 +28,8 @@ var __export = (all) => {
28
28
 
29
29
  //#endregion
30
30
  //#region package.json
31
- var name$3 = "eslint-plugin-react-x";
32
- var version = "2.1.1-next.3";
31
+ var name$6 = "eslint-plugin-react-x";
32
+ var version = "2.1.1";
33
33
 
34
34
  //#endregion
35
35
  //#region src/utils/create-rule.ts
@@ -209,10 +209,10 @@ function create$59(context) {
209
209
  const props = [];
210
210
  for (const attr of node.attributes) {
211
211
  if (attr.type === AST_NODE_TYPES.JSXSpreadAttribute) continue;
212
- const name$4 = attr.name.name;
213
- if (typeof name$4 !== "string") continue;
214
- if (!props.includes(name$4)) {
215
- props.push(name$4);
212
+ const name$7 = attr.name.name;
213
+ if (typeof name$7 !== "string") continue;
214
+ if (!props.includes(name$7)) {
215
+ props.push(name$7);
216
216
  continue;
217
217
  }
218
218
  context.report({
@@ -278,17 +278,17 @@ var jsx_no_undef_default = createRule({
278
278
  });
279
279
  function create$57(context) {
280
280
  return { JSXOpeningElement(node) {
281
- const name$4 = match(node.name).with({ type: AST_NODE_TYPES.JSXIdentifier }, (n) => n.name).with({
281
+ const name$7 = match(node.name).with({ type: AST_NODE_TYPES.JSXIdentifier }, (n) => n.name).with({
282
282
  type: AST_NODE_TYPES.JSXMemberExpression,
283
283
  object: { type: AST_NODE_TYPES.JSXIdentifier }
284
284
  }, (n) => n.object.name).otherwise(() => null);
285
- if (name$4 == null) return;
286
- if (name$4 === "this") return;
287
- if (/^[a-z]/u.test(name$4)) return;
288
- if (findVariable(name$4, context.sourceCode.getScope(node)) == null) context.report({
285
+ if (name$7 == null) return;
286
+ if (name$7 === "this") return;
287
+ if (/^[a-z]/u.test(name$7)) return;
288
+ if (findVariable(name$7, context.sourceCode.getScope(node)) == null) context.report({
289
289
  messageId: "jsxNoUndef",
290
290
  node,
291
- data: { name: name$4 }
291
+ data: { name: name$7 }
292
292
  });
293
293
  } };
294
294
  }
@@ -437,12 +437,12 @@ function create$54(context) {
437
437
  JSXOpeningFragment: handleJsxElement
438
438
  };
439
439
  }
440
- function debugReport(context, node, name$4) {
440
+ function debugReport(context, node, name$7) {
441
441
  if (process.env["ESLINT_REACT_DEBUG"] !== "1") return;
442
442
  context.report({
443
443
  messageId: "jsxUsesReact",
444
444
  node,
445
- data: { name: name$4 }
445
+ data: { name: name$7 }
446
446
  });
447
447
  }
448
448
 
@@ -578,8 +578,8 @@ function create$52(context) {
578
578
  const RULE_NAME$51 = "no-array-index-key";
579
579
  const RULE_FEATURES$49 = [];
580
580
  const REACT_CHILDREN_METHOD = ["forEach", "map"];
581
- function isReactChildrenMethod(name$4) {
582
- return REACT_CHILDREN_METHOD.includes(name$4);
581
+ function isReactChildrenMethod(name$7) {
582
+ return REACT_CHILDREN_METHOD.includes(name$7);
583
583
  }
584
584
  function isUsingReactChildren(context, node) {
585
585
  const { importSource = "react" } = coerceSettings(context.settings);
@@ -595,8 +595,8 @@ function getMapIndexParamName(context, node) {
595
595
  const { callee } = node;
596
596
  if (callee.type !== AST_NODE_TYPES.MemberExpression) return unit;
597
597
  if (callee.property.type !== AST_NODE_TYPES.Identifier) return unit;
598
- const { name: name$4 } = callee.property;
599
- const indexPosition = AST.getArrayMethodCallbackIndexParamPosition(name$4);
598
+ const { name: name$7 } = callee.property;
599
+ const indexPosition = AST.getArrayMethodCallbackIndexParamPosition(name$7);
600
600
  if (indexPosition === -1) return unit;
601
601
  const callbackArg = node.arguments[isUsingReactChildren(context, node) ? 1 : 0];
602
602
  if (callbackArg == null) return unit;
@@ -628,7 +628,7 @@ var no_array_index_key_default = createRule({
628
628
  function create$51(context) {
629
629
  const indexParamNames = [];
630
630
  function isArrayIndex(node) {
631
- return node.type === AST_NODE_TYPES.Identifier && indexParamNames.some((name$4) => name$4 != null && name$4 === node.name);
631
+ return node.type === AST_NODE_TYPES.Identifier && indexParamNames.some((name$7) => name$7 != null && name$7 === node.name);
632
632
  }
633
633
  function isCreateOrCloneElementCall(node) {
634
634
  return isCreateElementCall(context, node) || isCloneElementCall(context, node);
@@ -636,7 +636,7 @@ function create$51(context) {
636
636
  function getReportDescriptors(node) {
637
637
  switch (node.type) {
638
638
  case AST_NODE_TYPES.Identifier:
639
- if (indexParamNames.some((name$4) => name$4 != null && name$4 === node.name)) return [{
639
+ if (indexParamNames.some((name$7) => name$7 != null && name$7 === node.name)) return [{
640
640
  messageId: "noArrayIndexKey",
641
641
  node
642
642
  }];
@@ -877,12 +877,12 @@ function create$44(context) {
877
877
  ...listeners,
878
878
  "Program:exit"(program) {
879
879
  const components = ctx.getAllComponents(program);
880
- for (const { name: name$4 = "anonymous", node: component } of components.values()) {
880
+ for (const { name: name$7 = "anonymous", node: component } of components.values()) {
881
881
  if (component.body.body.some((m) => isComponentDidCatch(m) || isGetDerivedStateFromError(m))) continue;
882
882
  context.report({
883
883
  messageId: "noClassComponent",
884
884
  node: component,
885
- data: { name: name$4 }
885
+ data: { name: name$7 }
886
886
  });
887
887
  }
888
888
  }
@@ -1310,17 +1310,17 @@ function create$34(context, [option]) {
1310
1310
  else if (node.name.type === AST_NODE_TYPES.JSXNamespacedName) nodeName = node.name.name.name;
1311
1311
  for (const attr of node.attributes) {
1312
1312
  if (attr.type === AST_NODE_TYPES.JSXSpreadAttribute) continue;
1313
- const name$4 = attr.name.name;
1314
- if (typeof name$4 !== "string") continue;
1313
+ const name$7 = attr.name.name;
1314
+ if (typeof name$7 !== "string") continue;
1315
1315
  for (const forbiddenPropItem of forbid) {
1316
1316
  if (typeof forbiddenPropItem !== "string" && nodeName != null) {
1317
1317
  if ("excludedNodes" in forbiddenPropItem && forbiddenPropItem.excludedNodes.includes(nodeName)) continue;
1318
1318
  if ("includedNodes" in forbiddenPropItem && !forbiddenPropItem.includedNodes.includes(nodeName)) continue;
1319
1319
  }
1320
- if (toRegExp(typeof forbiddenPropItem === "string" ? forbiddenPropItem : forbiddenPropItem.prop).test(name$4)) context.report({
1320
+ if (toRegExp(typeof forbiddenPropItem === "string" ? forbiddenPropItem : forbiddenPropItem.prop).test(name$7)) context.report({
1321
1321
  messageId,
1322
1322
  node: attr,
1323
- data: { name: name$4 }
1323
+ data: { name: name$7 }
1324
1324
  });
1325
1325
  }
1326
1326
  }
@@ -1836,15 +1836,15 @@ function create$26(context) {
1836
1836
  const isClassComponent$1 = (node) => {
1837
1837
  return AST.isClass(node) && classComponents.some((component) => component.node === node);
1838
1838
  };
1839
- for (const { name: name$4, node: component } of functionComponents) {
1840
- if (name$4 == null) continue;
1839
+ for (const { name: name$7, node: component } of functionComponents) {
1840
+ if (name$7 == null) continue;
1841
1841
  if (isDirectValueOfRenderPropertyLoose(component)) continue;
1842
1842
  if (isInsideJSXAttributeValue(component)) {
1843
1843
  if (!isDeclaredInRenderPropLoose(component)) context.report({
1844
1844
  messageId: "noNestedComponentDefinitions",
1845
1845
  node: component,
1846
1846
  data: {
1847
- name: name$4,
1847
+ name: name$7,
1848
1848
  suggestion: "Move it to the top level or pass it as a prop."
1849
1849
  }
1850
1850
  });
@@ -1855,7 +1855,7 @@ function create$26(context) {
1855
1855
  messageId: "noNestedComponentDefinitions",
1856
1856
  node: component,
1857
1857
  data: {
1858
- name: name$4,
1858
+ name: name$7,
1859
1859
  suggestion: "Move it to the top level or pass it as a prop."
1860
1860
  }
1861
1861
  });
@@ -1867,7 +1867,7 @@ function create$26(context) {
1867
1867
  messageId: "noNestedComponentDefinitions",
1868
1868
  node: component,
1869
1869
  data: {
1870
- name: name$4,
1870
+ name: name$7,
1871
1871
  suggestion: component.parent.type === AST_NODE_TYPES.Property ? "Move it to the top level or pass it as a prop." : "Move it to the top level."
1872
1872
  }
1873
1873
  });
@@ -1877,18 +1877,18 @@ function create$26(context) {
1877
1877
  messageId: "noNestedComponentDefinitions",
1878
1878
  node: component,
1879
1879
  data: {
1880
- name: name$4,
1880
+ name: name$7,
1881
1881
  suggestion: "Move it to the top level."
1882
1882
  }
1883
1883
  });
1884
1884
  }
1885
- for (const { name: name$4 = "unknown", node: component } of classComponents) {
1885
+ for (const { name: name$7 = "unknown", node: component } of classComponents) {
1886
1886
  if (AST.findParentNode(component, (n) => isClassComponent$1(n) || isFunctionComponent(n)) == null) continue;
1887
1887
  context.report({
1888
1888
  messageId: "noNestedComponentDefinitions",
1889
1889
  node: component,
1890
1890
  data: {
1891
- name: name$4,
1891
+ name: name$7,
1892
1892
  suggestion: component.parent.type === AST_NODE_TYPES.Property ? "Move it to the top level or pass it as a prop." : "Move it to the top level."
1893
1893
  }
1894
1894
  });
@@ -2046,13 +2046,13 @@ function create$23(context) {
2046
2046
  ...listeners,
2047
2047
  "Program:exit"(program) {
2048
2048
  const components = ctx.getAllComponents(program);
2049
- for (const { name: name$4 = "PureComponent", node: component, flag } of components.values()) {
2049
+ for (const { name: name$7 = "PureComponent", node: component, flag } of components.values()) {
2050
2050
  if ((flag & ComponentFlag.PureComponent) === 0n) continue;
2051
2051
  const { body } = component.body;
2052
2052
  for (const member of body) if (isShouldComponentUpdate(member)) context.report({
2053
2053
  messageId: "noRedundantShouldComponentUpdate",
2054
2054
  node: member,
2055
- data: { componentName: name$4 }
2055
+ data: { componentName: name$7 }
2056
2056
  });
2057
2057
  }
2058
2058
  }
@@ -2396,16 +2396,16 @@ function create$15(context) {
2396
2396
  ...listeners,
2397
2397
  "Program:exit"(program) {
2398
2398
  const allHooks = ctx.getAllHooks(program);
2399
- for (const { id, name: name$4, node, hookCalls } of allHooks.values()) {
2399
+ for (const { id, name: name$7, node, hookCalls } of allHooks.values()) {
2400
2400
  if (hookCalls.length > 0) continue;
2401
2401
  if (AST.isFunctionEmpty(node)) continue;
2402
- if (WELL_KNOWN_HOOKS.includes(name$4)) continue;
2402
+ if (WELL_KNOWN_HOOKS.includes(name$7)) continue;
2403
2403
  if (containsUseComments(context, node)) continue;
2404
2404
  if (AST.findParentNode(node, AST.isViMockCallback) != null) continue;
2405
2405
  context.report({
2406
2406
  messageId: "noUnnecessaryUsePrefix",
2407
2407
  node: id ?? node,
2408
- data: { name: name$4 }
2408
+ data: { name: name$7 }
2409
2409
  });
2410
2410
  }
2411
2411
  }
@@ -2578,9 +2578,9 @@ function create$11(context) {
2578
2578
  }
2579
2579
  };
2580
2580
  }
2581
- function isContextName(name$4, isReact18OrBelow) {
2582
- if (name$4 === "Provider") return true;
2583
- if (!isReact18OrBelow) return name$4.endsWith("Context") || name$4.endsWith("CONTEXT");
2581
+ function isContextName(name$7, isReact18OrBelow) {
2582
+ if (name$7 === "Provider") return true;
2583
+ if (!isReact18OrBelow) return name$7.endsWith("Context") || name$7.endsWith("CONTEXT");
2584
2584
  return false;
2585
2585
  }
2586
2586
 
@@ -2618,8 +2618,8 @@ function create$10(context) {
2618
2618
  const { params } = component;
2619
2619
  const [props] = params;
2620
2620
  if (props == null) continue;
2621
- const properties = match(props).with({ type: AST_NODE_TYPES.ObjectPattern }, ({ properties: properties$1 }) => properties$1).with({ type: AST_NODE_TYPES.Identifier }, ({ name: name$4 }) => {
2622
- return declarators.get(component)?.filter((d) => d.init.name === name$4).flatMap((d) => d.id.properties) ?? [];
2621
+ const properties = match(props).with({ type: AST_NODE_TYPES.ObjectPattern }, ({ properties: properties$1 }) => properties$1).with({ type: AST_NODE_TYPES.Identifier }, ({ name: name$7 }) => {
2622
+ return declarators.get(component)?.filter((d) => d.init.name === name$7).flatMap((d) => d.id.properties) ?? [];
2623
2623
  }).otherwise(() => []);
2624
2624
  for (const prop of properties) {
2625
2625
  if (prop.type !== AST_NODE_TYPES.Property || prop.value.type !== AST_NODE_TYPES.AssignmentPattern) continue;
@@ -3030,8 +3030,8 @@ var no_use_context_default = createRule({
3030
3030
  });
3031
3031
  function create$6(context) {
3032
3032
  if (!context.sourceCode.text.includes("useContext")) return {};
3033
- const settings$3 = getSettingsFromContext(context);
3034
- if (compare(settings$3.version, "19.0.0", "<")) return {};
3033
+ const settings$6 = getSettingsFromContext(context);
3034
+ if (compare(settings$6.version, "19.0.0", "<")) return {};
3035
3035
  const hookCalls = /* @__PURE__ */ new Set();
3036
3036
  return {
3037
3037
  CallExpression(node) {
@@ -3039,7 +3039,7 @@ function create$6(context) {
3039
3039
  hookCalls.add(node);
3040
3040
  },
3041
3041
  ImportDeclaration(node) {
3042
- if (node.source.value !== settings$3.importSource) return;
3042
+ if (node.source.value !== settings$6.importSource) return;
3043
3043
  const isUseImported = node.specifiers.some(isMatching({ local: {
3044
3044
  type: AST_NODE_TYPES.Identifier,
3045
3045
  name: "use"
@@ -3457,7 +3457,7 @@ function create(context) {
3457
3457
  //#region src/plugin.ts
3458
3458
  const plugin = {
3459
3459
  meta: {
3460
- name: name$3,
3460
+ name: name$6,
3461
3461
  version
3462
3462
  },
3463
3463
  rules: {
@@ -3529,13 +3529,13 @@ const plugin = {
3529
3529
  //#endregion
3530
3530
  //#region src/configs/recommended.ts
3531
3531
  var recommended_exports = /* @__PURE__ */ __export({
3532
- name: () => name$2,
3533
- plugins: () => plugins$2,
3534
- rules: () => rules$3,
3535
- settings: () => settings$2
3532
+ name: () => name$5,
3533
+ plugins: () => plugins$5,
3534
+ rules: () => rules$6,
3535
+ settings: () => settings$5
3536
3536
  });
3537
- const name$2 = "react-x/recommended";
3538
- const rules$3 = {
3537
+ const name$5 = "react-x/recommended";
3538
+ const rules$6 = {
3539
3539
  "react-x/jsx-no-comment-textnodes": "warn",
3540
3540
  "react-x/jsx-no-duplicate-props": "warn",
3541
3541
  "react-x/jsx-uses-react": "warn",
@@ -3575,15 +3575,15 @@ const rules$3 = {
3575
3575
  "react-x/no-useless-forward-ref": "warn",
3576
3576
  "react-x/prefer-use-state-lazy-initialization": "warn"
3577
3577
  };
3578
- const plugins$2 = { "react-x": plugin };
3579
- const settings$2 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
3578
+ const plugins$5 = { "react-x": plugin };
3579
+ const settings$5 = { "react-x": DEFAULT_ESLINT_REACT_SETTINGS };
3580
3580
 
3581
3581
  //#endregion
3582
3582
  //#region src/configs/_ts.ts
3583
3583
  /**
3584
3584
  * Disables rules that are already handled by TypeScript
3585
3585
  */
3586
- const rules$2 = {
3586
+ const rules$5 = {
3587
3587
  "react-x/jsx-no-duplicate-props": "off",
3588
3588
  "react-x/jsx-no-undef": "off",
3589
3589
  "react-x/jsx-uses-react": "off",
@@ -3593,31 +3593,92 @@ const rules$2 = {
3593
3593
  //#endregion
3594
3594
  //#region src/configs/recommended-typescript.ts
3595
3595
  var recommended_typescript_exports = /* @__PURE__ */ __export({
3596
+ name: () => name$4,
3597
+ plugins: () => plugins$4,
3598
+ rules: () => rules$4,
3599
+ settings: () => settings$4
3600
+ });
3601
+ const name$4 = "react-x/recommended-typescript";
3602
+ const rules$4 = {
3603
+ ...rules$6,
3604
+ ...rules$5
3605
+ };
3606
+ const plugins$4 = { ...plugins$5 };
3607
+ const settings$4 = { ...settings$5 };
3608
+
3609
+ //#endregion
3610
+ //#region src/configs/recommended-type-checked.ts
3611
+ var recommended_type_checked_exports = /* @__PURE__ */ __export({
3612
+ name: () => name$3,
3613
+ plugins: () => plugins$3,
3614
+ rules: () => rules$3,
3615
+ settings: () => settings$3
3616
+ });
3617
+ const name$3 = "react-x/recommended-type-checked";
3618
+ const rules$3 = {
3619
+ ...rules$4,
3620
+ "react-x/no-leaked-conditional-rendering": "error"
3621
+ };
3622
+ const plugins$3 = { ...plugins$4 };
3623
+ const settings$3 = { ...settings$4 };
3624
+
3625
+ //#endregion
3626
+ //#region src/configs/strict.ts
3627
+ var strict_exports = /* @__PURE__ */ __export({
3628
+ name: () => name$2,
3629
+ plugins: () => plugins$2,
3630
+ rules: () => rules$2,
3631
+ settings: () => settings$2
3632
+ });
3633
+ const name$2 = "react-x/strict";
3634
+ const rules$2 = {
3635
+ ...rules$6,
3636
+ "react-x/jsx-no-iife": "error",
3637
+ "react-x/no-children-prop": "warn",
3638
+ "react-x/no-class-component": "error",
3639
+ "react-x/no-misused-capture-owner-stack": "error",
3640
+ "react-x/no-unnecessary-key": "warn",
3641
+ "react-x/no-unnecessary-use-callback": "warn",
3642
+ "react-x/no-unnecessary-use-memo": "warn",
3643
+ "react-x/no-unstable-context-value": "warn",
3644
+ "react-x/no-unstable-default-props": "warn",
3645
+ "react-x/no-unused-class-component-members": "warn",
3646
+ "react-x/no-unused-state": "warn",
3647
+ "react-x/no-useless-fragment": "warn",
3648
+ "react-x/prefer-destructuring-assignment": "warn"
3649
+ };
3650
+ const plugins$2 = { ...plugins$5 };
3651
+ const settings$2 = { ...settings$5 };
3652
+
3653
+ //#endregion
3654
+ //#region src/configs/strict-typescript.ts
3655
+ var strict_typescript_exports = /* @__PURE__ */ __export({
3596
3656
  name: () => name$1,
3597
3657
  plugins: () => plugins$1,
3598
3658
  rules: () => rules$1,
3599
3659
  settings: () => settings$1
3600
3660
  });
3601
- const name$1 = "react-x/recommended-typescript";
3661
+ const name$1 = "react-x/strict-typescript";
3602
3662
  const rules$1 = {
3603
- ...rules$3,
3604
- ...rules$2
3663
+ ...rules$2,
3664
+ ...rules$5
3605
3665
  };
3606
3666
  const plugins$1 = { ...plugins$2 };
3607
3667
  const settings$1 = { ...settings$2 };
3608
3668
 
3609
3669
  //#endregion
3610
- //#region src/configs/recommended-type-checked.ts
3611
- var recommended_type_checked_exports = /* @__PURE__ */ __export({
3670
+ //#region src/configs/strict-type-checked.ts
3671
+ var strict_type_checked_exports = /* @__PURE__ */ __export({
3612
3672
  name: () => name,
3613
3673
  plugins: () => plugins,
3614
3674
  rules: () => rules,
3615
3675
  settings: () => settings
3616
3676
  });
3617
- const name = "react-x/recommended-type-checked";
3677
+ const name = "react-x/strict-type-checked";
3618
3678
  const rules = {
3619
3679
  ...rules$1,
3620
- "react-x/no-leaked-conditional-rendering": "error"
3680
+ "react-x/no-leaked-conditional-rendering": "error",
3681
+ "react-x/no-unused-props": "warn"
3621
3682
  };
3622
3683
  const plugins = { ...plugins$1 };
3623
3684
  const settings = { ...settings$1 };
@@ -3629,8 +3690,11 @@ var src_default = {
3629
3690
  ...plugin,
3630
3691
  configs: {
3631
3692
  ["recommended"]: toFlatConfig(recommended_exports),
3693
+ ["recommended-typescript"]: toFlatConfig(recommended_typescript_exports),
3632
3694
  ["recommended-type-checked"]: toFlatConfig(recommended_type_checked_exports),
3633
- ["recommended-typescript"]: toFlatConfig(recommended_typescript_exports)
3695
+ ["strict"]: toFlatConfig(strict_exports),
3696
+ ["strict-typescript"]: toFlatConfig(strict_typescript_exports),
3697
+ ["strict-type-checked"]: toFlatConfig(strict_type_checked_exports)
3634
3698
  }
3635
3699
  };
3636
3700
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "2.1.1-next.3",
3
+ "version": "2.1.1",
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",
@@ -43,12 +43,12 @@
43
43
  "string-ts": "^2.2.1",
44
44
  "ts-api-utils": "^2.1.0",
45
45
  "ts-pattern": "^5.8.0",
46
- "@eslint-react/ast": "2.1.1-next.3",
47
- "@eslint-react/eff": "2.1.1-next.3",
48
- "@eslint-react/kit": "2.1.1-next.3",
49
- "@eslint-react/core": "2.1.1-next.3",
50
- "@eslint-react/shared": "2.1.1-next.3",
51
- "@eslint-react/var": "2.1.1-next.3"
46
+ "@eslint-react/ast": "2.1.1",
47
+ "@eslint-react/core": "2.1.1",
48
+ "@eslint-react/kit": "2.1.1",
49
+ "@eslint-react/shared": "2.1.1",
50
+ "@eslint-react/eff": "2.1.1",
51
+ "@eslint-react/var": "2.1.1"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/react": "^19.2.2",