Skip to content

trufflehq/yarn-plugin-git-hooks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

460c8f0 · Jul 31, 2023

History

11 Commits
Mar 24, 2023
Jul 31, 2023
Jul 31, 2023
Jul 31, 2023
Mar 24, 2023
Mar 24, 2023
Jul 31, 2023
Mar 24, 2023
Jul 31, 2023
Jul 31, 2023
Mar 24, 2023
Mar 24, 2023

Repository files navigation

yarn-plugin-git-hooks

Yarn Berry plugin for easy Git Hooks.

Installation

yarn plugin import https://raw.githubusercontent.com/trufflehq/yarn-plugin-git-hooks/main/bundles/%40yarnpkg/plugin-git-hooks.js

Usage

  1. 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.
  1. 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_NO_INSTALL_GITHOOKS=1.

ENV YARN_NO_INSTALL_GITHOOKS=1