Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.07 KB

0002-use-husky-for-git-hooks.md

File metadata and controls

45 lines (31 loc) · 1.07 KB

Use husky for git hooks

  • Date: 2018-06-19

Context and Problem Statement

Handling and applying git hooks is a common tasks in most projects. Keeping the handling (esp. installation) of git hooks is however mosten an complicated matter.

Considered Options

  • do not add tooling for supporting git hooks
  • provide a custom node script + templates for installing hooks
  • use husky

Choosen Option

Use husky for installing and configuring git hooks

Reasons

  • provides an painless and consistent approach to handling git hooks
  • well documented, adopted and maintained
  • easily configurable

Background information

husky

[example | description | pointer to more information | …]

  • husky
  • configuration example
{
  "husky": {
    "hooks": {
      "commit-msg": "npm run commitlint",
      "push": "npm run lint"
    }
  }
}