eslint-plugin-react-rsc 3.0.0-beta.4 → 3.0.0-beta.40

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 +9 -9
  2. package/package.json +8 -7
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { DEFAULT_ESLINT_REACT_SETTINGS, WEBSITE_URL, getConfigAdapters } from "@eslint-react/shared";
1
+ import { DEFAULT_ESLINT_REACT_SETTINGS, WEBSITE_URL, defineRuleListener, getConfigAdapters } from "@eslint-react/shared";
2
2
  import * as ast from "@eslint-react/ast";
3
- import { findVariable, getVariableDefinitionNode } from "@eslint-react/var";
3
+ import { findVariable, getVariableInitializer } from "@eslint-react/var";
4
4
  import { AST_NODE_TYPES } from "@typescript-eslint/types";
5
5
  import { ESLintUtils } from "@typescript-eslint/utils";
6
6
 
@@ -32,7 +32,7 @@ const rules$4 = { "react-rsc/function-definition": "off" };
32
32
  //#endregion
33
33
  //#region package.json
34
34
  var name$4 = "eslint-plugin-react-rsc";
35
- var version = "3.0.0-beta.4";
35
+ var version = "3.0.0-beta.40";
36
36
 
37
37
  //#endregion
38
38
  //#region src/utils/create-rule.ts
@@ -42,7 +42,7 @@ function getDocsUrl(ruleName) {
42
42
  const createRule = ESLintUtils.RuleCreator(getDocsUrl);
43
43
 
44
44
  //#endregion
45
- //#region src/rules/function-definition.ts
45
+ //#region src/rules/function-definition/function-definition.ts
46
46
  const RULE_NAME = "function-definition";
47
47
  var function_definition_default = createRule({
48
48
  meta: {
@@ -101,11 +101,11 @@ function create(context) {
101
101
  * @param node The export declaration node
102
102
  */
103
103
  function findAndCheckExportedFunctionDeclarations(id, node) {
104
- const variableNode = getVariableDefinitionNode(findVariable(id.name, context.sourceCode.getScope(node)), 0);
105
- if (variableNode == null) return;
106
- reportNonAsyncFunction(variableNode, "file");
104
+ const initNode = getVariableInitializer(findVariable(id.name, context.sourceCode.getScope(node)), 0);
105
+ if (initNode == null) return;
106
+ reportNonAsyncFunction(initNode, "file");
107
107
  }
108
- return {
108
+ return defineRuleListener({
109
109
  ArrowFunctionExpression(node) {
110
110
  checkLocalServerFunction(node);
111
111
  },
@@ -131,7 +131,7 @@ function create(context) {
131
131
  FunctionExpression(node) {
132
132
  checkLocalServerFunction(node);
133
133
  }
134
- };
134
+ });
135
135
  }
136
136
 
137
137
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-react-rsc",
3
- "version": "3.0.0-beta.4",
3
+ "version": "3.0.0-beta.40",
4
4
  "description": "ESLint React's ESLint plugin for RSC related rules.",
5
5
  "keywords": [
6
6
  "react",
@@ -37,12 +37,13 @@
37
37
  "./package.json"
38
38
  ],
39
39
  "dependencies": {
40
- "@typescript-eslint/types": "^8.56.0",
41
- "@typescript-eslint/utils": "^8.56.0",
40
+ "@typescript-eslint/types": "canary",
41
+ "@typescript-eslint/utils": "canary",
42
42
  "ts-pattern": "^5.9.0",
43
- "@eslint-react/ast": "3.0.0-beta.4",
44
- "@eslint-react/shared": "3.0.0-beta.4",
45
- "@eslint-react/var": "3.0.0-beta.4"
43
+ "@eslint-react/ast": "3.0.0-beta.40",
44
+ "@eslint-react/eff": "3.0.0-beta.40",
45
+ "@eslint-react/var": "3.0.0-beta.40",
46
+ "@eslint-react/shared": "3.0.0-beta.40"
46
47
  },
47
48
  "devDependencies": {
48
49
  "@types/react": "^19.2.14",
@@ -63,6 +64,6 @@
63
64
  "scripts": {
64
65
  "build": "tsdown",
65
66
  "lint:publish": "publint",
66
- "lint:ts": "tsc --noEmit"
67
+ "lint:ts": "tsl"
67
68
  }
68
69
  }