-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Feature Description
Add pre-commit hooks to automatically run ESLint and Prettier on staged files before commits using Husky and lint-staged.
This ensures code quality and consistent formatting by catching issues early in the development workflow.
Motivation
Currently, linting and formatting checks rely on developers running ESLint and Prettier manually. This can lead to inconsistent formatting or lint issues being committed unintentionally.
Adding automated pre-commit checks would improve code quality and developer experience by catching issues early.
Expected Behavior
- ESLint should run with auto-fix on staged .ts files under
- Prettier should format staged source files, JSON, Markdown, and YAML
- The checks should run automatically on git commit
- Commits should be blocked if unfixable lint errors are found
- No impact on runtime, build, or production behavior
Additional Information
This can be implemented using Husky and lint-staged with the modern (v9+) Husky setup.
The checks should only run on staged files to keep commits fast.
This would be a developer-only tooling improvement.