Add husky to run pre-commit lint (#3)

* Run lint before commiting

* Update lerna config

---------

Co-authored-by: neeraj <neeraj.rtly@gmail.com>
This commit is contained in:
Nabarun Gogoi 2023-12-06 18:23:50 +05:30 committed by Nabarun
parent cf37ad15b2
commit 3640ae8985
4 changed files with 15 additions and 1 deletions

4
.husky/pre-commit Executable file
View File

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

View File

@ -4,5 +4,5 @@
],
"version": "0.0.0",
"npmClient": "yarn",
"useWorkspaces": true
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}

View File

@ -6,6 +6,11 @@
],
"dependencies": {},
"devDependencies": {
"husky": "^8.0.3",
"lerna": "^8.0.0"
},
"scripts": {
"prepare": "husky install",
"lint": "lerna run lint --stream -- --max-warnings=0"
}
}

View File

@ -1667,6 +1667,11 @@ humanize-ms@^1.2.1:
dependencies:
ms "^2.0.0"
husky@^8.0.3:
version "8.0.3"
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184"
integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==
iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"