Skip to content

Commit

Permalink
feat(husky): replace npx --no-install with npm exec --no (#1691)
Browse files Browse the repository at this point in the history
> The `--no-install` option is deprecated, and will be converted to `--no`.

-- https://docs.npmjs.com/cli/v9/commands/npm-exec#compatibility-with-older-npx-versions
  • Loading branch information
ybiquitous authored Jan 30, 2024
1 parent fdead22 commit ec3af44
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx --no-install commitlint --edit "$1"
npm exec --no -- commitlint --edit "$1"
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
npx --no-install lint-staged
npm exec --no -- lint-staged
4 changes: 2 additions & 2 deletions test/__snapshots__/init.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ jobs:
`;

exports[`write ".husky/commit-msg" 1`] = `
"npx --no-install commitlint --edit "$1"
"npm exec --no -- commitlint --edit "$1"
"
`;

Expand All @@ -267,7 +267,7 @@ exports[`write ".husky/post-commit" 1`] = `
`;

exports[`write ".husky/pre-commit" 1`] = `
"npx --no-install lint-staged
"npm exec --no -- lint-staged
"
`;

Expand Down

0 comments on commit ec3af44

Please sign in to comment.