eslint-plugin-react-rsc 3.0.0-beta.63 → 3.0.0-beta.64

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 +4 -11
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { unit } from "@eslint-react/eff";
1
+ import "@eslint-react/eff";
2
2
  import { DEFAULT_ESLINT_REACT_SETTINGS, WEBSITE_URL, defineRuleListener } from "@eslint-react/shared";
3
3
  import * as ast from "@eslint-react/ast";
4
+ import { resolve } from "@eslint-react/var";
4
5
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
5
- import { findVariable } from "@typescript-eslint/utils/ast-utils";
6
6
  import { ESLintUtils } from "@typescript-eslint/utils";
7
7
 
8
8
  //#region \0rolldown/runtime.js
@@ -33,7 +33,7 @@ const rules$4 = { "react-rsc/function-definition": "off" };
33
33
  //#endregion
34
34
  //#region package.json
35
35
  var name$4 = "eslint-plugin-react-rsc";
36
- var version = "3.0.0-beta.63";
36
+ var version = "3.0.0-beta.64";
37
37
 
38
38
  //#endregion
39
39
  //#region src/utils/create-rule.ts
@@ -102,7 +102,7 @@ function create(context) {
102
102
  * @param node The export declaration node
103
103
  */
104
104
  function findAndCheckExportedFunctionDeclarations(id, node) {
105
- const initNode = resolve(findVariable(context.sourceCode.getScope(node), id.name));
105
+ const initNode = resolve(context, id);
106
106
  if (initNode == null || !ast.isFunction(initNode)) return;
107
107
  reportNonAsyncFunction(initNode, "file");
108
108
  }
@@ -134,13 +134,6 @@ function create(context) {
134
134
  }
135
135
  });
136
136
  }
137
- function resolve(v) {
138
- if (v == null) return unit;
139
- const def = v.defs.at(0);
140
- if (def == null) return unit;
141
- if ("init" in def.node && def.node.init != null && !("declarations" in def.node.init)) return def.node.init;
142
- return def.node;
143
- }
144
137
 
145
138
  //#endregion
146
139
  //#region src/plugin.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-rsc",
3
- "version": "3.0.0-beta.63",
3
+ "version": "3.0.0-beta.64",
4
4
  "description": "ESLint React's ESLint plugin for RSC related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -42,10 +42,10 @@
42
42
  "@typescript-eslint/types": "canary",
43
43
  "@typescript-eslint/utils": "canary",
44
44
  "ts-pattern": "^5.9.0",
45
- "@eslint-react/ast": "3.0.0-beta.63",
46
- "@eslint-react/eff": "3.0.0-beta.63",
47
- "@eslint-react/shared": "3.0.0-beta.63",
48
- "@eslint-react/var": "3.0.0-beta.63"
45
+ "@eslint-react/eff": "3.0.0-beta.64",
46
+ "@eslint-react/ast": "3.0.0-beta.64",
47
+ "@eslint-react/var": "3.0.0-beta.64",
48
+ "@eslint-react/shared": "3.0.0-beta.64"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/react": "^19.2.14",