eslint-plugin-react-rsc 5.8.5 → 5.8.7-beta.0
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 +3 -3
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ const rules$4 = { "react-rsc/function-definition": "off" };
|
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region package.json
|
|
36
36
|
var name$4 = "eslint-plugin-react-rsc";
|
|
37
|
-
var version = "5.8.
|
|
37
|
+
var version = "5.8.7-beta.0";
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/utils/create-rule.ts
|
|
@@ -125,7 +125,7 @@ function create(context) {
|
|
|
125
125
|
function checkFileLevelDirectives() {
|
|
126
126
|
for (const node of context.sourceCode.ast.body) {
|
|
127
127
|
if (node.type !== AST_NODE_TYPES.ExpressionStatement) continue;
|
|
128
|
-
if (Check.
|
|
128
|
+
if (Check.isStringLiteral(node.expression)) {
|
|
129
129
|
const value = node.expression.value;
|
|
130
130
|
if ((value === "use server" || value === "use client") && node.directive == null) context.report({
|
|
131
131
|
data: { name: value },
|
|
@@ -152,7 +152,7 @@ function create(context) {
|
|
|
152
152
|
if (node.body.type !== AST_NODE_TYPES.BlockStatement) return;
|
|
153
153
|
for (const stmt of node.body.body) {
|
|
154
154
|
if (stmt.type !== AST_NODE_TYPES.ExpressionStatement) continue;
|
|
155
|
-
if (Check.
|
|
155
|
+
if (Check.isStringLiteral(stmt.expression)) {
|
|
156
156
|
const value = stmt.expression.value;
|
|
157
157
|
if (value === "use server" && stmt.directive == null) context.report({
|
|
158
158
|
data: { name: value },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-rsc",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.7-beta.0",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for RSC related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@typescript-eslint/types": "^8.
|
|
40
|
-
"@typescript-eslint/utils": "^8.
|
|
41
|
-
"@eslint-react/ast": "5.8.
|
|
42
|
-
"@eslint-react/
|
|
43
|
-
"@eslint-react/
|
|
44
|
-
"@eslint-react/
|
|
45
|
-
"@eslint-react/
|
|
39
|
+
"@typescript-eslint/types": "^8.60.0",
|
|
40
|
+
"@typescript-eslint/utils": "^8.60.0",
|
|
41
|
+
"@eslint-react/ast": "5.8.7-beta.0",
|
|
42
|
+
"@eslint-react/core": "5.8.7-beta.0",
|
|
43
|
+
"@eslint-react/shared": "5.8.7-beta.0",
|
|
44
|
+
"@eslint-react/var": "5.8.7-beta.0",
|
|
45
|
+
"@eslint-react/eslint": "5.8.7-beta.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/react": "^19.2.15",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dedent": "^1.7.2",
|
|
51
51
|
"eslint": "^10.4.0",
|
|
52
52
|
"tsdown": "^0.22.0",
|
|
53
|
-
"typescript": "
|
|
53
|
+
"typescript": "5.9.3",
|
|
54
54
|
"@local/configs": "0.0.0",
|
|
55
55
|
"@local/eff": "3.0.0-beta.72"
|
|
56
56
|
},
|