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
Currently, the project uses ESLint, but there are no Git hooks to enforce linting before commits. Additionally, Prettier is proposed in an open PR (#301) but has not yet been merged. Without Git hooks, contributors might commit unformatted or non-linted code, leading to inconsistencies in the codebase.
Adding Husky will ensure that:
ESLint runs before every commit.
Once Prettier is merged, it can be included in the hook to enforce consistent formatting.
To address this, Husky can be integrated into the project to manage Git hooks, ensuring automated checks before commits. By configuring Husky alongside lint-staged, we can enforce ESLint rules on staged files, maintaining code consistency and quality. Additionally, a pre-commit hook will be added to run TypeScript type checks and unit tests, preventing broken code from entering the repository. Once Prettier is merged, we can extend the hook to include formatting checks. This approach streamlines the development workflow while reducing the likelihood of linting or formatting issues in committed code.
Context
This change will prevent contributors from committing incorrectly linted code.
It will help maintain consistent code quality across the project.
The use of lint-staged ensures that only staged files are checked, keeping the process fast and efficient.
Detailed Description
Add Husky for managing Git hooks.
Configure ESLint to run via lint-staged on pre-commit.
Add a pre-commit hook to check TypeScript and run tests.
Feature Request 🛍️
Add Husky for Pre-Commit Hooks
Use Case
Currently, the project uses ESLint, but there are no Git hooks to enforce linting before commits. Additionally, Prettier is proposed in an open PR (#301) but has not yet been merged. Without Git hooks, contributors might commit unformatted or non-linted code, leading to inconsistencies in the codebase.
Adding Husky will ensure that:
Possible Solution
To address this, Husky can be integrated into the project to manage Git hooks, ensuring automated checks before commits. By configuring Husky alongside lint-staged, we can enforce ESLint rules on staged files, maintaining code consistency and quality. Additionally, a pre-commit hook will be added to run TypeScript type checks and unit tests, preventing broken code from entering the repository. Once Prettier is merged, we can extend the hook to include formatting checks. This approach streamlines the development workflow while reducing the likelihood of linting or formatting issues in committed code.
Context
Detailed Description
The text was updated successfully, but these errors were encountered: