eslint-plugin-react-rsc 5.18.6 → 5.18.8
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 +17 -6
- package/package.json +13 -13
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.18.
|
|
37
|
+
var version = "5.18.8";
|
|
38
38
|
|
|
39
39
|
//#endregion
|
|
40
40
|
//#region src/utils/create-rule.ts
|
|
@@ -537,7 +537,7 @@ function create(context) {
|
|
|
537
537
|
ExportDefaultDeclaration(node) {
|
|
538
538
|
if (!hasFileLevelUseServerDirective) return;
|
|
539
539
|
const decl = Extract.unwrap(node.declaration);
|
|
540
|
-
if (decl
|
|
540
|
+
if (Check.isIdentifier(decl)) {
|
|
541
541
|
reportNonAsyncFunction(resolve(context, decl), "file");
|
|
542
542
|
return;
|
|
543
543
|
}
|
|
@@ -627,6 +627,17 @@ const settings = { ...settings$1 };
|
|
|
627
627
|
|
|
628
628
|
//#endregion
|
|
629
629
|
//#region src/index.ts
|
|
630
|
+
function createConfig(base) {
|
|
631
|
+
return {
|
|
632
|
+
...base,
|
|
633
|
+
plugins: {
|
|
634
|
+
...base.plugins,
|
|
635
|
+
get ["react-rsc"]() {
|
|
636
|
+
return finalPlugin;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
}
|
|
630
641
|
const finalPlugin = {
|
|
631
642
|
...plugin,
|
|
632
643
|
configs: {
|
|
@@ -637,19 +648,19 @@ const finalPlugin = {
|
|
|
637
648
|
/**
|
|
638
649
|
* Enforce rules that are recommended by ESLint React for general purpose React + React DOM projects
|
|
639
650
|
*/
|
|
640
|
-
["recommended"]: recommended_exports,
|
|
651
|
+
["recommended"]: createConfig(recommended_exports),
|
|
641
652
|
/**
|
|
642
653
|
* Same as the `recommended` preset but disables rules that can be enforced by TypeScript
|
|
643
654
|
*/
|
|
644
|
-
["recommended-typescript"]: recommended_typescript_exports,
|
|
655
|
+
["recommended-typescript"]: createConfig(recommended_typescript_exports),
|
|
645
656
|
/**
|
|
646
657
|
* More strict version of the `recommended` preset
|
|
647
658
|
*/
|
|
648
|
-
["strict"]: strict_exports,
|
|
659
|
+
["strict"]: createConfig(strict_exports),
|
|
649
660
|
/**
|
|
650
661
|
* Same as the `strict` preset but disables rules that can be enforced by TypeScript
|
|
651
662
|
*/
|
|
652
|
-
["strict-typescript"]: strict_typescript_exports
|
|
663
|
+
["strict-typescript"]: createConfig(strict_typescript_exports)
|
|
653
664
|
}
|
|
654
665
|
};
|
|
655
666
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-rsc",
|
|
3
|
-
"version": "5.18.
|
|
3
|
+
"version": "5.18.8",
|
|
4
4
|
"description": "ESLint React's ESLint plugin for RSC related rules.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
"dist"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@
|
|
40
|
-
"@
|
|
41
|
-
"@eslint-react/
|
|
42
|
-
"@eslint-react/
|
|
43
|
-
"@eslint-react/
|
|
44
|
-
"@eslint
|
|
45
|
-
"@eslint
|
|
39
|
+
"@eslint-react/ast": "5.18.8",
|
|
40
|
+
"@eslint-react/core": "5.18.8",
|
|
41
|
+
"@eslint-react/eslint": "5.18.8",
|
|
42
|
+
"@eslint-react/shared": "5.18.8",
|
|
43
|
+
"@eslint-react/var": "5.18.8",
|
|
44
|
+
"@typescript-eslint/types": "^8.69.0",
|
|
45
|
+
"@typescript-eslint/utils": "^8.69.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
+
"@local/configs": "0.0.0",
|
|
49
|
+
"@local/eff": "0.0.0",
|
|
48
50
|
"@types/react": "^19.2.18",
|
|
49
|
-
"@types/react-dom": "^19.2.
|
|
51
|
+
"@types/react-dom": "^19.2.5",
|
|
50
52
|
"dedent": "^1.7.2",
|
|
51
|
-
"eslint": "^10.
|
|
53
|
+
"eslint": "^10.9.1",
|
|
52
54
|
"tsdown": "^0.22.14",
|
|
53
|
-
"typescript": "6.0.3"
|
|
54
|
-
"@local/configs": "0.0.0",
|
|
55
|
-
"@local/eff": "0.0.0"
|
|
55
|
+
"typescript": "6.0.3"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"eslint": "*",
|