Skip to content

Commit

Permalink
feat(pre-commit): add commitlint hook to the default recommended style
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Jun 19, 2019
1 parent 5ce3bb9 commit 61f467c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,9 @@ repos:
rev: 0.6.0
hooks:
- id: bashate
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v1.0.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional']
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ help:

update:
clear
pre-commit install
pre-commit install --hook-type commit-msg
pre-commit autoupdate
pre-commit gc
poetry update
Expand Down
1 change: 1 addition & 0 deletions nitpick-style.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ include = [
"styles/pre-commit/general",
"styles/pre-commit/python",
"styles/pre-commit/bash",
"styles/pre-commit/commitlint",
"styles/black",
"styles/flake8",
"styles/pylint",
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,10 @@
}
]
]
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
}
}
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions styles/pre-commit/commitlint.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[["pre-commit-config.yaml".repos]]
yaml = """
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v1.0.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ['@commitlint/config-conventional']
"""

0 comments on commit 61f467c

Please sign in to comment.