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

Update Husky & Lint-staged to the latest versions #17310

merged 3 commits into from Sep 4, 2019


Copy link

commented Sep 3, 2019

This PR updates both Husky & Lint-staged to the latest versions, it also moves the hooks scripts of the script object to its own husky.hooks object

Starting from version 1.0.0 Husky has been rewritten from scratch, new stuff has changed:

  • hooks are now defined in a separate husky entry in the package file, for better separation, this is required in the new version.
  • it uses raw hooks names, so pre-commit rather then precommit
  • it has a support for a .huskyrc file
  • there are new environment variables, HUSKY_SKIP_INSTALL to skip installing the hooks
  • pass stdin arguments to the hooks via HUSKY_GIT_STDIN
  • more improvements in error messages, coloring & package support

full changelog here

lint-staged was tagged along, here is the changelog


This comment has been minimized.

Copy link

commented Sep 3, 2019

Can you elaborate more on the need to add husky entry in the package.json file?


This comment has been minimized.

Copy link

commented Sep 3, 2019

Cool, thanks for updating the description. It all looks great. It needs some testing before we can merge 👍

@gziolo gziolo requested a review from WordPress/gutenberg-core Sep 3, 2019
ntwb approved these changes Sep 4, 2019
Copy link

left a comment

This looks good to me, Husky config matches my other repos Husky usage

@ntwb ntwb merged commit 8f3b048 into master Sep 4, 2019
2 checks passed
2 checks passed
Travis CI - Pull Request Build Passed
@ntwb ntwb deleted the chore/update-husky branch Sep 4, 2019
@youknowriad youknowriad added this to the Gutenberg 6.5 milestone Sep 14, 2019
dd32 pushed a commit to dd32/gutenberg that referenced this pull request Sep 27, 2019
* update husky

* test hooks

* update lint-staged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.