diff --git a/.husky/pre-commit b/.husky/pre-commit index acc73c21..f0f5bb37 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,4 +2,5 @@ . "$(dirname "$0")/_/husky.sh" npx lint-staged -node ./scripts/build.mjs --type \ No newline at end of file + +pnpm --filter "@tmagic/*" check:type diff --git a/packages/cli/package.json b/packages/cli/package.json index fb085d53..be6f7513 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -6,7 +6,8 @@ "license": "Apache-2.0", "scripts": { "build": "pnpm clean && tsc -b tsconfig.build.json", - "clean": "rimraf lib *.tsbuildinfo" + "clean": "rimraf lib *.tsbuildinfo", + "check:type": "tsc --noEmit --project tsconfig.build.json" }, "bin": { "tmagic": "bin/tmagic.js" diff --git a/packages/core/package.json b/packages/core/package.json index 03c5f350..a37fddeb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -24,6 +24,7 @@ "scripts": { "build": "npm run build:type && vite build", "build:type": "npm run clear:type && tsc --declaration --emitDeclarationOnly --project tsconfig.build.json", + "check:type": "tsc --noEmit --project tsconfig.build.json", "clear:type": "rimraf ./types" }, "engines": { diff --git a/packages/data-source/package.json b/packages/data-source/package.json index 6c06b249..9f6cd457 100644 --- a/packages/data-source/package.json +++ b/packages/data-source/package.json @@ -20,6 +20,7 @@ "scripts": { "build": "npm run build:type && vite build --mode=es && vite build --mode=umd", "build:type": "npm run clear:type && tsc --declaration --emitDeclarationOnly --project tsconfig.build.json && tsc-alias -p tsconfig.build.json", + "check:type": "tsc --noEmit --project tsconfig.build.json", "clear:type": "rimraf ./types" }, "engines": { diff --git a/packages/dep/package.json b/packages/dep/package.json index ed7ba96e..4a460c39 100644 --- a/packages/dep/package.json +++ b/packages/dep/package.json @@ -20,6 +20,7 @@ "scripts": { "build": "npm run build:type && vite build", "build:type": "npm run clear:type && tsc --declaration --emitDeclarationOnly --project tsconfig.build.json", + "check:type": "tsc --noEmit --project tsconfig.build.json", "clear:type": "rimraf ./types" }, "engines": { diff --git a/packages/design/package.json b/packages/design/package.json index fb08ce98..83bb00f0 100644 --- a/packages/design/package.json +++ b/packages/design/package.json @@ -21,7 +21,7 @@ "build": "npm run build:type && vite build", "build:type": " vue-tsc --declaration --emitDeclarationOnly --project tsconfig.build.json", "clear:type": "rimraf ./types", - "type:check": "vue-tsc --noEmit" + "check:type": "vue-tsc --noEmit --project tsconfig.build.json" }, "engines": { "node": ">=18" diff --git a/packages/editor/package.json b/packages/editor/package.json index d6cfc6ce..7cd62cdd 100644 --- a/packages/editor/package.json +++ b/packages/editor/package.json @@ -27,7 +27,7 @@ "build": "npm run build:type && vite build", "build:type": "npm run clear:type && vue-tsc --declaration --emitDeclarationOnly --project tsconfig.build.json && tsc-alias -p tsconfig.build.json", "clear:type": "rimraf ./types", - "type:check": "vue-tsc --noEmit" + "check:type": "vue-tsc --noEmit --project tsconfig.build.json" }, "engines": { "node": ">=18" diff --git a/packages/element-plus-adapter/package.json b/packages/element-plus-adapter/package.json index e77777e4..8870d0b5 100644 --- a/packages/element-plus-adapter/package.json +++ b/packages/element-plus-adapter/package.json @@ -20,7 +20,8 @@ "scripts": { "build": "npm run build:type && vite build", "build:type": "npm run clear:type && tsc --declaration --emitDeclarationOnly --project tsconfig.build.json", - "clear:type": "rimraf ./types" + "clear:type": "rimraf ./types", + "check:type": "tsc --noEmit --project tsconfig.build.json" }, "engines": { "node": ">=18" diff --git a/packages/form/package.json b/packages/form/package.json index 0feb52ee..838e9970 100644 --- a/packages/form/package.json +++ b/packages/form/package.json @@ -27,7 +27,7 @@ "build": "npm run build:type && vite build", "build:type": "npm run clear:type && vue-tsc --declaration --emitDeclarationOnly --project tsconfig.build.json", "clear:type": "rimraf ./types", - "type:check": "vue-tsc --noEmit" + "check:type": "vue-tsc --noEmit --project tsconfig.build.json" }, "engines": { "node": ">=18" diff --git a/packages/schema/package.json b/packages/schema/package.json index d18b3104..839a3a0d 100644 --- a/packages/schema/package.json +++ b/packages/schema/package.json @@ -17,7 +17,8 @@ "scripts": { "build": "npm run build:type && vite build", "build:type": "npm run clear:type && tsc --declaration --emitDeclarationOnly --project tsconfig.build.json", - "clear:type": "rimraf ./types" + "clear:type": "rimraf ./types", + "check:type": "tsc --noEmit --project tsconfig.build.json" }, "engines": { "node": ">=18" diff --git a/packages/stage/package.json b/packages/stage/package.json index c5b8cd83..e641a8dd 100644 --- a/packages/stage/package.json +++ b/packages/stage/package.json @@ -20,7 +20,8 @@ "scripts": { "build": "npm run build:type && vite build", "build:type": "npm run clear:type && tsc --declaration --emitDeclarationOnly --project tsconfig.build.json", - "clear:type": "rimraf ./types" + "clear:type": "rimraf ./types", + "check:type": "tsc --noEmit --project tsconfig.build.json" }, "engines": { "node": ">=18" diff --git a/packages/table/package.json b/packages/table/package.json index da189f36..d98ada79 100644 --- a/packages/table/package.json +++ b/packages/table/package.json @@ -25,7 +25,7 @@ "build": "npm run build:type && vite build", "build:type": "npm run clear:type && vue-tsc --declaration --emitDeclarationOnly --project tsconfig.build.json", "clear:type": "rimraf ./types", - "type:check": "vue-tsc --noEmit" + "check:type": "vue-tsc --noEmit --project tsconfig.build.json" }, "engines": { "node": ">=18" diff --git a/packages/tdesign-vue-next-adapter/package.json b/packages/tdesign-vue-next-adapter/package.json index 037da552..b8a11b6e 100644 --- a/packages/tdesign-vue-next-adapter/package.json +++ b/packages/tdesign-vue-next-adapter/package.json @@ -21,7 +21,7 @@ "build": "npm run build:type && vite build", "build:type": "npm run clear:type && tsc --declaration --emitDeclarationOnly --project tsconfig.build.json", "clear:type": "rimraf ./types", - "type:check": "vue-tsc --noEmit" + "check:type": "tsc --noEmit --project tsconfig.build.json" }, "engines": { "node": ">=18" diff --git a/packages/utils/package.json b/packages/utils/package.json index 1e8fa23e..313ed22b 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -20,7 +20,8 @@ "scripts": { "build": "rimraf ./dist && npm run build:type && vite build --mode=es && vite build --mode=umd", "build:type": "npm run clear:type && tsc --declaration --emitDeclarationOnly --project tsconfig.build.json", - "clear:type": "rimraf ./types" + "clear:type": "rimraf ./types", + "check:type": "tsc --noEmit --project tsconfig.build.json" }, "engines": { "node": ">=18"