Skip to content

Commit d7189a9

Browse files
hasezoeynodkz
authored andcommitted
chore: add commitlint & husky
1 parent 1731746 commit d7189a9

File tree

4 files changed

+306
-52
lines changed

4 files changed

+306
-52
lines changed

.huskyrc.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"husky": {
3+
"hooks": {
4+
"pre-push": "npm run test",
5+
"commit-msg": "npx commitlint -- -E HUSKY_GIT_PARAMS"
6+
}
7+
}
8+
}

commitlint.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
"extends": [
3+
"@commitlint/config-conventional"
4+
],
5+
"rules": {
6+
"scope-case": [0, "never"],
7+
"body-min-length": [2, "always", 3]
8+
}
9+
}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@
1616
"@types/node": "14.6.4",
1717
"@typescript-eslint/eslint-plugin": "4.1.0",
1818
"@typescript-eslint/parser": "4.1.0",
19+
"@commitlint/config-conventional": "^9.1.2",
20+
"commitlint": "^9.1.2",
1921
"cross-env": "^7.0.2",
2022
"eslint": "7.8.1",
2123
"eslint-config-prettier": "6.11.0",
2224
"eslint-plugin-prettier": "3.1.4",
25+
"husky": "^4.3.0",
2326
"jest": "26.4.2",
2427
"lerna": "^3.22.1",
2528
"mongodb": "3.6.1",

0 commit comments

Comments
 (0)