Skip to content

Commit f653719

Browse files
committed
fix(husky): use pnpx
Defaulting to npx causes users to unexpectedly also have npx installed.
1 parent f29646e commit f653719

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx lint-staged
1+
pnpx lint-staged

docs/FAQs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Here we'll outline the steps required to migrate a CTA app to a GitHub Action:
9393
```diff
9494
+pnpm run build
9595
+git add dist
96-
npx lint-staged
96+
pnpx lint-staged
9797
```
9898

9999
2. Create an [`action.yml` metadata file](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action#creating-an-action-metadata-file).

src/blocks/blockPrettier.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ describe("blockPrettier", () => {
203203
".gitignore": "_
204204
",
205205
"pre-commit": [
206-
"npx lint-staged
206+
"pnpx lint-staged
207207
",
208208
{
209209
"executable": true,
@@ -333,7 +333,7 @@ describe("blockPrettier", () => {
333333
".gitignore": "_
334334
",
335335
"pre-commit": [
336-
"npx lint-staged
336+
"pnpx lint-staged
337337
",
338338
{
339339
"executable": true,

src/blocks/blockPrettier.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ pnpm format --write
8585
files: {
8686
".husky": {
8787
".gitignore": "_\n",
88-
"pre-commit": ["npx lint-staged\n", { executable: true }],
88+
"pre-commit": ["pnpx lint-staged\n", { executable: true }],
8989
},
9090
".prettierignore": formatIgnoreFile(
9191
["/.husky", "/lib", "/pnpm-lock.yaml", ...ignores].sort(),

0 commit comments

Comments
 (0)