Skip to content

feature: pre-commit hooks #2249

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

Merged
merged 2 commits into from
Jun 12, 2018
Merged

feature: pre-commit hooks #2249

merged 2 commits into from
Jun 12, 2018

Conversation

byzyk
Copy link
Member

@byzyk byzyk commented Jun 11, 2018

As per discussion in #2226

@byzyk byzyk changed the title Feature: pre-commit hooks feature: pre-commit hooks Jun 11, 2018
package.json Outdated
@@ -39,6 +39,11 @@
"test": "npm run lint",
"sitemap": "cd build && sitemap-static --prefix=https://webpack.js.org/ > sitemap.xml"
},
"husky": {
"hooks": {
"pre-commit": "yarn test"
Copy link
Member Author

Choose a reason for hiding this comment

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

@montogeek as per our discussion in another PR I guess we should revert to npm run here as well before merging

@byzyk
Copy link
Member Author

byzyk commented Jun 12, 2018

This one is ready to go.

@montogeek
Copy link
Member

What is the difference between this husky release candidate and the last stable one?

@byzyk
Copy link
Member Author

byzyk commented Jun 12, 2018

In the RC version, you define hooks in the separate husky object. In previous stable version hooks were part of scripts. Not sure if there are any other improvements like performance etc but this is what they recommend to install now.

Here is the full changelog.

@montogeek montogeek merged commit dfaa4a8 into webpack:master Jun 12, 2018
@montogeek
Copy link
Member

Thanks!

@byzyk byzyk deleted the feature/git-hooks branch June 12, 2018 08:40
@montogeek
Copy link
Member

@byzyk If you have time, please add lint-staged too. We are losing time checking for files that shouldn't be linted, for example, bash scripts.

@byzyk
Copy link
Member Author

byzyk commented Jul 18, 2018

@montogeek sure man! will pick it up at the earliest, shouldn't take much time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants