From 65b8fc329d1246c99e9be73e4fd3a47436269305 Mon Sep 17 00:00:00 2001 From: Christopher Willis-Ford <7019101+cwillisf@users.noreply.github.com> Date: Tue, 17 Oct 2023 15:21:27 -0700 Subject: [PATCH] chore: add husky hook for commitlint --- .husky/.gitattributes | 1 + .husky/commit-msg | 4 ++++ package-lock.json | 22 ++++++++++++++++++++++ package.json | 1 + 4 files changed, 28 insertions(+) create mode 100644 .husky/.gitattributes create mode 100755 .husky/commit-msg diff --git a/.husky/.gitattributes b/.husky/.gitattributes new file mode 100644 index 0000000..fcadb2c --- /dev/null +++ b/.husky/.gitattributes @@ -0,0 +1 @@ +* text eol=lf diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 0000000..80416c7 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx --no-install commitlint --edit "$1" diff --git a/package-lock.json b/package-lock.json index 3a3deae..f51f319 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,6 +19,7 @@ "babel-preset-env": "1.7.0", "eslint": "^4.14.0", "eslint-config-scratch": "^5.0.0", + "husky": "8.0.3", "json": "^10.0.0", "lodash.defaultsdeep": "4.6.1", "rimraf": "^2.6.1", @@ -5266,6 +5267,21 @@ "node": ">=10.17.0" } }, + "node_modules/husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -14987,6 +15003,12 @@ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, + "husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", diff --git a/package.json b/package.json index 37ef452..b56d436 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "babel-preset-env": "1.7.0", "eslint": "^4.14.0", "eslint-config-scratch": "^5.0.0", + "husky": "8.0.3", "json": "^10.0.0", "lodash.defaultsdeep": "4.6.1", "rimraf": "^2.6.1",