4
0
Fork 0
mirror of https://github.com/Azure/setup-helm.git synced 2025-11-07 04:56:56 +00:00

add pre-commit hook

This commit is contained in:
Suneha Bose 2025-06-24 17:23:29 -07:00
parent c9a6a97d7f
commit 6ec620b203
No known key found for this signature in database
GPG key ID: 192F9BCAC0FA34B2
3 changed files with 22 additions and 1 deletions

2
.husky/pre-commit Normal file
View file

@ -0,0 +1,2 @@
npm test
npm run format-check

17
package-lock.json generated
View file

@ -20,6 +20,7 @@
"@types/jest": "^30.0.0", "@types/jest": "^30.0.0",
"@types/node": "^24.0.3", "@types/node": "^24.0.3",
"@vercel/ncc": "^0.38.3", "@vercel/ncc": "^0.38.3",
"husky": "^9.1.7",
"jest": "^30.0.2", "jest": "^30.0.2",
"prettier": "^3.6.0", "prettier": "^3.6.0",
"ts-jest": "^29.4.0", "ts-jest": "^29.4.0",
@ -2668,6 +2669,22 @@
"node": ">=10.17.0" "node": ">=10.17.0"
} }
}, },
"node_modules/husky": {
"version": "9.1.7",
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
"integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
"dev": true,
"license": "MIT",
"bin": {
"husky": "bin.js"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/import-local": { "node_modules/import-local": {
"version": "3.2.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz",

View file

@ -20,12 +20,14 @@
"test": "jest", "test": "jest",
"test-coverage": "jest --coverage", "test-coverage": "jest --coverage",
"format": "prettier --write .", "format": "prettier --write .",
"format-check": "prettier --check ." "format-check": "prettier --check .",
"prepare": "husky"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^30.0.0", "@types/jest": "^30.0.0",
"@types/node": "^24.0.3", "@types/node": "^24.0.3",
"@vercel/ncc": "^0.38.3", "@vercel/ncc": "^0.38.3",
"husky": "^9.1.7",
"jest": "^30.0.2", "jest": "^30.0.2",
"prettier": "^3.6.0", "prettier": "^3.6.0",
"ts-jest": "^29.4.0", "ts-jest": "^29.4.0",