summaryrefslogtreecommitdiff
path: root/package.json
diff options
context:
space:
mode:
authorChris Kay <chris.kay@arm.com>2020-12-09 16:52:03 +0000
committerChris Kay <chris.kay@arm.com>2021-04-19 14:06:25 +0100
commitd97bade107bae2e9e98b74bbc3198fd7ef5234cc (patch)
treeb8be483e91641fbb79df59f1f2286fa2d12ec6c9 /package.json
parentc75ce067aa7c47c2ef78e2598ef7e46d6bbc9e24 (diff)
downloadarm-trusted-firmware-d97bade107bae2e9e98b74bbc3198fd7ef5234cc.tar.gz
build(hooks): add commitlint hook
This change adds a configuration for commitlint - a tool designed to enforce a particular commit message style - and run it as part of Git's commit-msg hook. This validates commits immediately after the editor has been exited, and the configuration is derived from the configuration we provide to Commitizen. While the configuration provided suggests a maximum header and body length, neither of these are hard errors. This is to accommodate the occasional commit where it may be difficult or impossible to comply with the length requirements (for example, with a particularly long scope, or a long URL in the message body). Change-Id: Ib5e90472fd1f1da9c2bff47703c9682232ee5679 Signed-off-by: Chris Kay <chris.kay@arm.com>
Diffstat (limited to 'package.json')
-rw-r--r--package.json2
1 files changed, 2 insertions, 0 deletions
diff --git a/package.json b/package.json
index acd248a1b..04f5ffbcf 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,8 @@
"postinstall": "husky install"
},
"devDependencies": {
+ "@commitlint/cli": "^11.0.0",
+ "@commitlint/config-conventional": "^11.0.0",
"commitizen": "^4.2.2",
"cz-conventional-changelog": "^3.3.0",
"husky": "^5.0.4"