eslint-plugin-react-rsc 3.0.0-beta.2 → 3.0.0-beta.23
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.js +6 -6
- 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,
|
|
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.
|
|
35
|
+
var version = "3.0.0-beta.23";
|
|
36
36
|
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/utils/create-rule.ts
|
|
@@ -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 =
|
|
104
|
+
const variableNode = getVariableInitializer(findVariable(id.name, context.sourceCode.getScope(node)), 0);
|
|
105
105
|
if (variableNode == null) return;
|
|
106
106
|
reportNonAsyncFunction(variableNode, "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.
|
|
3
|
+
"version": "3.0.0-beta.23",
|
|
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": "
|
|
41
|
-
"@typescript-eslint/utils": "
|
|
40
|
+
"@typescript-eslint/types": "canary",
|
|
41
|
+
"@typescript-eslint/utils": "canary",
|
|
42
42
|
"ts-pattern": "^5.9.0",
|
|
43
|
-
"@eslint-react/
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/var": "3.0.0-beta.
|
|
43
|
+
"@eslint-react/eff": "3.0.0-beta.23",
|
|
44
|
+
"@eslint-react/ast": "3.0.0-beta.23",
|
|
45
|
+
"@eslint-react/var": "3.0.0-beta.23",
|
|
46
|
+
"@eslint-react/shared": "3.0.0-beta.23"
|
|
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": "
|
|
67
|
+
"lint:ts": "tsl"
|
|
67
68
|
}
|
|
68
69
|
}
|