Skip to content

Commit

Permalink
chore(workspace): setup commitlint and commitizen along with husky
Browse files Browse the repository at this point in the history
  • Loading branch information
nebula-aac committed Sep 28, 2023
1 parent 1d9b3a2 commit 543035d
Show file tree
Hide file tree
Showing 5 changed files with 663 additions and 65 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit ${1}
4 changes: 4 additions & 0 deletions .husky/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

exec < /dev/tty && cz --hook || true
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {extends: ['@commitlint/config-conventional']}
10 changes: 9 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
]
},
"devDependencies": {
"@commitlint/cli": "^17.7.2",
"@commitlint/config-conventional": "^17.7.0",
"cz-conventional-changelog": "^3.3.0",
"eslint": "^8.49.0",
"husky": "^8.0.0",
"lerna": "^7.3.0",
Expand All @@ -30,5 +33,10 @@
"prettier-plugin-organize-imports": "^3.2.3",
"typescript": "^5.2.2"
},
"packageManager": "[email protected]"
"packageManager": "[email protected]",
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
Loading

0 comments on commit 543035d

Please sign in to comment.