# @dotcom-tool-kit/commitlint

Tool Kit plugin to run [commitlint](https://commitlint.js.org/)

## Installation & Usage

With Tool Kit [already set up](https://github.com/financial-times/dotcom-tool-kit#installing-and-using-tool-kit), install this plugin as a dev dependency:

```sh
npm install --save-dev @dotcom-tool-kit/commitlint
```

And add it to your repo's `.toolkitrc.yml`:

```yml
plugins:
  - '@dotcom-tool-kit/commitlint'
```

By default the plugin will run on the `git:commitmsg` command. There are no further configurations in Tool Kit, [use one of the config file locations that Commitlint supports](https://commitlint.js.org/reference/configuration).

<!-- begin autogenerated docs -->
## Tasks

### `Commitlint`

Lint commit messages.
#### Task options

| Property | Description                                                                                                                                     | Type     |
| :------- | :---------------------------------------------------------------------------------------------------------------------------------------------- | :------- |
| `from`   | The start of the commit range to lint. If neither `from` or `to` are specified, Commitlint will lint the commit message currently being edited. | `string` |
| `to`     | The end of the commit range to lint.                                                                                                            | `string` |

_All properties are optional._
<!-- end autogenerated docs -->
