Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prettier plugin prettier-plugin-packagejson fails when switching to this package #129

Closed
viceice opened this issue Jan 29, 2024 · 3 comments

Comments

@viceice
Copy link

viceice commented Jan 29, 2024

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"
   },
@viceice
Copy link
Author

viceice commented Jan 29, 2024

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

@kachkaev
Copy link

kachkaev commented Jan 29, 2024

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

@bcomnes
Copy link
Owner

bcomnes commented Jan 29, 2024

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

@bcomnes bcomnes closed this as completed Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants