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

Add Husky-powered pre-commit hook #178

Merged
merged 1 commit into from
Apr 13, 2022

Conversation

oogali
Copy link
Contributor

@oogali oogali commented Apr 13, 2022

PR to introduce Husky as facility for installing and executing pre-commit hooks within the project.

image

@@ -14,7 +14,8 @@
"serve": "yarn build && node config/serve.js",
"lint": "yarn eslint `find src -name '*.jsx'` `find src -name '*.js'`",
"test": "jest",
"precommit": "yarn test && yarn lint"
"precommit": "yarn test && yarn lint",
"prepare": "husky install"
Copy link
Member

Choose a reason for hiding this comment

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

Can we call this smth like husky-init

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The lifecycle script must be called prepare -- that's a special part of the Yarn lifecycle that is automatically triggered when certain things are run.

https://docs.npmjs.com/cli/v8/using-npm/scripts

Copy link
Member

@pablo-mayrgundter pablo-mayrgundter left a comment

Choose a reason for hiding this comment

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

Just a little name change. Great!

@pablo-mayrgundter pablo-mayrgundter merged commit 624ca45 into bldrs-ai:main Apr 13, 2022
OlegMoshkovich pushed a commit to OlegMoshkovich/Share that referenced this pull request Apr 27, 2022
my comment is wrong.. apparently name "prepare" is required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

2 participants