Skip to content

Commit da701f7

Browse files
authored
refactor: not installing plugins for husky npx (#1770)
* refactor: not installing plugins for husky npx * Update pre-commit * fix: corrected the installation prevention parameters position * refactor: adapted from examples https://github.com/typicode/husky/blob/main/.husky/commit-msg * refactor: adapted from examples
1 parent 082ca2e commit da701f7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

.husky/commit-msg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npx --yes commitlint --edit "$1"
4+
npx --no -- commitlint --edit "$1"

.husky/pre-commit

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
33

44
echo "### lint staged files ###"
5-
npx lint-staged
5+
npx --no -- lint-staged
66
echo "### npm run lint ###"
7-
npx concurrently "node ./scripts/check-commit-mail.js" "node ./scripts/cypress/component-check.js" "node ./scripts/angular-module-component-check.js" "npm run lint:eslint" "npx validate-branch-name"
7+
npx --no -- concurrently "node ./scripts/check-commit-mail.js" "node ./scripts/cypress/component-check.js" "node ./scripts/angular-module-component-check.js" "npm run lint:eslint" "npx validate-branch-name"
88

99

1010

0 commit comments

Comments
 (0)