Config file name

Lefthook supports the following file names for the main config:

FormatFile name
YAMLlefthook.yml
YAML.lefthook.yml
YAML.config/lefthook.yml
------------------
YAMLlefthook.yaml
YAML.lefthook.yaml
YAML.config/lefthook.yaml
------------------
TOMLlefthook.toml
TOML.lefthook.toml
TOML.config/lefthook.toml
------------------
JSONlefthook.json
JSON.lefthook.json
JSON.config/lefthook.json

If there are more than 1 file in the project, only one will be used, and you'll never know which one. So, please, use one format in a project.

Filenames without the leading dot will also be looked up from the .config subdirectory.

Lefthook also merges an extra config with the name lefthook-local. All supported formats can be applied to this -local config. If you name your main config with the leading dot, like .lefthook.json, the -local config also must be named with the leading dot: .lefthook-local.json.

Options