Skip to content

Commit ded793a

Browse files
committed
feat: add commitlint
1 parent 467b94b commit ded793a

File tree

4 files changed

+825
-3
lines changed

4 files changed

+825
-3
lines changed

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm githook:commitMessage ${1}

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default { extends: ['@commitlint/config-conventional'] };

package.json

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
"description": "A Monorepo that shares linting configurations across DotMH projects",
55
"private": true,
66
"main": "index.js",
7+
"type": "module",
78
"scripts": {
89
"test": "echo \"Error: no test specified\" && exit 1",
9-
"publish": "npm publish -ws"
10+
"publish": "npm publish -ws",
11+
"prepare": "husky",
12+
"lint:commit": "commitlint --edit",
13+
"githook:commitMessage": "pnpm lint:commit"
1014
},
1115
"repository": {
1216
"type": "git",
@@ -24,5 +28,10 @@
2428
"bugs": {
2529
"url": "https://github.com/dotmh/linting/issues"
2630
},
27-
"homepage": "https://github.com/dotmh/linting#readme"
31+
"homepage": "https://github.com/dotmh/linting#readme",
32+
"devDependencies": {
33+
"@commitlint/cli": "^19.3.0",
34+
"@commitlint/config-conventional": "^19.2.2",
35+
"husky": "^9.0.11"
36+
}
2837
}

0 commit comments

Comments
 (0)