From 0cc8de4d6f60955896c263dcf196b80c27e953b4 Mon Sep 17 00:00:00 2001 From: Gregor Aisch Date: Sun, 28 Jul 2024 16:42:33 +0200 Subject: [PATCH] fix husky setup --- .husky/pre-commit | 1 + package.json | 9 ++------- 2 files changed, 3 insertions(+), 7 deletions(-) create mode 100644 .husky/pre-commit diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 00000000..457259be --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npm test -- --run diff --git a/package.json b/package.json index 679db7cd..19787f27 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,8 @@ "test": "vitest test/*.js", "test:old": "vows --dot-matrix test/*.cjs", "lint": "eslint index.js index-light.js src", - "format": "prettier --write index.js index-light.js src *.config.js" + "format": "prettier --write index.js index-light.js src *.config.js", + "prepare": "husky" }, "devDependencies": { "@babel/eslint-parser": "^7.25.0", @@ -57,11 +58,5 @@ "doc", "test" ] - }, - "husky": { - "hooks": { - "pre-commit": "npm run lint", - "pre-push": "npm test" - } } }