eslint-plugin-react-x 2.9.0 → 2.9.1-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.
package/README.md CHANGED
@@ -141,4 +141,4 @@ export default defineConfig(
141
141
  - [`no-useless-fragment`](https://eslint-react.xyz/docs/rules/no-useless-fragment) - Disallows useless fragment elements (🔧 Fixable, ⚙️ Configurable)
142
142
  - [`prefer-namespace-import`](https://eslint-react.xyz/docs/rules/prefer-namespace-import) - Enforces importing React via a namespace import
143
143
 
144
- <https://eslint-react.xyz/docs/rules/overview#core-rules>
144
+ <https://eslint-react.xyz/docs/rules/overview#x-rules>
package/dist/index.js CHANGED
@@ -66,7 +66,7 @@ const rules$7 = {
66
66
  //#endregion
67
67
  //#region package.json
68
68
  var name$6 = "eslint-plugin-react-x";
69
- var version = "2.9.0";
69
+ var version = "2.9.1-beta.1";
70
70
 
71
71
  //#endregion
72
72
  //#region src/utils/create-rule.ts
@@ -2458,7 +2458,7 @@ var no_unstable_context_value_default = createRule({
2458
2458
  defaultOptions: []
2459
2459
  });
2460
2460
  function create$12(context) {
2461
- if (ast.getFileDirectives(context.sourceCode.ast).some((d) => d.value === "use memo")) return {};
2461
+ if (ast.getFileDirectives(context.sourceCode.ast).some((d) => d.directive === "use memo")) return {};
2462
2462
  const { version } = getSettingsFromContext(context);
2463
2463
  const isReact18OrBelow = compare(version, "19.0.0", "<");
2464
2464
  const { ctx, visitor } = core.useComponentCollector(context);
@@ -2482,7 +2482,7 @@ function create$12(context) {
2482
2482
  },
2483
2483
  "Program:exit"(program) {
2484
2484
  for (const { node: component, directives } of ctx.getAllComponents(program)) for (const construction of constructions.get(component) ?? []) {
2485
- if (directives.some((d) => d.value === "use memo")) return;
2485
+ if (directives.some((d) => d.directive === "use memo")) return;
2486
2486
  const { kind, node: constructionNode } = construction;
2487
2487
  const suggestion = kind === "function" ? "Consider wrapping it in a useCallback hook." : "Consider wrapping it in a useMemo hook.";
2488
2488
  context.report({
@@ -2535,7 +2535,7 @@ function extractIdentifier(node) {
2535
2535
  return null;
2536
2536
  }
2537
2537
  function create$11(context, [options]) {
2538
- if (ast.getFileDirectives(context.sourceCode.ast).some((d) => d.value === "use memo")) return {};
2538
+ if (ast.getFileDirectives(context.sourceCode.ast).some((d) => d.directive === "use memo")) return {};
2539
2539
  const { ctx, visitor } = core.useComponentCollector(context);
2540
2540
  const declarators = /* @__PURE__ */ new WeakMap();
2541
2541
  const { safeDefaultProps = [] } = options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-x",
3
- "version": "2.9.0",
3
+ "version": "2.9.1-beta.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",
@@ -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": "2.9.0",
49
- "@eslint-react/core": "2.9.0",
50
- "@eslint-react/shared": "2.9.0",
51
- "@eslint-react/eff": "2.9.0",
52
- "@eslint-react/var": "2.9.0"
48
+ "@eslint-react/ast": "2.9.1-beta.1",
49
+ "@eslint-react/core": "2.9.1-beta.1",
50
+ "@eslint-react/eff": "2.9.1-beta.1",
51
+ "@eslint-react/shared": "2.9.1-beta.1",
52
+ "@eslint-react/var": "2.9.1-beta.1"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/react": "^19.2.10",