Easily migrate your husky 4 config to husky 5
While it should cover most basic migrations, it's recommended to have a look at husky 5 documentation.
If you're using using npm
in your project:
npx github:typicode/husky-4-to-5 --package-manager npm
If you're using using yarn
in your project:
npx github:typicode/husky-4-to-5 --package-manager yarn
- Installs husky 5
- Installs pinst if
package.json > private
field isn'ttrue
- Creates husky 5 hooks based on husky 4 config
- Updates
package.json > scripts
husky-4-to-5
will not remove old config files (.huskyrc*
) or package.json > husky
field.
If there was error during the process, you can clean things up by running:
rm -rf .husky && git config --unset core.hooksPath