bcomnes/npm-run-all2

Prettier plugin `prettier-plugin-packagejson` fails when switching to this package

viceice opened this issue · 3 comments

Renovate is now suggesting to replace the npm-run-all with npm-run-all2 which is good, but on some repos prettier starts failing.
I also tried the latest v6 with no difference.
Any idea?

diff --git a/package.json b/package.json
index 9090468..58a787e 100644
--- a/package.json
+++ b/package.json
@@ -7,8 +7,8 @@
   "author": "Michael Kriese <michael.kriese@visualon.de>",
   "type": "module",
   "scripts": {
-    "lint": "run-s prettier",
     "postinstall": "husky install",
+    "lint": "run-s prettier",
     "prettier": "prettier \"{**/*,*}.*\" --check --ignore-unknown",
     "prettier:fix": "prettier \"{**/*,*}.*\" --write --ignore-unknown"
   },

Seeing it on yarn v3 and pnpm v8, so seems unrelated to package manager

Should be fixed when keithamus/sort-package-json#309 is released.

Add numbers to your script names to ensure the desired sort order if it is sort dependent. Thanks for the additional context @kachkaev.