chore: add husky for commit message lint

This commit is contained in:
a.bouhuolia
2023-02-07 20:24:44 +02:00
parent 68e61429aa
commit 2e3b2cbf92
6 changed files with 22380 additions and 5 deletions

4
.husky/commit-msg Normal file
View File

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

2
.husky/pre-commit Normal file
View File

@@ -0,0 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

1
commitlint.config.js Normal file
View File

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

View File

@@ -8,15 +8,27 @@
"dev:webapp": "lerna run dev --scope \"@bigcapital/webapp\"", "dev:webapp": "lerna run dev --scope \"@bigcapital/webapp\"",
"build:webapp": "lerna run dev --scope \"@bigcapital/webapp\"", "build:webapp": "lerna run dev --scope \"@bigcapital/webapp\"",
"dev:server": "lerna run dev --scope \"@bigcapital/server\"", "dev:server": "lerna run dev --scope \"@bigcapital/server\"",
"build:server": "lerna run dev --scope \"@bigcapital/server\"" "build:server": "lerna run dev --scope \"@bigcapital/server\"",
"prepare": "husky install"
}, },
"workspaces": [ "workspaces": [
"packages/*" "packages/*",
"shared/*"
], ],
"devDependencies": { "devDependencies": {
"lerna": "^6.4.1" "@commitlint/config-conventional": "^17.4.2",
"@commitlint/config-lerna-scopes": "^17.4.2",
"husky": "^8.0.3",
"lerna": "^6.4.1",
"@commitlint/cli": "^17.4.2"
}, },
"engines": { "engines": {
"node": ">=14.20" "node": ">=14.20"
} },
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"dependencies": {}
} }

View File

@@ -1,5 +1,5 @@
{ {
"name": "bigcapital-server", "name": "@bigcapital/server",
"version": "1.7.1", "version": "1.7.1",
"description": "", "description": "",
"main": "src/server.ts", "main": "src/server.ts",

22356
yarn.lock Normal file

File diff suppressed because it is too large Load Diff