mirror of
https://github.com/un-pany/v3-admin-vite.git
synced 2025-04-29 15:29:18 +08:00
perf: 减少 tsc noEmit 配置硬编码
This commit is contained in:
parent
1fa9d8c1f7
commit
5aa09b05db
@ -1,4 +1,4 @@
|
|||||||
# 全局 ts 类型检查(此操作会增加 git commit 时长)
|
# 全局 ts 类型检查(此操作会增加 git commit 时长)
|
||||||
npx vue-tsc --noEmit
|
npx vue-tsc
|
||||||
# 执行 lint-staged 中配置的任务
|
# 执行 lint-staged 中配置的任务
|
||||||
npx lint-staged
|
npx lint-staged
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
"repository": "https://github.com/un-pany/v3-admin-vite",
|
"repository": "https://github.com/un-pany/v3-admin-vite",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build:staging": "vue-tsc --noEmit && vite build --mode staging",
|
"build:staging": "vue-tsc && vite build --mode staging",
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
"build": "vue-tsc && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"lint": "eslint . --fix",
|
"lint": "eslint . --fix",
|
||||||
"prepare": "husky",
|
"prepare": "husky",
|
||||||
|
@ -23,11 +23,15 @@
|
|||||||
},
|
},
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"types": ["vite/client", "element-plus/global"],
|
"types": ["vite/client", "element-plus/global"],
|
||||||
|
// 允许导入 .ts .mts .tsx 拓展名的文件
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
// 允许 JS
|
// 允许 JS
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
// TS 严格模式
|
// TS 严格模式
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"importHelpers": true,
|
"importHelpers": true,
|
||||||
|
// 不输出任何编译后的文件,只进行类型检查
|
||||||
|
"noEmit": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user