chore: setup commitlint and release

This commit is contained in:
Nicola Zambello 2021-12-13 20:16:57 +01:00
parent 266f874f1a
commit 0ea5607913
5 changed files with 2730 additions and 23 deletions

4
.husky/commit-msg Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn commitlint --edit $1

39
.release-it.json Normal file
View file

@ -0,0 +1,39 @@
{
"git": {
"tagName": "v${version}",
"commitMessage": "chore: release v${version}"
},
"npm": {
"publish": false
},
"github": {
"release": true,
"releaseName": "${version}"
},
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
"preset": {
"name": "conventionalcommits",
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "refactor",
"section": "Changes"
},
{
"type": "chore",
"section": "Maintenance"
}
]
}
}
}
}

1
commitlint.config.js Normal file
View file

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

View file

@ -6,6 +6,7 @@
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"prepare": "husky install",
"serve": "vite preview"
},
"dependencies": {
@ -16,10 +17,15 @@
"use-position": "^1.0.0"
},
"devDependencies": {
"@commitlint/cli": "^15.0.0",
"@commitlint/config-conventional": "^15.0.0",
"@release-it/conventional-changelog": "^3.3.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/use-position": "^0.0.0",
"@vitejs/plugin-react": "^1.0.0",
"husky": "^7.0.4",
"release-it": "^14.11.8",
"typescript": "^4.3.2",
"vite": "^2.6.4",
"vite-plugin-pwa": "^0.11.10"

2703
yarn.lock

File diff suppressed because it is too large Load diff