Skip to content

A simple demo on using husky as a Git hook on your codebase. 🐺🐾

License

Notifications You must be signed in to change notification settings

danieljancar/husky-demo

Repository files navigation

Husky Demo

Simple integration of Husky for pre-commit hooks, linting, and formatting. Showcased in a simple Angular project.


Getting Started

Prerequisites

Setting up Husky

Install Husky

npm install --save-dev husky
npx husky install

Add pre-commit hook

npx husky add .husky/pre-commit "npm run lint"

Result

When trying to commit, the pre-commit hook will build, test and lint the code. If there are any errors, the commit will be aborted.

Husky commit hook

References