@zpcscc/configs 3.0.0 → 3.0.2
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/package.json +30 -31
- package/tsconfig/tsconfig.json +52 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@zpcscc/configs",
|
3
|
-
"version": "3.0.
|
3
|
+
"version": "3.0.2",
|
4
4
|
"description": "项目通用配置",
|
5
5
|
"keywords": [
|
6
6
|
"commitlint",
|
@@ -27,59 +27,58 @@
|
|
27
27
|
"types"
|
28
28
|
],
|
29
29
|
"scripts": {
|
30
|
-
"build": "father build",
|
30
|
+
"build": "father build && mkdir -p dist/tsconfig && cp src/tsconfig/tsconfig.json dist/tsconfig/",
|
31
31
|
"build:watch": "father dev",
|
32
32
|
"commit": "git add . && git-cz",
|
33
33
|
"deploy": "pnpm run docs:build && pnpm run docs:deploy",
|
34
34
|
"dev": "dumi dev",
|
35
35
|
"docs:build": "dumi build",
|
36
36
|
"docs:deploy": "gh-pages -d docs-dist",
|
37
|
-
"
|
38
|
-
"prepublishOnly": "father doctor && pnpm run build && cp -r ./dist/* . && rm -rf dist",
|
37
|
+
"prepublishOnly": "pnpm run build && cp -r ./dist/* . && rm -rf dist",
|
39
38
|
"postpublish": "git clean -fd",
|
40
39
|
"start": "dumi dev"
|
41
40
|
},
|
42
41
|
"dependencies": {
|
43
|
-
"@babel/core": "7.25.
|
44
|
-
"@babel/plugin-syntax-flow": "7.
|
45
|
-
"@babel/plugin-transform-react-jsx": "7.25.
|
46
|
-
"@babel/runtime": "7.25.
|
47
|
-
"@commitlint/cz-commitlint": "19.
|
48
|
-
"@types/node": "22.
|
49
|
-
"@types/react": "18.3.
|
50
|
-
"@types/react-dom": "18.3.
|
51
|
-
"@typescript-eslint/eslint-plugin": "8.
|
52
|
-
"@typescript-eslint/parser": "8.
|
53
|
-
"commitizen": "4.3.
|
42
|
+
"@babel/core": "7.25.9",
|
43
|
+
"@babel/plugin-syntax-flow": "7.25.9",
|
44
|
+
"@babel/plugin-transform-react-jsx": "7.25.9",
|
45
|
+
"@babel/runtime": "7.25.9",
|
46
|
+
"@commitlint/cz-commitlint": "19.5.0",
|
47
|
+
"@types/node": "22.7.9",
|
48
|
+
"@types/react": "18.3.12",
|
49
|
+
"@types/react-dom": "18.3.1",
|
50
|
+
"@typescript-eslint/eslint-plugin": "8.11.0",
|
51
|
+
"@typescript-eslint/parser": "8.11.0",
|
52
|
+
"commitizen": "4.3.1",
|
54
53
|
"eslint": "8.57.0",
|
55
54
|
"eslint-config-prettier": "9.1.0",
|
56
55
|
"eslint-config-standard": "17.1.0",
|
57
|
-
"eslint-import-resolver-typescript": "3.6.
|
56
|
+
"eslint-import-resolver-typescript": "3.6.3",
|
58
57
|
"eslint-plugin-eslint-comments": "3.2.0",
|
59
|
-
"eslint-plugin-import": "2.
|
60
|
-
"eslint-plugin-jsx-a11y": "6.
|
58
|
+
"eslint-plugin-import": "2.31.0",
|
59
|
+
"eslint-plugin-jsx-a11y": "6.10.1",
|
61
60
|
"eslint-plugin-prettier": "5.2.1",
|
62
61
|
"eslint-plugin-promise": "6.6.0",
|
63
|
-
"eslint-plugin-react": "7.
|
64
|
-
"eslint-plugin-react-hooks": "
|
65
|
-
"eslint-plugin-unicorn": "
|
62
|
+
"eslint-plugin-react": "7.37.2",
|
63
|
+
"eslint-plugin-react-hooks": "5.0.0",
|
64
|
+
"eslint-plugin-unicorn": "56.0.0",
|
66
65
|
"inquirer": "9.3.5",
|
67
|
-
"postcss": "8.4.
|
66
|
+
"postcss": "8.4.47",
|
68
67
|
"prettier": "3.3.3",
|
69
|
-
"prettier-plugin-organize-imports": "4.
|
70
|
-
"prettier-plugin-packagejson": "2.5.
|
71
|
-
"typescript": "5.
|
68
|
+
"prettier-plugin-organize-imports": "4.1.0",
|
69
|
+
"prettier-plugin-packagejson": "2.5.3",
|
70
|
+
"typescript": "5.6.3"
|
72
71
|
},
|
73
72
|
"devDependencies": {
|
74
|
-
"dumi": "2.4.
|
75
|
-
"father": "4.5.
|
76
|
-
"gh-pages": "6.
|
73
|
+
"dumi": "2.4.13",
|
74
|
+
"father": "4.5.1",
|
75
|
+
"gh-pages": "6.2.0",
|
77
76
|
"react": "18.3.1",
|
78
77
|
"react-dom": "18.3.1",
|
79
78
|
"react-is": "18.3.1",
|
80
|
-
"styled-components": "6.1.
|
81
|
-
"tslib": "2.
|
82
|
-
"webpack": "5.
|
79
|
+
"styled-components": "6.1.13",
|
80
|
+
"tslib": "2.8.0",
|
81
|
+
"webpack": "5.95.0"
|
83
82
|
},
|
84
83
|
"publishConfig": {
|
85
84
|
"access": "public",
|
@@ -0,0 +1,52 @@
|
|
1
|
+
// 官方文档 https://www.typescriptlang.org/tsconfig
|
2
|
+
{
|
3
|
+
// 从外部引用的基础配置
|
4
|
+
"compilerOptions": {
|
5
|
+
// 启用后,会开启ts所有的严格检查,可在下方单独某项进行关闭;
|
6
|
+
"strict": true,
|
7
|
+
// 启用后,TypeScript 将检查函数中的所有代码路径以确保它们返回值;
|
8
|
+
"noImplicitReturns": true,
|
9
|
+
// 启用后,不允许使用any;
|
10
|
+
"noImplicitAny": false,
|
11
|
+
// 设置项目的模块类型
|
12
|
+
"module": "ESNext",
|
13
|
+
// 控制 JSX 在 JavaScript 文件中的输出方式。 这只影响 .tsx 文件的 JS 文件输出;
|
14
|
+
"jsx": "react-jsx",
|
15
|
+
// 指定模块的解析策略.
|
16
|
+
"moduleResolution": "Node",
|
17
|
+
// 指定编译后的版本。编译后的代码需要在什么版本的环境下运行
|
18
|
+
"target": "ESNext",
|
19
|
+
// 提供全局的ts类型api
|
20
|
+
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
21
|
+
// 模块导入修复。启用此项会自动启用 allowSyntheticDefaultImports
|
22
|
+
"esModuleInterop": true,
|
23
|
+
// 为你工程中的每个 TypeScript 或 JavaScript 文件生成 .d.ts 文件。
|
24
|
+
"declaration": true,
|
25
|
+
// 跳过声明文件的类型检查
|
26
|
+
"skipLibCheck": true,
|
27
|
+
// 解析json模块,允许导入带有“.json”扩展名的模块
|
28
|
+
"resolveJsonModule": true,
|
29
|
+
// 只发出.d.ts文件;不发出.js文件。仅用作导出ts类型时开启;
|
30
|
+
"emitDeclarationOnly": false,
|
31
|
+
// 在文件名中强制使用一致的大小写
|
32
|
+
"forceConsistentCasingInFileNames": true,
|
33
|
+
// 启用生成 sourcemap files;这些文件允许调试器和其他工具在使用实际生成的 JavaScript 文件时,显示原始的 TypeScript 代码。
|
34
|
+
"sourceMap": true,
|
35
|
+
// 报告未使用的局部变量的错误。建议开启
|
36
|
+
"noUnusedLocals": true,
|
37
|
+
// 严格的空检查;建议开启,方便提示某字段可能为null,undefined,false等情况
|
38
|
+
"strictNullChecks": true,
|
39
|
+
// 启用对装饰器的实验性支持
|
40
|
+
"experimentalDecorators": true,
|
41
|
+
// 允许默认全部导出,而不是 * as newName的形式
|
42
|
+
"allowSyntheticDefaultImports": true,
|
43
|
+
// 开启后,所有的文件都应是模块
|
44
|
+
"isolatedModules": false
|
45
|
+
// 模块导入修复。启用此项会自动启用 allowSyntheticDefaultImports // ts 5.0后才支持。
|
46
|
+
// "verbatimModuleSyntax": true
|
47
|
+
// 允许在项目中导入js文件
|
48
|
+
// "allowJs": true,
|
49
|
+
// 为js文件提供类型检查,与allowJs配合使用。开启后,需要同时配置 outDir
|
50
|
+
// "checkJs": true,
|
51
|
+
}
|
52
|
+
}
|