feat(commitlint): add commitlint to enforce commit message format

This commit is contained in:
Thomas Rupprecht 2023-05-24 22:47:36 +02:00
parent 2575d48e9e
commit b4e88abf53
5 changed files with 2557 additions and 444 deletions

3
.commitlintrc.js Normal file
View File

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

4
.husky/commit-msg Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx --no -- commitlint --edit ${1}

View File

@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
### ⛰️ Features
- Add commitlint to enforce commit message format
## \[[0.9.2](https://gitea.usrspace.at/XimeX/usrspace-browser-addon/releases/tag/v0.9.2)] - 2023-05-24
### ⛰️ Features
- Add git-cliff to update the CHANGELOG.md
### 🐛 Bug Fixes

2976
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,11 @@
"webextension-polyfill": "^0.10.0"
},
"devDependencies": {
"@commitlint/cli": "^17.6.3",
"@commitlint/config-conventional": "^17.6.3",
"@commitlint/cz-commitlint": "^17.5.0",
"@types/firefox-webext-browser": "^111.0.1",
"commitizen": "^4.3.0",
"git-cliff": "^1.2.0",
"husky": "^8.0.3",
"web-ext": "^7.6.2"
@ -34,7 +38,13 @@
"preversion": "npm run lint && npm test && npm run update-changelog",
"version": "npm run copy-version && npm run update-changelog && git add -u",
"postversion": "npm run build:firefox",
"prepare": "husky install"
"prepare": "husky install",
"commit": "git-cz"
},
"config": {
"commitizen": {
"path": "@commitlint/cz-commitlint"
}
},
"repository": {
"type": "git",