@siberiacancode/lefthook
v1.0.2
Published
lefthook config and shared git hooks
Maintainers
Readme
🔮 lefthook
A shared lefthook configuration and git hooks. Replaces husky and lint-staged.
Installation
npm install @siberiacancode/lefthookUsage
# lefthook.yml
extends:
- node_modules/@siberiacancode/lefthook/lefthook.yml{
"scripts": {
"prepare": "lefthook install"
}
}Hooks
| hook | what it does |
| --- | --- |
| pre-commit | runs prettier and eslint on staged files |
| pre-push | asks to confirm changed tests/**/*.png screenshots |
| commit-msg | prefixes the message with <branch> <emoji> |
The emoji comes from git config user.emoji and defaults to 🧊.
Overriding
extends:
- node_modules/@siberiacancode/lefthook/lefthook.yml
pre-commit:
jobs:
- name: format
skip: true