eslint-plugin-react-x 3.0.0-next.16 → 3.0.0-next.17

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 +8 -6
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -69,7 +69,7 @@ const rules$7 = {
69
69
  //#endregion
70
70
  //#region package.json
71
71
  var name$6 = "eslint-plugin-react-x";
72
- var version = "3.0.0-next.16";
72
+ var version = "3.0.0-next.17";
73
73
 
74
74
  //#endregion
75
75
  //#region src/utils/create-rule.ts
@@ -2762,8 +2762,9 @@ var no_unstable_context_value_default = createRule({
2762
2762
  defaultOptions: []
2763
2763
  });
2764
2764
  function create$17(context) {
2765
- const { isCompilerEnabled, version } = getSettingsFromContext(context);
2766
- if (isCompilerEnabled && ast.isDirectiveInFile(context.sourceCode.ast, "use memo")) return {};
2765
+ const { compilationMode, version } = getSettingsFromContext(context);
2766
+ if (compilationMode === "infer" || compilationMode === "all") return {};
2767
+ if (compilationMode === "annotation" && ast.isDirectiveInFile(context.sourceCode.ast, "use memo")) return {};
2767
2768
  const isReact18OrBelow = compare(version, "19.0.0", "<");
2768
2769
  const { ctx, visitor } = core.useComponentCollector(context);
2769
2770
  const constructions = /* @__PURE__ */ new WeakMap();
@@ -2774,7 +2775,7 @@ function create$17(context) {
2774
2775
  if (!isContextName(selfName, isReact18OrBelow)) return;
2775
2776
  const functionEntry = ctx.getCurrentEntry();
2776
2777
  if (functionEntry == null) return;
2777
- if (isCompilerEnabled && ast.isDirectiveInFunction(functionEntry.node, "use memo")) return;
2778
+ if (compilationMode === "annotation" && ast.isDirectiveInFunction(functionEntry.node, "use memo")) return;
2778
2779
  const attribute = node.attributes.find((attribute) => attribute.type === AST_NODE_TYPES.JSXAttribute && attribute.name.name === "value");
2779
2780
  if (attribute == null || !("value" in attribute)) return;
2780
2781
  const value = attribute.value;
@@ -2840,8 +2841,9 @@ function extractIdentifier(node) {
2840
2841
  return null;
2841
2842
  }
2842
2843
  function create$16(context, [options]) {
2843
- const { isCompilerEnabled } = getSettingsFromContext(context);
2844
- if (isCompilerEnabled && ast.isDirectiveInFile(context.sourceCode.ast, "use memo")) return {};
2844
+ const { compilationMode } = getSettingsFromContext(context);
2845
+ if (compilationMode === "infer" || compilationMode === "all") return {};
2846
+ if (compilationMode === "annotation" && ast.isDirectiveInFile(context.sourceCode.ast, "use memo")) return {};
2845
2847
  const { ctx, visitor } = core.useComponentCollector(context);
2846
2848
  const declarators = /* @__PURE__ */ new WeakMap();
2847
2849
  const { safeDefaultProps = [] } = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "3.0.0-next.16",
3
+ "version": "3.0.0-next.17",
4
4
  "description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
5
5
  "keywords": [
6
6
  "react",
@@ -45,11 +45,11 @@
45
45
  "is-immutable-type": "^5.0.1",
46
46
  "ts-api-utils": "^2.4.0",
47
47
  "ts-pattern": "^5.9.0",
48
- "@eslint-react/ast": "3.0.0-next.16",
49
- "@eslint-react/core": "3.0.0-next.16",
50
- "@eslint-react/eff": "3.0.0-next.16",
51
- "@eslint-react/shared": "3.0.0-next.16",
52
- "@eslint-react/var": "3.0.0-next.16"
48
+ "@eslint-react/core": "3.0.0-next.17",
49
+ "@eslint-react/eff": "3.0.0-next.17",
50
+ "@eslint-react/shared": "3.0.0-next.17",
51
+ "@eslint-react/var": "3.0.0-next.17",
52
+ "@eslint-react/ast": "3.0.0-next.17"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/react": "^19.2.14",