From 9dc18045df6c31a85776e3811a713db526494bba Mon Sep 17 00:00:00 2001 From: xpadev Date: Fri, 22 Nov 2024 10:06:41 +0900 Subject: [PATCH] fix: add typecheck to pre-commit hook --- lefthook.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lefthook.yml b/lefthook.yml index e068607e..49995c42 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -1,6 +1,10 @@ pre-commit: commands: - check: + lint: glob: "*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}" run: npx @biomejs/biome check --write --no-errors-on-unmatched --files-ignore-unknown=true --colors=off {staged_files} stage_fixed: true + typecheck: + glob: "*.{ts,tsx}" + run: npx tsc --noEmit --skipLibCheck --pretty --noErrorTruncation --skipDefaultLibCheck --project tsconfig.json + stage_fixed: true