Enhance pre-commit hook for improved linting and type checking
- Added commands to stage modified tracked files and run lint-staged for auto-fixing issues. - Included a type check step to ensure code quality before commits.
This commit is contained in:
parent
ce42664965
commit
3fe74b72dd
@ -1,4 +1,10 @@
|
|||||||
|
# Stage all modified tracked files (includes manual fixes to already-staged files)
|
||||||
|
git add -u
|
||||||
|
|
||||||
|
# Run lint-staged on staged files (checks linting, formats with prettier, and re-stages)
|
||||||
pnpm lint-staged
|
pnpm lint-staged
|
||||||
|
|
||||||
|
# Run type check
|
||||||
pnpm type-check
|
pnpm type-check
|
||||||
|
|
||||||
# Security audit is enforced in CI (`.github/workflows/security.yml`).
|
# Security audit is enforced in CI (`.github/workflows/security.yml`).
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"*.{ts,tsx,js,jsx}": ["eslint --fix", "prettier -w"],
|
"*.{ts,tsx,js,jsx}": ["eslint", "prettier -w"],
|
||||||
"*.{json,md,yml,yaml,css,scss}": ["prettier -w"]
|
"*.{json,md,yml,yaml,css,scss}": ["prettier -w"]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user