Skip to content
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

feat: added husky precommit hook #828

Closed
wants to merge 10 commits into from

Conversation

Samridhi-98
Copy link

Description

  • Added husky pre-commit hook
  • Updated package.json

Issue
Fixes #545

@Samridhi-98
Copy link
Author

@hugosenari please review my PR.

10 Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
.husky/pre-commit Outdated Show resolved Hide resolved
@hugosenari
Copy link
Contributor

image

shameless, copied from the link of your comments

.husky/pre-commit Outdated Show resolved Hide resolved
package.json Show resolved Hide resolved
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make it consistent on where husky is configured? Your change make commitlint running as sh, but the sh for pre-commit is now empty and moved to package.json. What's the rationale?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have used this article for implementation with minor modifications.

@ceilfors
Copy link
Collaborator

@Samridhi-98 Thanks for your contribution so far! I feel like this is an unsuitable ticket for the first ticket in this repo as I have many questions before this PR can be merged (one example is the husky version downgrade). I worry that it'll create a lot more work for you in the end. Thanks a lot for your attempt 🙏

@ceilfors ceilfors closed this Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pre-commit Prettier hook
3 participants