Skip to content

Commit 22a7b86

Browse files
committed
ci: replace gitlint with commitlint
1 parent bc247e6 commit 22a7b86

3 files changed

Lines changed: 47 additions & 34 deletions

File tree

.commitlintrc.mjs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
export default {
2+
extends: [
3+
'@commitlint/config-conventional'
4+
],
5+
ignores: [
6+
(message) => message.includes('Signed-off-by: dependabot[bot]')
7+
],
8+
rules: {
9+
'header-max-length': [
10+
2,
11+
'always',
12+
72
13+
],
14+
'body-max-line-length': [
15+
2,
16+
'always',
17+
72
18+
],
19+
'body-leading-blank': [
20+
2,
21+
'always'
22+
],
23+
'type-enum': [
24+
2,
25+
'always',
26+
[
27+
'build',
28+
'chore',
29+
'ci',
30+
'deps',
31+
'docs',
32+
'feat',
33+
'fix',
34+
'perf',
35+
'refactor',
36+
'revert',
37+
'style',
38+
'test'
39+
]
40+
]
41+
}
42+
};

.gitlint

Lines changed: 0 additions & 30 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ repos:
2222
- id: conventional-pre-commit
2323
stages: [commit-msg]
2424
args: []
25-
- repo: https://github.com/jorisroovers/gitlint
26-
rev: v0.19.1
25+
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
26+
rev: v9.22.0
2727
hooks:
28-
- id: gitlint
29-
stages: [commit-msg]
28+
- id: commitlint
29+
stages: [commit-msg, manual]
30+
additional_dependencies: ["@commitlint/config-conventional"]

0 commit comments

Comments
 (0)