diff --git a/docs/configuration.md b/docs/configuration.md index 3a19613b..73ad103d 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -13,16 +13,12 @@ Lefthook [supports](#config-file) YAML, JSON, and TOML configuration. In this do - [`source_dir`](#source_dir) - [`source_dir_local`](#source_dir_local) - [`rc`](#rc) -- [`remote`](#remote--deprecated-show-remotes-instead) :warning: **DEPRECATED** use [`remotes`](#remotes) - - [`git_url`](#git_url) - - [`ref`](#ref) - - [`config`](#config) - [`remotes`](#remotes) - - [`git_url`](#git_url-1) + - [`git_url`](#git_url) - [`ref`](#ref-1) - [`refetch`](#refetch) - [`configs`](#configs) -- [Git hook](#git-hook) +- [Hook name (e.g. `pre-commit`)](#hook-name) - [`files` (global)](#files-global) - [`parallel`](#parallel) - [`piped`](#piped) @@ -331,93 +327,6 @@ $ lefthook install -f Now any program that runs your hooks will have a tweaked PATH environment variable and will be able to get `nvm` :wink: -## `remote` - -> [!WARNING] -> **DEPRECATED** Use [`remotes`](#remotes) setting - -You can provide a remote config if you want to share your lefthook configuration across many projects. Lefthook will automatically download and merge the configuration into your local `lefthook.yml`. - -You can use [`extends`](#extends) related to the config file (not absolute paths). - -If you provide [`scripts`](#scripts) in a remote file, the [scripts](#source_dir) folder must be in the **root of the repository**. - -**Note** - -Configuration in `remote` will be merged to configuration in `lefthook.yml`, so the priority will be the following: - -- `lefthook.yml` -- `remote` -- `lefthook-local.yml` - -This can be changed in the future. For convenience, please use `remote` configuration without any hooks configuration in `lefthook.yml`. - -### `git_url` - -> [!WARNING] -> **DEPRECATED** Use [`remotes`](#remotes) setting - -A URL to Git repository. It will be accessed with privileges of the machine lefthook runs on. - -**Example** - -```yml -# lefthook.yml - -remote: - git_url: git@github.com:evilmartians/lefthook -``` - -Or - -```yml -# lefthook.yml - -remote: - git_url: https://github.com/evilmartians/lefthook -``` - -### `ref` - -> [!WARNING] -> **DEPRECATED** Use [`remotes`](#remotes) setting - -An optional *branch* or *tag* name. - -**Example** - -```yml -# lefthook.yml - -remote: - git_url: git@github.com:evilmartians/lefthook - ref: v1.0.0 -``` - -> [!CAUTION] -> -> If you initially had `ref` option, ran `lefthook install`, and then removed it, lefthook won't decide which branch/tag to use as a ref. So, if you added it once, please, use it always to avoid issues in local setups. - -### `config` - -> [!WARNING] -> **DEPRECATED**. Use [`remotes`](#remotes) setting - -**Default:** `lefthook.yml` - -An optional config path from remote's root. - -**Example** - -```yml -# lefthook.yml - -remote: - git_url: git@github.com:evilmartians/remote - ref: v1.0.0 - config: examples/ruby-linter.yml -``` - ## `remotes` > [!IMPORTANT] @@ -536,7 +445,7 @@ remotes: ``` -## Git hook +## Hook name Commands and scripts are defined for git hooks. You can defined a hook for all hooks listed in [this file](../internal/config/available_hooks.go).