feat: add commitlint and husky

This commit is contained in:
Thomas Allmer
2018-09-29 14:27:55 +02:00
parent 98d421acd0
commit 1e5e4c36d1
3 changed files with 16 additions and 0 deletions

6
commitlint.config.js Normal file
View File

@@ -0,0 +1,6 @@
module.exports = {
extends: [
'@commitlint/config-conventional',
'@commitlint/config-lerna-scopes',
],
};

6
husky.config.js Normal file
View File

@@ -0,0 +1,6 @@
module.exports = {
hooks: {
'pre-commit': 'npm run lint',
'commit-msg': 'commitlint -E HUSKY_GIT_PARAMS',
},
};

View File

@@ -8,6 +8,10 @@
"lint:eslint": "eslint --ext .js,.html ."
},
"devDependencies": {
"@commitlint/cli": "^7.1.2",
"@commitlint/config-conventional": "^7.1.2",
"@commitlint/config-lerna-scopes": "^7.1.2",
"husky": "^1.0.1",
"lerna": "^3.2.1",
"npm-run-all": "^4.1.3"
}