Problem
Every git commit shows:
husky - DEPRECATED
Please remove the following two lines from .husky/pre-commit:
#!/usr/bin/env sh
. "\$(dirname -- "\$0")/_/husky.sh"
They WILL FAIL in v10.0.0
The .husky/pre-commit file uses husky v9 header syntax. Husky v10 (upcoming) will break this.
Fix
Remove these two lines from .husky/pre-commit:
#!/usr/bin/env sh
. "\$(dirname -- "\$0")/_/husky.sh"
Husky v9+ with modern config only needs the hook commands, not the shell sourcing.
Current pre-commit content
#!/usr/bin/env sh
. "\$(dirname -- "\$0")/_/husky.sh"
echo "Running pre-commit checks..."
npx lint-staged
echo "Running unit tests..."
npm run test:unit
echo "Pre-commit checks passed!"
After fix
echo "Running pre-commit checks..."
npx lint-staged
echo "Running unit tests..."
npm run test:unit
echo "Pre-commit checks passed!"
Priority: P2 (will break in husky v10 but not blocking now)
Refs: Noticed during fix/1-auth-issue-database-runtime-crashes