@resolid/config 1.0.3 → 1.0.5
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/README.md +2 -2
- package/package.json +3 -3
- package/src/eslint.react.js +13 -1
- package/src/eslint.typescript.js +3 -0
- package/tsconfig.base.json +2 -1
package/README.md
CHANGED
|
@@ -79,6 +79,6 @@ export default [...eslintBowser, ...eslintNode];
|
|
|
79
79
|
npx eslint-flat-config-viewer
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
##
|
|
82
|
+
## 致谢
|
|
83
83
|
|
|
84
|
-
- [
|
|
84
|
+
- [ESLint Config Inspector](https://github.com/eslint/config-inspector) 用于检查和理解 ESLint 平面配置的可视化工具。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@resolid/config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Resolid 通用配置",
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@eslint/js": "^8.57.0",
|
|
30
30
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
31
|
-
"eslint-plugin-n": "^17.2.
|
|
31
|
+
"eslint-plugin-n": "^17.2.1",
|
|
32
32
|
"eslint-plugin-react": "^7.34.1",
|
|
33
33
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
34
34
|
"eslint-plugin-react-refresh": "^0.4.6",
|
|
35
35
|
"globals": "^15.0.0",
|
|
36
|
-
"typescript-eslint": "^7.
|
|
36
|
+
"typescript-eslint": "^7.7.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"eslint": "^8.57.0",
|
package/src/eslint.react.js
CHANGED
|
@@ -21,7 +21,19 @@ export default [
|
|
|
21
21
|
"warn",
|
|
22
22
|
{
|
|
23
23
|
allowConstantExport: true,
|
|
24
|
-
allowExportNames: [
|
|
24
|
+
allowExportNames: [
|
|
25
|
+
"clientAction",
|
|
26
|
+
"clientLoader",
|
|
27
|
+
"ErrorBoundary",
|
|
28
|
+
"handle",
|
|
29
|
+
"HydrateFallback",
|
|
30
|
+
"Layout",
|
|
31
|
+
"links",
|
|
32
|
+
"meta",
|
|
33
|
+
"loader",
|
|
34
|
+
"action",
|
|
35
|
+
"shouldRevalidate",
|
|
36
|
+
],
|
|
25
37
|
},
|
|
26
38
|
],
|
|
27
39
|
},
|
package/src/eslint.typescript.js
CHANGED
|
@@ -6,5 +6,8 @@ export default typescript.config(...eslintBase, ...typescript.configs.recommende
|
|
|
6
6
|
rules: {
|
|
7
7
|
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
8
8
|
"@typescript-eslint/method-signature-style": ["error", "property"],
|
|
9
|
+
"@typescript-eslint/prefer-function-type": "error",
|
|
10
|
+
"@typescript-eslint/prefer-for-of": "error",
|
|
11
|
+
"@typescript-eslint/consistent-type-imports": "error",
|
|
9
12
|
},
|
|
10
13
|
});
|
package/tsconfig.base.json
CHANGED
|
@@ -9,15 +9,16 @@
|
|
|
9
9
|
"resolveJsonModule": true,
|
|
10
10
|
"moduleDetection": "force",
|
|
11
11
|
"isolatedModules": true,
|
|
12
|
+
"verbatimModuleSyntax": true,
|
|
12
13
|
|
|
13
14
|
/* Strictness */
|
|
14
15
|
"strict": true,
|
|
15
16
|
"noFallthroughCasesInSwitch": true,
|
|
17
|
+
"noImplicitOverride": true,
|
|
16
18
|
|
|
17
19
|
/* If NOT transpiling with TypeScript: */
|
|
18
20
|
"module": "preserve",
|
|
19
21
|
"noEmit": true,
|
|
20
|
-
"verbatimModuleSyntax": true,
|
|
21
22
|
|
|
22
23
|
/* If your code runs in the DOM: */
|
|
23
24
|
"lib": ["es2022", "dom", "dom.iterable"]
|