extends
You can extend your config with another one YAML file. Its content will be merged. Extends for lefthook.yml, lefthook-local.yml, and remotes configs are handled separately, so you can have different extends in these files.
You can use asterisk to make a glob.
Example
# lefthook.yml
extends:
- /home/user/work/lefthook-extend.yml
- /home/user/work/lefthook-extend-2.yml
- lefthook-extends/file.yml
- ../extend.yml
- projects/*/specific-lefthook-config.yml
The extends will be merged to the main configuration in your file. Here is the order of settings applied:
lefthook.yml– main config fileextends– configs specified in extends optionremotes– configs specified in remotes optionlefthook-local.yml– local config fileSo,
extendsoverride settings fromlefthook.yml,remotesoverrideextends, andlefthook-local.ymlcan override everything.