A plugin to add git hooks to your project via husky. These hooks can be configured with different tasks as your project requires.
With Tool Kit already set up, install this plugin as a dev dependency:
npm install --save-dev @dotcom-tool-kit/husky-npm
And add it to your repo's .toolkitrc.yml
:
plugins:
- '@dotcom-tool-kit/husky-npm'
Install this plugin's hooks:
npx dotcom-tool-kit --install
none
Event | Description | Installed to... | Default tasks |
---|---|---|---|
git:precommit |
installs git's pre-commit hook | package.json | LintStaged |
git:commitmsg |
installs git's commit-msg hook | package.json | none |