From ebc80a4e61312e15a7d767c1b4505ab977865666 Mon Sep 17 00:00:00 2001 From: "Mr.Z" Date: Sat, 16 Dec 2023 15:15:39 +0800 Subject: [PATCH] chore: add `typecheck` to ci can't use lint-staged lint-staged/lint-staged#468 check all files try fixed microsoft/TypeScript#27379 microsoft/TypeScript#49817 as an alternative https://github.com/gustavopch/tsc-files --- .github/workflows/ci.yml | 3 +++ package.json | 3 ++- packages/vue/__tests__/fixtures/index.ts | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc7c3ed..b2fdab5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,9 @@ jobs: - run: pnpm install + - name: Run typecheck + run: npm run typecheck + - name: Run unit tests run: npm run test -- --package-name '*' diff --git a/package.json b/package.json index a86ba91..730e1e2 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "update:try": "npm run update -- --no-dry-run --no-commit --no-push --no-test", "release:try": "npm run release -- --no-dry-run --no-publish --no-push --no-tag --no-commit", "bin:link": "cd ./packages/cli && npm link", - "bin:unlink": "cd ./packages/cli && npm unlink -g" + "bin:unlink": "cd ./packages/cli && npm unlink -g", + "typecheck": "tsc --noEmit --skipLibCheck" }, "scripts-info": { "init": "首次安装", diff --git a/packages/vue/__tests__/fixtures/index.ts b/packages/vue/__tests__/fixtures/index.ts index ab8dc07..f75273b 100644 --- a/packages/vue/__tests__/fixtures/index.ts +++ b/packages/vue/__tests__/fixtures/index.ts @@ -1,3 +1,4 @@ +// @ts-nocheck import App from './app.vue'; export { App };