From 01f927bf5ffdb65d873a3720bc26a6f255e04a09 Mon Sep 17 00:00:00 2001 From: Innei Date: Tue, 10 Feb 2026 23:38:37 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20fix:=20update=20pre-commit=20hoo?= =?UTF-8?q?k=20to=20conditionally=20run=20type-check=20on=20dev=20and=20ma?= =?UTF-8?q?in=20branches?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .husky/pre-commit | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index b1c7670b7b..67538d4f4a 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,2 +1,5 @@ -npm run type-check +BRANCH=$(git branch --show-current) +if [ "$BRANCH" = "dev" ] || [ "$BRANCH" = "main" ]; then + npm run type-check +fi npx --no-install lint-staged