Skip to content

Angular GIT hooks

Vojtech Mašek edited this page Jan 30, 2020 · 5 revisions

Collection of our GIT hooks

Add this to your package.json

  "husky": {
    "hooks": {
      "pre-commit": "lint-staged",
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
      "pre-push": "npm run lint && npm run test"
    }
  },
  "lint-staged": {
    "*.{js,ts,json,yaml,css,scss,md,html,component.html}": [
      "prettier --write",
      "git add"
    ]
  }
Clone this wiki locally