-
Notifications
You must be signed in to change notification settings - Fork 61
Closed as not planned
Description
Is your feature request related to a problem? Please describe.
Currently, the project doesn't have pre-commit hooks configured, which means linting and formatting checks aren't automatically run before commits. This allows inconsistent code style and potential issues to be committed to the repository. Developers might forget to run linting or formatting scripts manually before committing, which can lead to:
- Inconsistent code formatting across the codebase
- Linting errors making it into the codebase
- Extra review cycles needed to fix styling issues
Describe the solution you'd like
I propose adding pre-commit hooks using Husky and lint-staged to automatically run the existing linting and formatting tools before each commit.
Specifically:
- Install Husky and lint-staged as dev dependencies
- Configure Husky to run lint-staged on pre-commit
- Configure lint-staged to run:
- ESLint on JavaScript/TypeScript files (using the existing
lint:ts
script) - Prettier on all supported files (using the existing
format
script) - markdownlint on Markdown files (using the existing
lint:md
script)
- ESLint on JavaScript/TypeScript files (using the existing
Describe alternatives you've considered
- CI-only checks: We could rely solely on CI checks to catch these issues, but this increases the feedback loop time and can lead to more back-and-forth during PR reviews.
- Documentation only: We could simply document that developers should run linting/formatting manually, but this relies on developers remembering to do so and is error-prone.
Hey @pikurasa if you are okay with above feature request then I would like to work on it?
thanks
Metadata
Metadata
Assignees
Labels
No labels