@droneey/devkit-ts-lefthook
v1.5.0
Published
Shared Lefthook configuration with composable git hooks for linting, formatting, and commit validation.
Maintainers
Readme
@droneey/devkit-ts-lefthook
Shared Lefthook configuration with composable git hooks.
Installation
bun add -d @droneey/devkit-ts-lefthook lefthookCreate lefthook.yml in your project root:
extends:
- node_modules/@droneey/devkit-ts-lefthook/configs/base.yml
- node_modules/@droneey/devkit-ts-lefthook/configs/biome.ymlbunx lefthook installConfiguration
Base
Language-agnostic hooks:
| Hook | Job | Description |
|---|---|---|
| pre-commit | validate-branch | Branch must match (feature\|fix\|hotfix)/{id}-{name} |
| commit-msg | commitlint | Validates conventional commit format (type, sentence-case, no body/footer) |
Biome
| Hook | Job | Description |
|---|---|---|
| pre-commit | biome | Runs biome check --write on staged ts,tsx,js,jsx,json,md,yaml,yml files |
Overriding
Override any named job in your lefthook.yml:
extends:
- node_modules/@droneey/devkit-ts-lefthook/configs/base.yml
- node_modules/@droneey/devkit-ts-lefthook/configs/biome.yml
pre-commit:
jobs:
- name: biome
glob: "*.{ts,tsx,js,jsx,json}"Related Packages
| Package | Description | |---|---| | @droneey/devkit-ts-biome | Biome configuration (formatter + linter) | | @droneey/devkit-ts-tsconfig | TypeScript configuration |
License
MIT
