diff options
author | Vijay A <avijayr@protonmail.com> | 2021-08-04 08:57:42 +0530 |
---|---|---|
committer | Vijay A <avijayr@protonmail.com> | 2021-08-04 08:59:56 +0530 |
commit | 877d8fc68af12d092ed5405e359d7c9155d2d1fe (patch) | |
tree | 5da2be935aac41fcefb96c49b5feecb5a1b3e6f3 | |
parent | 5.6.1-nightly.13 [skip ci] (diff) | |
download | ferdium-app-877d8fc68af12d092ed5405e359d7c9155d2d1fe.tar.gz ferdium-app-877d8fc68af12d092ed5405e359d7c9155d2d1fe.tar.zst ferdium-app-877d8fc68af12d092ed5405e359d7c9155d2d1fe.zip |
chore: incorporate commitizen as a git pre-commit hook
-rwxr-xr-x | .husky/prepare-commit-msg | 10 | ||||
-rw-r--r-- | package.json | 12 |
2 files changed, 21 insertions, 1 deletions
diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg new file mode 100755 index 000000000..1c2c393cd --- /dev/null +++ b/.husky/prepare-commit-msg | |||
@@ -0,0 +1,10 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | FILE_NAME="$(dirname "$0")/_/husky.sh" | ||
4 | |||
5 | # Conditionally invoke so as to avoid running npm commands if this is a clean checkout (ie before installing npm modules) | ||
6 | if [ -f $FILE_NAME ]; then | ||
7 | . $FILE_NAME | ||
8 | |||
9 | exec < /dev/tty && git cz --hook || true | ||
10 | fi | ||
diff --git a/package.json b/package.json index 1179c3bbe..ddb1f04be 100644 --- a/package.json +++ b/package.json | |||
@@ -163,6 +163,7 @@ | |||
163 | "@typescript-eslint/parser": "4.28.5", | 163 | "@typescript-eslint/parser": "4.28.5", |
164 | "all-contributors-cli": "6.20.0", | 164 | "all-contributors-cli": "6.20.0", |
165 | "babel-plugin-react-intl": "3.5.1", | 165 | "babel-plugin-react-intl": "3.5.1", |
166 | "commitizen": "4.2.4", | ||
166 | "conventional-changelog-cli": "2.1.1", | 167 | "conventional-changelog-cli": "2.1.1", |
167 | "cross-env": "7.0.3", | 168 | "cross-env": "7.0.3", |
168 | "cz-conventional-changelog": "3.3.0", | 169 | "cz-conventional-changelog": "3.3.0", |
@@ -210,7 +211,16 @@ | |||
210 | }, | 211 | }, |
211 | "config": { | 212 | "config": { |
212 | "commitizen": { | 213 | "commitizen": { |
213 | "path": "./node_modules/cz-conventional-changelog" | 214 | "path": "./node_modules/cz-conventional-changelog", |
215 | "disableScopeLowerCase": false, | ||
216 | "disableSubjectLowerCase": false, | ||
217 | "maxHeaderWidth": 100, | ||
218 | "maxLineWidth": 100, | ||
219 | "defaultType": "chore", | ||
220 | "defaultScope": "", | ||
221 | "defaultSubject": "", | ||
222 | "defaultBody": "", | ||
223 | "defaultIssues": "" | ||
214 | } | 224 | } |
215 | }, | 225 | }, |
216 | "browserslist": [ | 226 | "browserslist": [ |