-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
I have a monorepo created with nx and it seems that the scripts in the root package.json does get sorted when using the CLI.
For example, running e.g. sort-package-json {.,apps/*}/{package.json,.eslintrc,.prettierrc} will work for any of the files (./.eslintrc or apps/xxx/package.json) except for ./package.json.
I checked by changing the order of two scripts (e.g. I put nx before lint). The file is parsed, but the order is not changed back.
Fun fact regarding related tools: eslint-plugin-json-files is sorting the scripts just fine, prettier-plugin-packagejson is not.
Also: it seems that compilerOptions inside any tsconfig.json or tsconfig.xxx.json are not sorted either.
jackypan1989arahatashun
Metadata
Metadata
Assignees
Labels
No labels