Yarn Berry plugin for easy Git Hooks.
yarn plugin import https://raw.githubusercontent.com/trufflehq/yarn-plugin-git-hooks/main/bundles/%40yarnpkg/plugin-git-hooks.js
- Create your Git Hooks. We recommend
.github/hooks
.
Warning
Make sure they are are executable (chmod +x ./commit-msg
)!
hint: The '.github/hooks/commit-msg' hook was ignored because it's not set as executable.
- Specify the path to your Git Hooks directory in
.yarnrc.yml
:
gitHooksPath: .github/hooks
Now, every time you run yarn
(once packages are installed), your hooks will be configured.
Note
You can check the configuration succeeded with git config --get core.hookspath
.
Warning
This plugin is not compatible with Docker.
To disable, set YARN_DISABLE_GIT_HOOKS=1
.
ENV YARN_DISABLE_GIT_HOOKS=1
or