diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100755 index 0000000..449fcde --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npm test diff --git a/package.json b/package.json index 6b3af12..1e292aa 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "check": "run-s clean && run-p -c --aggregate-output check:*", "clean:declarations": "rm -rf $(find . -maxdepth 2 -type f -name '*.d.ts')", "clean": "run-p clean:*", + "prepare": "husky install", "prepublishOnly": "run-s build", "sync-gh-actions": "ghat", "test-ci": "run-s test:*", @@ -41,11 +42,6 @@ "test:mocha": "c8 --reporter=lcov --reporter text mocha 'test/**/*.spec.js'", "test": "run-s check test:*" }, - "husky": { - "hooks": { - "pre-push": "npm test" - } - }, "engines": { "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, @@ -90,7 +86,7 @@ "eslint-plugin-security": "^1.4.0", "eslint-plugin-unicorn": "^35.0.0", "ghat": "^0.14.0", - "husky": "^4.0.3", + "husky": "^7.0.4", "installed-check": "^5.0.0-1", "mocha": "^9.1.3", "npm-run-all": "^4.1.5",