Skip to content

Commit 5c0fe14

Browse files
committed
chore: configure husky and commitlint
1 parent f04f573 commit 5c0fe14

File tree

4 files changed

+409
-16
lines changed

4 files changed

+409
-16
lines changed

.release-it.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"increment": "conventional:angular",
3+
"scripts": {
4+
"changelog": "conventional-changelog -p angular | tail -n +3"
5+
},
6+
"git": {
7+
"commitMessage": "chore: release %s",
8+
"tagName": "v%s"
9+
},
10+
"npm": {
11+
"publish": true
12+
},
13+
"github": {
14+
"release": true
15+
}
16+
}

commitlint.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* eslint-disable import/no-commonjs */
2+
3+
module.exports = {
4+
extends: ['@commitlint/config-conventional'],
5+
};

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"typescript": "tsc --noEmit",
1818
"build": "babel --extensions .ts,.tsx src --out-dir lib --ignore '**/__tests__/**' --source-maps --delete-dir-on-start",
1919
"watch": "yarn build --watch",
20-
"prepare": "yarn build"
20+
"prepare": "yarn build",
21+
"release": "release-it"
2122
},
2223
"dependencies": {
2324
"@babel/core": "^7.4.0",
@@ -35,6 +36,7 @@
3536
"@babel/cli": "^7.2.3",
3637
"@babel/preset-env": "^7.4.2",
3738
"@babel/preset-typescript": "^7.3.3",
39+
"@commitlint/config-conventional": "^7.5.0",
3840
"@types/babel__core": "^7.1.0",
3941
"@types/chalk": "^2.2.0",
4042
"@types/cosmiconfig": "^5.0.3",
@@ -43,8 +45,16 @@
4345
"@types/inquirer": "^6.0.0",
4446
"@types/ora": "^3.2.0",
4547
"@types/yargs": "^12.0.11",
48+
"commitlint": "^7.5.2",
4649
"conventional-changelog-cli": "^2.0.12",
50+
"husky": "^1.3.1",
4751
"release-it": "^10.4.0",
4852
"typescript": "^3.4.1"
53+
},
54+
"husky": {
55+
"hooks": {
56+
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
57+
"pre-commit": "yarn typescript"
58+
}
4959
}
5060
}

0 commit comments

Comments
 (0)