You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
orapps/xxx/package.json
) except for./package.json
.I checked by changing the order of two scripts (e.g. I put
nx
beforelint
). 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 anytsconfig.json
ortsconfig.xxx.json
are not sorted either.The text was updated successfully, but these errors were encountered: