diff --git a/bin/husky b/bin/husky new file mode 100755 index 0000000..99cc16b --- /dev/null +++ b/bin/husky @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +BINDIR=$(dirname $(node -pe "require.resolve('husky')")) + +if [[ -z "$BINDIR" ]]; then + echo "Required package 'husky' not found" + exit 1 +fi + +# Redirect to original husky bin +$BINDIR/bin.js $@ \ No newline at end of file diff --git a/package.json b/package.json index 99c6580..df6b9df 100644 --- a/package.json +++ b/package.json @@ -3,10 +3,11 @@ "version": "1.0.0", "description": "Diplodoc platform internal utility set for linting", "bin": { - "lint": "./bin/lint" + "lint": "./bin/lint", + "husky": "./bin/husky" }, "scripts": { - "test": "exit 0" + "test": "cd test && npm start" }, "exports": { "./eslint-config": "./eslint-common-config.js",