From 22c2fad91eb3e58bfa1d17f8a125d125c795b13e Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Tue, 26 Mar 2024 15:54:48 -0700 Subject: [PATCH] Setup husky pre-commit hook no-op --- .husky/pre-commit | 1 + package-lock.json | 16 ++++++++++++++++ package.json | 4 +++- 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 000000000..9e97d326d --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +# npm run check-format diff --git a/package-lock.json b/package-lock.json index 156fd72a8..b6932a701 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,9 +6,25 @@ "": { "name": "publishing-client", "devDependencies": { + "husky": "^9.0.11", "prettier": "3.2.5" } }, + "node_modules/husky": { + "version": "9.0.11", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.11.tgz", + "integrity": "sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==", + "dev": true, + "bin": { + "husky": "bin.mjs" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/prettier": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", diff --git a/package.json b/package.json index 8679effce..44e7b741a 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,11 @@ "private": true, "scripts": { "format": "prettier . --write", - "check-format": "prettier . --check" + "check-format": "prettier . --check", + "prepare": "husky" }, "devDependencies": { + "husky": "^9.0.11", "prettier": "3.2.5" } }