feat: implement husky with commitlint

This commit is contained in:
Walid 2022-05-16 20:33:47 +01:00
parent 5e1d0d321f
commit 6d508fc491
No known key found for this signature in database
GPG Key ID: 7DF9215FC4E48853
4 changed files with 1071 additions and 2 deletions

1
.commitlintrc.json Normal file
View File

@ -0,0 +1 @@
{ "extends": ["@commitlint/config-conventional"] }

4
.husky/commit-msg Executable file
View File

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

1060
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,8 +10,9 @@
"lint:next": "next lint",
"lint:scss": "stylelint \"**/*.scss\"",
"lint:prettier": "prettier \".\" --check",
"gen": "plop",
"semantic-release": "semantic-release --branches main"
"lint:commit": "commitlint",
"release": "semantic-release",
"gen": "plop"
},
"dependencies": {
"@fontsource/open-sans": "^4.5.10",
@ -24,6 +25,8 @@
"sass": "^1.51.0"
},
"devDependencies": {
"@commitlint/cli": "^17.0.0",
"@commitlint/config-conventional": "^17.0.0",
"@types/js-cookie": "^3.0.2",
"@types/node": "17.0.33",
"@types/react": "18.0.9",
@ -37,6 +40,7 @@
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-unicorn": "^42.0.0",
"husky": "^8.0.1",
"plop": "^3.1.0",
"postcss": "^8.4.13",
"postcss-scss": "^4.0.4",