Skip to content

Latest commit

 

History

History

git-hooks

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

@pretty-cozy/git-hooks

A pretty cozy collection of git hooks to verify commit messages and lint your code.

Setup

  1. Install the package
    npm i -D @pretty-cozy/git-hooks
  2. Add a lint-staged config to your package.json, for example:
    "lint-staged": {
      "*.{ts,tsx}": [
        "npm run lint:fix"
      ],
      "*.{json,md,html}": [
        "prettier --write"
      ]
    }
  3. Add a prepare script to your package.json to auto install the hooks on npm i:
    "scripts": {
      "prepare": "cozy-git-hooks install --quiet"
    }