Stage and commit
Git determines what goes into a commit. Stage the changes you want first, then choose either a guided prompt or a message you write yourself.
git add src/example.tsnpx lintlane commit| Command | Result |
|---|---|
npx lintlane commit |
Start Commitizen’s guided prompt and create a commit. |
npx lintlane c |
Alias for commit. |
npx lintlane commit --dry-run |
Use Commitizen’s dry-run mode without creating a commit. |
npx lintlane commit --retry |
Reuse the last message after a failed commit. |
npx lintlane commit -a |
Stage tracked changes before committing. |
npx lintlane commit --signoff |
Add a sign-off through Commitizen. |
npx lintlane commit -- -n |
Pass Git’s hook bypass option for this commit. |
npx lintlane commit -- -S |
Pass -S to Git to sign the commit. |
git commit |
Use the hook-based guided prompt when eligible. |
git commit -m "feat: add search" |
Supply a message directly; commitlint still validates it. |
Arguments after -- go to Git. Commitizen’s --signoff and Git’s signing
option -- -S have different purposes.
The hook sequence during a normal commit is:
pre-commit→ lint-staged → Biome: check and fix staged files using the configured lint-staged tasks. Its default task isbiome check --write --no-errors-on-unmatched --files-ignore-unknown=true. lint-staged manages partially staged files and restores state when tasks fail.prepare-commit-msg→ Commitizen, when needed: prompt on a plaingit commit. Skip the prompt for a supplied message, merge, amend, CI, Windows, missing terminal, orLINTLANE_NO_PROMPT=1. Withlintlane commit, the guided message has already been collected.commit-msg→ commitlint: validate the completed message; reject the commit if it violates the configured rules.
Commitizen helps compose the message; commitlint enforces the rules. Optional
lintlane.commit settings such as types, messageLengthLimit, and
allowedPrefixes affect Lintlane’s commitlint preset. Customize the Commitizen
adapter separately to change the prompt.
What a Conventional Commit looks like
Section titled “What a Conventional Commit looks like”feat(search): add keyboard navigationfix: preserve partially staged changeschore: update development dependenciesThe type describes the kind of change, the optional scope identifies the area, and the description explains the change. Commitizen helps you assemble these fields; commitlint checks the resulting message against your configured rules.
Configure message validation
Section titled “Configure message validation”Rules come from commitlint.config.mjs, which by default is
export { default } from "lintlane/commitlint": Conventional Commits, plus the
optional block below. Replace the file with your own config any time.
{ "lintlane": { "commit": { "types": ["feat", "fix", "chore"], "messageLengthLimit": 72, "allowedPrefixes": ["WIP"] } }}The guided prompt is Commitizen’s standard cz-conventional-changelog
(config.commitizen.path = "lintlane/presets/commitizen.cjs"); configure it like
any Commitizen adapter.