keithamus / sort-package-json

Sort an Object or package.json based on the well-known package.json keys
MIT License
790 stars 83 forks source link

sorting scripts fails when switching from `npm-run-all` to `npm-run-all2` #308

Closed viceice closed 7 months ago

viceice commented 7 months ago

Renovate is now suggesting to replace the npm-run-all with npm-run-all2 which is good, but on some repos prettier starts failing. 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"
   },
viceice commented 7 months ago

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

kachkaev commented 7 months ago

Also seeing this in a PR created by Renovate bot. This should be fixed by https://github.com/keithamus/sort-package-json/pull/309.