Skip to content

Commit

Permalink
docs: remove deprecated options
Browse files Browse the repository at this point in the history
  • Loading branch information
mrexox committed Sep 30, 2024
1 parent aeff5e1 commit dbebee9
Showing 1 changed file with 3 additions and 94 deletions.
97 changes: 3 additions & 94 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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).

Expand Down

0 comments on commit dbebee9

Please sign in to comment.