Fix husky pre-commit & type check only staged (#1361)

* Fix husky pre-commit on some Windows clients

https://github.com/typicode/husky/issues/1072#issuecomment-1784006332

* Limit commit type check to staged files

Adds tsc-files package (dev only) and its config

* Remove deprecated git add from lint-staged
This commit is contained in:
filtered
2024-10-30 05:15:07 +11:00
committed by GitHub
parent 8dddffe840
commit 795e932b8f
3 changed files with 22 additions and 6 deletions

View File

@@ -1,2 +1,5 @@
npx lint-staged
npm run typecheck
if [[ "$OS" == "Windows_NT" ]]; then
npx.cmd lint-staged
else
npx lint-staged
fi