build: add husky and commitlint for commit validation

This commit is contained in:
Dorian Niemiec 2024-09-07 08:32:24 +02:00
parent 1f95dc45ac
commit 11eb73d77e
4 changed files with 1082 additions and 30 deletions

2
.husky/commit-msg Executable file
View file

@ -0,0 +1,2 @@
#!/bin/sh
npx --no -- commitlint --edit "$1"

3
commitlint.config.js Normal file
View file

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

1103
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"prepare": "husky",
"build-mdx": "node scripts/build-mdx.js"
},
"dependencies": {
@ -65,12 +66,15 @@
"zod": "^3.23.8"
},
"devDependencies": {
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/rss": "^0.0.32",
"eslint": "^8",
"eslint-config-next": "14.2.3",
"husky": "^9.1.5",
"i": "^0.3.7",
"npm": "^10.8.2",
"postcss": "^8",