@spellbookx/lefthook
v0.1.0
Published
Shared Lefthook configurations for common tools (ESLint, Prettier, TypeScript, Vitest, Jest) and multiple package managers (npx, bun, yarn dlx, pnpm dlx).
Maintainers
Readme
@spellbookx/lefthook
Shared Lefthook configurations for common tools and package managers.
Usage
In your lefthook.yml:
remote:
git:
url: https://github.com/spellbookx/lefthook
ref: main
configs:
- @commit-msg/npx-commitlint.yml
- @pre-commit/npx-eslint-prettier-tsc.ymlAvailable Configurations
Replace npx with your preferred runner: npx, bunx, yarndlx, pnpmdlx.
Commit Message
@commit-msg/{runner}-commitlint.yml: Lints commit messages usingcommitlint.
Pre-commit
@pre-commit/{runner}-eslint.yml: Runseslint --fix.@pre-commit/{runner}-prettier.yml: Runsprettier --write.@pre-commit/{runner}-eslint-prettier.yml: Runs botheslintandprettier.@pre-commit/{runner}-tsc.yml: Runstsc --noEmit.@pre-commit/{runner}-eslint-prettier-tsc.yml: Runs all three.
Pre-push
@pre-push/{runner}-vitest.yml: Runsvitest run.@pre-push/{runner}-jest.yml: Runsjest.
Runners
npx: Node.js package executorbunx: Bun'sbun xyarndlx: Yarn'syarn dlxpnpmdlx: pnpm'spnpm dlx
