Add husky for precommit lint

This commit is contained in:
Prathamesh Musale 2024-01-25 18:25:32 +05:30
parent 792bee2ddb
commit 71d1532826
3 changed files with 17 additions and 9 deletions

1
.husky/pre-commit Normal file
View File

@ -0,0 +1 @@
yarn lint

View File

@ -12,18 +12,19 @@
"@types/lodash": "^4.14.182",
"@types/node": "^17.0.25",
"@types/yargs": "^17.0.10",
"jest": "29.0.0",
"ts-jest": "^29.0.2",
"dotenv": "^16.3.2",
"eslint": "^8.35.0",
"eslint-config-standard": "^16.0.3",
"eslint-config-semistandard": "^15.0.1",
"@typescript-eslint/eslint-plugin": "^5.47.1",
"@typescript-eslint/parser": "^5.47.1",
"dotenv": "^16.3.2",
"eslint": "^8.35.0",
"eslint-config-semistandard": "^15.0.1",
"eslint-config-standard": "^16.0.3",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"husky": "^9.0.2",
"jest": "29.0.0",
"ts-jest": "^29.0.2",
"typescript": "^4.6.3"
},
"dependencies": {
@ -35,12 +36,13 @@
"yargs": "^17.4.1"
},
"scripts": {
"test": "jest --runInBand --verbose test/cli.test.ts",
"test": "jest --runInBand --verbose test/*.test.ts",
"lint": "eslint .",
"clean": "rm -rf ./dist",
"build": "tsc"
"build": "tsc",
"prepare": "husky"
},
"bin": {
"laconic": "bin/laconic"
}
}
}

View File

@ -2895,6 +2895,11 @@ human-signals@^2.1.0:
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
husky@^9.0.2:
version "9.0.2"
resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.2.tgz#7ac26cb63719e91a159991039187b35e7358557e"
integrity sha512-0yR5R3OPjl8bYApi6T4QMOAwhtLhBjdYIVg5S6zSzIO8DIvQMh/b7Q8jW3WLbHLHtzpwiyMLBNB4R0Eb6x5+AA==
ieee754@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352"