diff --git a/.husky/pre-commit b/.husky/pre-commit index 3d471b4e..b7dc5230 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,7 @@ #!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" -cd ui/desktop && npx lint-staged \ No newline at end of file +# Only auto-format desktop TS code if relevant files are modified +if git diff --cached --name-only | grep -q "^ui/desktop/"; then + . "$(dirname -- "$0")/_/husky.sh" + cd ui/desktop && npx lint-staged +fi \ No newline at end of file