Type object
File match .lefthook.json .lefthook.jsonc .lefthook.toml .lefthook.yaml .lefthook.yml .lefthook-local.json .lefthook-local.jsonc .lefthook-local.toml .lefthook-local.yaml .lefthook-local.yml lefthook.json lefthook.jsonc lefthook.toml lefthook.yaml lefthook.yml lefthook-local.json lefthook-local.jsonc lefthook-local.toml lefthook-local.yaml lefthook-local.yml
Schema URL https://catalog.lintel.tools/schemas/schemastore/lefthook/latest.json
Source https://raw.githubusercontent.com/evilmartians/lefthook/master/schema.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Properties

min_version string

Specify a minimum version for the lefthook binary

lefthook string

Lefthook executable path or command

source_dir string

Change a directory for script files. Directory for script files contains folders with git hook names which contain script files.

Default: ".lefthook/"
source_dir_local string

Change a directory for local script files (not stored in VCS)

Default: ".lefthook-local/"
rc string

Provide an rc file - a simple sh script

output boolean | array

Manage verbosity by skipping the printing of output of some steps

colors boolean | object

Enable disable or set your own colors for lefthook output

extends string[]

Specify files to extend config with

no_tty boolean

Whether hide spinner and other interactive things

assert_lefthook_installed boolean
skip_lfs boolean

Skip running Git LFS hooks (enabled by default)

no_auto_install boolean

Do not automatically install hooks when running lefthook

install_non_git_hooks boolean

Install non-Git hooks to .git/hooks

glob_matcher string

Choose the glob matching engine: 'gobwas' (default) or 'doublestar' (standard ** behavior)

Default: "gobwas"
Values: "gobwas" "doublestar"
remotes Remote[]

Provide multiple remote configs to use lefthook configurations shared across projects. Lefthook will automatically download and merge configurations into main config.

templates Record<string, string>

Custom templates for replacements in run commands.

$schema string
pre-commit object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
applypatch-msg object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
pre-applypatch object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
post-applypatch object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
pre-merge-commit object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
prepare-commit-msg object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
commit-msg object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
post-commit object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
pre-rebase object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
post-checkout object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
post-merge object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
pre-push object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
pre-receive object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
update object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
proc-receive object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
post-receive object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
post-update object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
reference-transaction object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
push-to-checkout object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
pre-auto-gc object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
post-rewrite object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
sendemail-validate object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
fsmonitor-watchman object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
p4-changelist object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
p4-prepare-changelist object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
p4-post-changelist object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
p4-pre-submit object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
post-index-change object
14 nested properties
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>

Definitions

Command object
run string required
files string
root string
fail_text string
timeout string
Examples: "15s"
skip boolean | array
only boolean | array
tags string | array
file_types string | array
glob string | array
exclude string | array
env Record<string, string>
priority integer
interactive boolean
use_stdin boolean
stage_fixed boolean
Group object
jobs Job[] required
root string
parallel boolean
piped boolean
Hook object
parallel boolean
piped boolean
follow boolean
fail_on_changes string
Values: "true" "1" "0" "false" "never" "always" "ci" "non-ci"
fail_on_changes_diff boolean
files string
exclude_tags string[]
exclude string[]
skip boolean | array
only boolean | array
jobs Job[]
commands Record<string, object>
scripts Record<string, object>
Job object
name string
run string
script string
runner string
args string
root string
files string
fail_text string
timeout string
Examples: "15s"
glob string | array
exclude string | array
tags string[]
file_types string | array
env Record<string, string>
interactive boolean
use_stdin boolean
stage_fixed boolean
skip boolean | array
only boolean | array
group object
4 nested properties
jobs Job[] required
root string
parallel boolean
piped boolean
Remote object
git_url string

A URL to Git repository. It will be accessed with privileges of the machine lefthook runs on.

ref string

An optional branch or tag name

configs string[]

An optional array of config paths from remote's root

Default:
[
  "lefthook.yml"
]
refetch boolean

Set to true if you want to always refetch the remote

refetch_frequency string

Provide a frequency for the remotes refetches

Examples: "24h"
Script object
runner string
args string
skip boolean | array
only boolean | array
tags string | array
env Record<string, string>
priority integer
fail_text string
timeout string
Examples: "15s"
interactive boolean
use_stdin boolean
stage_fixed boolean
SetupInstruction object
run string