From 468bf01e9ce4c27fdc8279d23b25c827983cdaf5 Mon Sep 17 00:00:00 2001 From: Valentin Kiselev Date: Thu, 10 Oct 2024 11:04:30 +0300 Subject: [PATCH] docs: update info about merge order (#838) * docs: update info about merge order * docs: add a summary --- docs/configuration.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/configuration.md b/docs/configuration.md index e21a591b..46208925 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -150,6 +150,16 @@ extends: - ../extend.yml ``` +> [!IMPORTANT] +> The extends will be merged to the main configuration in your file. Here is the order of settings applied: +> +> - `lefthook.yml` – main config file +> - `extends` – configs specified in [extends](#extends) option +> - `remotes` – configs specified in [remotes](#remotes) option +> - `lefthook-local.yml` – local config file +> +> So, `extends` override settings from `lefthook.yml`, `remotes` override `extends`, and `lefthook-local.yml` can override everything. + ### `min_version` If you want to specify a minimum version for lefthook binary (e.g. if you need some features older versions don't have) you can set this option.