Skip to content

Commit 4b2b07c

Browse files
committed
chore(husky): run Socket pre-commit checks and speed up test step
- Invoke .git-hooks/pre-commit for Socket security checks (API keys, .DS_Store, etc.) before lint/test. - Pass --fast --skip-build to the staged test run so pre-commit stays quick now that build artifacts are reused across steps.
1 parent bb1efbd commit 4b2b07c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.husky/pre-commit

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# Optional checks - can be bypassed with --no-verify for fast local commits.
22
# Mandatory security checks run in pre-push hook.
33

4+
# Run Socket security pre-commit checks (API keys, .DS_Store, etc.).
5+
.git-hooks/pre-commit "$@"
6+
47
if [ -z "${DISABLE_PRECOMMIT_LINT}" ]; then
58
pnpm lint --staged
69
else
710
printf "Skipping lint due to DISABLE_PRECOMMIT_LINT env var\n"
811
fi
912

1013
if [ -z "${DISABLE_PRECOMMIT_TEST}" ]; then
11-
pnpm test --staged
14+
pnpm test --staged --fast --skip-build
1215
else
1316
printf "Skipping testing due to DISABLE_PRECOMMIT_TEST env var\n"
1417
fi

0 commit comments

Comments
 (0)