chore: add husky hook for commitlint

This commit is contained in:
Christopher Willis-Ford 2025-02-06 08:44:56 -08:00
parent 4d1343ee90
commit aa0c353613
4 changed files with 26 additions and 0 deletions

1
.husky/.gitattributes vendored Normal file
View file

@ -0,0 +1 @@
* text=auto eol=lf

1
.husky/commit-msg Normal file
View file

@ -0,0 +1 @@
npx --no-install commitlint --edit "$1"

22
package-lock.json generated
View file

@ -18,6 +18,7 @@
"@commitlint/config-conventional": "^19.7.1",
"eslint": "^8.16.0",
"eslint-config-scratch": "^7.0.0",
"husky": "^9.1.7",
"scratch-semantic-release-config": "1.0.8",
"tap": "^16.2.0"
}
@ -4410,6 +4411,21 @@
"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,
"bin": {
"husky": "bin.js"
},
"engines": {
"node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/ignore": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz",
@ -20907,6 +20923,12 @@
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"dev": true
},
"husky": {
"version": "9.1.7",
"resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz",
"integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==",
"dev": true
},
"ignore": {
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz",

View file

@ -8,6 +8,7 @@
"test": "test"
},
"scripts": {
"prepare": "husky || true",
"test": "npm run test:lint && npm run test:unit",
"test:lint": "eslint .",
"test:unit": "tap --reporter nyan test/unit/*.js --statements=97 --branches=97"
@ -24,6 +25,7 @@
"@commitlint/config-conventional": "^19.7.1",
"eslint": "^8.16.0",
"eslint-config-scratch": "^7.0.0",
"husky": "^9.1.7",
"scratch-semantic-release-config": "1.0.8",
"tap": "^16.2.0"
}