Skip to content

Instantly share code, notes, and snippets.

Last active February 11, 2021 03:25
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Husky Configuration File
const runYarnLock = 'yarn install --frozen-lockfile';
module.exports = {
hooks: {
'post-checkout': `if [[ $HUSKY_GIT_PARAMS =~ 1$ ]]; then ${runYarnLock}; fi`,
'post-merge': runYarnLock,
'post-rebase': 'yarn install',
'pre-commit': 'yarn test && yarn lint-staged'
Copy link

budarin commented Feb 10, 2021

--frozen-lickfile should be --frozen-lockfile


husky v5 has changed a way to pass params into hook: instead of passing $HUSKY_GIT_PARAMS they pass every parameter in their variable $1 $2 ...
how tho change script for this?

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