Add pre-commit hooks to enforce linting before commits #3462
MuzzaiyyanHussain
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Run lint/format checks before commit
Prevent invalid or inconsistent code from being committed
Reduce CI failures and improve code consistency
Background
Currently, linting and formatting are not enforced before commits, which can lead to CI failures and inconsistent code. Many projects solve this by using pre-commit hooks (e.g., Husky) to run checks locally. Since this repository already uses Biome, adding a pre-commit step would ensure consistent code quality without relying on manual checks.
Proposal
Add pre-commit hooks using Husky + lint-staged to run Biome checks on staged files before commits. This ensures consistent code quality and reduces CI failures.
I can implement this and open a PR if approved.
Beta Was this translation helpful? Give feedback.
All reactions