Skip to content

Commit

Permalink
docs: add setup instructions to readme (#202)
Browse files Browse the repository at this point in the history
the npm-script recomendation is available in the readme. (previously hard to find)
  • Loading branch information
pixelass authored and marionebl committed Dec 21, 2017
1 parent 1de2af7 commit d82cbd4
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,24 @@ npm install --save-dev @commitlint/{config-conventional,cli}
echo "module.exports = {extends: ['@commitlint/config-conventional']}" > commitlint.config.js
```


To lint commits before they are created you can use the 'commitmsg' hook as described [here](https://github.com/typicode/husky/blob/master/HOOKS.md#hooks)

```json
{
"scripts": {
"commitmsg": "commitlint -e $GIT_PARAMS"
}
}
```


**Detailed Setup instructions**

* [Local setup](http://marionebl.github.io/commitlint/#/guides-local-setup) - Lint messages on commit with husky
* [CI setup](http://marionebl.github.io/commitlint/#/guides-ci-setup) - Lint messages during CI builds


## CLI

* Primary way to interact with commitlint.
Expand Down

0 comments on commit d82cbd4

Please sign in to comment.