Skip to content

Latest commit

 

History

History
27 lines (24 loc) · 613 Bytes

README.md

File metadata and controls

27 lines (24 loc) · 613 Bytes

@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"
    }