Skip to content

Commit 5bd45d6

Browse files
committed
pre-commit: Add commitlint
1 parent 9f8ac43 commit 5bd45d6

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,9 @@ repos:
2929
rev: 32.177.0
3030
hooks:
3131
- id: renovate-config-validator
32+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
33+
rev: v9.4.0
34+
hooks:
35+
- id: commitlint
36+
stages: [commit-msg]
37+
additional_dependencies: ['@commitlint/config-conventional']

.commitlintrc.json renamed to commitlint.config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
{
2-
"extends": [
1+
module.exports = {
2+
extends: [
33
"@commitlint/config-conventional"
44
],
5-
"rules": {
5+
parserPreset: {
6+
parserOpts: { headerPattern: /^([^\(\):]*)(?:\((.*)\))?!?: (.*)$/ }
7+
},
8+
rules: {
69
"type-enum": [
710
0,
811
"always"
@@ -24,4 +27,4 @@
2427
"always"
2528
]
2629
}
27-
}
30+
};

0 commit comments

Comments
 (0)