diff --git a/.husky/pre-commit b/.husky/pre-commit index a5a29d9..3c9dae4 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1,9 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -pnpm lint-staged +repo_root="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)" +cd "$repo_root" + +# Anchor lint-staged to this repo so commits launched from a parent workspace +# still resolve local tooling and config from the-order. +"$repo_root/node_modules/.bin/lint-staged" --cwd "$repo_root"