Skip to content

Commit

Permalink
fix: Proxy husky bin
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Aug 10, 2024
1 parent a34bdc6 commit 4802eec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 11 additions & 0 deletions bin/husky
Original file line number Diff line number Diff line change
@@ -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 $@
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 4802eec

Please sign in to comment.