You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement pre-commit hooks to automatically run the project's lint and format commands before each commit. This will help maintain code quality and consistency throughout the codebase.
Overview
Implement pre-commit hooks to automatically run the project's lint and format commands before each commit. This will help maintain code quality and consistency throughout the codebase.
Implementation Plan
Install required dependencies:
Add configuration to package.json:
Initialize husky:
Add a prepare script to package.json to ensure husky is installed on npm install:
Create a pre-commit hook:
pnpm husky add .husky/pre-commit "pnpm lint-staged"
Add documentation in CONTRIBUTING.md about the pre-commit hooks
Benefits
Additional Notes
The text was updated successfully, but these errors were encountered: