Skip to content

Commit

Permalink
fix: avoid npx prompts during "format" and "format:check" runs
Browse files Browse the repository at this point in the history
These prompts:

    Need to install the following packages:
    prettier
    Ok to proceed? (y) y

are intended for interactive sessions, to catch typos. But these `npx`
invocations are hard-coded and run from non-interactive scripts, so
suppressing the prompt with `-y` is safe.
  • Loading branch information
wincent committed Jul 25, 2022
1 parent d314f39 commit 7a17b47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"license": "Unlicense",
"scripts": {
"ci": "yarn format:check",
"format:check": "npx prettier --check \"**/*.{js,json,md,ts}\" \"*.{md,ts}\"",
"format": "npx prettier --write \"**/*.{js,json,md,ts}\" \"*.{md,ts}\""
"format:check": "npx -y prettier --check \"**/*.{js,json,md,ts}\" \"*.{md,ts}\"",
"format": "npx -y prettier --write \"**/*.{js,json,md,ts}\" \"*.{md,ts}\""
},
"type": "module",
"dependencies": {
Expand Down

0 comments on commit 7a17b47

Please sign in to comment.