Install and configure
Set up Lintlane once per project. It detects your package manager and project type, adds missing pieces, and keeps configuration you already maintain.
Run inside a Git repository with package.json. Node.js 22 or newer is required.
Examples use npx; use pnpm dlx, yarn dlx, or bunx for initial setup if
preferred. After installation, you can use pnpm exec lintlane,
yarn lintlane, or bunx lintlane for the same commands.
npx lintlane init --dry-runnpx lintlane initnpx lintlane doctorinit installs missing dependencies and adds missing configuration. Existing
configuration is preserved. Unmodified older Lintlane hooks can be upgraded;
edited hooks are reported and left alone. Running lintlane without a command
also defaults to init.
| Setup option | Purpose |
|---|---|
init --dry-run |
Preview actions without changing files or installing packages. |
init --preset base |
Use recommended rules with the React domain. |
init --preset strict |
Use stricter rules; this preset is selected explicitly. |
init --preset next |
Use the base rules plus the Next.js domain. |
init --no-hooks |
Skip Husky and hook setup. |
init --no-commit-lint |
Skip the commit-message hooks: commit-msg, prepare-commit-msg, and pre-push. |
init --no-ci |
Skip generating the GitHub Actions workflow. |
init --skip-install |
Print dependency installation commands instead of executing them. |
Options can be combined. Without --preset, Next.js selects next; other
projects use base.
Default setup adds these pieces when missing:
| File / setting | Purpose |
|---|---|
biome.json |
Select the Biome preset. |
scripts.check, scripts.check:fix |
Expose local code checks. |
scripts.prepare |
Set up Husky when dependencies are installed. |
lint-staged |
Run Biome fixes on staged files. |
config.commitizen |
Select the guided commit adapter. |
commitlint.config.mjs |
Select commit message rules. |
.husky/pre-commit |
Check staged code. |
.husky/prepare-commit-msg |
Prompt for a message on eligible plain commits. |
.husky/commit-msg |
Validate the commit message. |
.husky/pre-push |
Validate outgoing commit messages. |
.github/workflows/biome.yml |
Run the generated CI workflow. |
Verify the setup
Section titled “Verify the setup”Run npx lintlane doctor after setup. Fix reported failures before relying on hooks. A warning can indicate a missing or outdated piece; each finding includes a suggested action.
What Lintlane installs
Section titled “What Lintlane installs”Lintlane bundles lint-staged, Commitizen, its standard adapter, and commitlint. Biome is installed in your project as a peer dependency; Husky is installed there when hooks are enabled. Your project must supply its own type checker, build tool, and test runner.
Package manager detection
Section titled “Package manager detection”The packageManager field in package.json takes priority, followed by a lockfile, the tool that launched Lintlane, and npm as the fallback.
Safe changes and upgrades
Section titled “Safe changes and upgrades”--dry-run previews changes without installing or writing files. Re-running setup adds only missing pieces. Existing Biome, lint-staged, commitlint, and Commitizen configuration is preserved, as are existing pinned Biome and Husky versions.