-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve developer experience by automatically linting commits #1105
Labels
Comments
samayer12
added
enhancement
New feature or request
good first issue
Good for newcomers
labels
Aug 29, 2024
@samayer12 I would like to work on this |
Sounds good @itsarijitray , it is assigned to you. Let us know if you have any questions. Please also keep the command |
Sure. Thanks!!! |
5 tasks
5 tasks
btlghrants
added a commit
that referenced
this issue
Sep 20, 2024
## Description This PR introduces a .husky pre-commit to lint codes before `git commit` command. The pre-commit hook executes the existing `npx lint-staged` script to lint code. ## Related Issue Relates to #1105 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [x] Other (security config, docs update, etc) ## Checklist before merging - [ ] Unit, [Journey](https://github.com/defenseunicorns/pepr/tree/main/journey), [E2E Tests](https://github.com/defenseunicorns/pepr-excellent-examples), [docs](https://github.com/defenseunicorns/pepr/tree/main/docs), [adr](https://github.com/defenseunicorns/pepr/tree/main/adr) added or updated as needed - [x] [Contributor Guide Steps](https://docs.pepr.dev/main/contribute/#submitting-a-pull-request) followed Co-authored-by: Barrett <[email protected]>
fixed and merged thanks @itsarijitray |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
Contributors are directed to run
npm run format:fix
before committing to ensure code standards are met. This is fine, but we could completely automate that step by using a tool like Husky to enforce an automatic "lint on commit" that works out of the box without additional developer setup.Describe the solution you'd like
git commit
Describe alternatives you've considered
We could let contributors remember to run
npm run format:fix
, which will be caught by CI.We could use some other git hook management tool, or provide more manual instructions to setup that workflow automation.
Additional context
Husky docs.
Implementation guide for using lint-staged as a pre-commit hook with Husky.
The text was updated successfully, but these errors were encountered: