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
merged 3 commits into from
Sep 4, 2019
Merged

Conversation

senadir
Copy link
Contributor

@senadir senadir 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

@senadir senadir added the [Type] Build Tooling Issues or PRs related to build tooling label Sep 3, 2019
@gziolo
Copy link
Member

gziolo commented Sep 3, 2019

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

@gziolo
Copy link
Member

gziolo 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 a team September 3, 2019 11:19
Copy link
Member

@ntwb ntwb left a comment

Choose a reason for hiding this comment

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

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

@ntwb ntwb merged commit 8f3b048 into master Sep 4, 2019
@ntwb ntwb deleted the chore/update-husky branch September 4, 2019 03:53
@youknowriad youknowriad added this to the Gutenberg 6.5 milestone Sep 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants