Skip to content

Commit 6aaa678

Browse files
committed
chore(commitmessages): lint commit messages
1 parent f109ac8 commit 6aaa678

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

package.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"main": "index.js",
66
"husky": {
77
"hooks": {
8-
"pre-commit": "lint-staged"
8+
"pre-commit": "lint-staged",
9+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
910
}
1011
},
1112
"lint-staged": {
@@ -22,7 +23,18 @@
2223
],
2324
"coverageDirectory": "coverage"
2425
},
26+
"commitlint": {
27+
"extends": [
28+
"@commitlint/config-conventional"
29+
]
30+
},
31+
"config": {
32+
"commitizen": {
33+
"path": "@commitlint/prompt"
34+
}
35+
},
2536
"scripts": {
37+
"commit": "npx git-cz",
2638
"format:check": "prettier --list-different '{src,__mocks__,bin}/**/*.js'",
2739
"format:write": "prettier --write '{src,__mocks__,bin}/**/*.js'",
2840
"test": "jest",
@@ -57,9 +69,13 @@
5769
"jsonfile": "^5.0.0"
5870
},
5971
"devDependencies": {
72+
"@commitlint/cli": "^7.2.1",
73+
"@commitlint/config-conventional": "^7.1.2",
74+
"@commitlint/prompt": "^7.2.1",
6075
"@semantic-release/changelog": "^3.0.1",
6176
"@semantic-release/git": "^7.0.6",
6277
"codecov": "^3.1.0",
78+
"commitizen": "^3.0.5",
6379
"husky": "^1.2.1",
6480
"jest": "^23.6.0",
6581
"lint-staged": "^8.1.0",

0 commit comments

Comments
 (0)