diff --git a/.husky/pre-commit b/.husky/pre-commit old mode 100644 new mode 100755 index 2312dc587..369c7b508 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1 +1,11 @@ -npx lint-staged +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +# Run tests first +npm run test || { + echo "Tests failed - commit aborted" + exit 1 +} + +# Then run lint-staged if tests pass +npx lint-staged \ No newline at end of file