From 4119cf2b2b829d613a66c5c18a693198b1ede50e Mon Sep 17 00:00:00 2001 From: Boshen Date: Tue, 7 Nov 2023 14:16:23 +0800 Subject: [PATCH] add husky --- .husky/pre-commit | 4 ++++ package.json | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 0000000000..d24fdfc601 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx lint-staged diff --git a/package.json b/package.json index 049a7cd06c..c2b5c158bb 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,8 @@ "write-translations": "docusaurus write-translations", "write-heading-ids": "docusaurus write-heading-ids", "typecheck": "tsc", - "prettier": "prettier" + "prettier": "prettier", + "prepare": "husky install" }, "dependencies": { "@docusaurus/core": "3.0.0",