-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docs: actualize docs * docs: remove deprecated options * docs: fix typo
- Loading branch information
Showing
3 changed files
with
32 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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: [email protected]: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: [email protected]: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: [email protected]:evilmartians/remote | ||
ref: v1.0.0 | ||
config: examples/ruby-linter.yml | ||
``` | ||
|
||
## `remotes` | ||
|
||
> [!IMPORTANT] | ||
|
@@ -536,9 +445,9 @@ 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). | ||
Contains settings for the git hook (commands, scripts, skip rules, etc.). You can define a hook setting for all hooks listed [here](../internal/config/available_hooks.go). | ||
|
||
### `files` (global) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters