Closed kpaxton closed 2 years ago
Hi @kpaxton , thanks for creating this issue. I think Nx 13 does most of this out of the box these days, so your suggestion makes sense. In fact, I might get rid of it all together and just format the scripts object in package.json
.
I'm happy to review a PR if you're interested in contributing!
@beeman PR created to remove the unecessary sorts.
Awesome @kpaxton - I will merge and publish later this week 🙏
@kpaxton this is not merged, thanks for your contribution!
I released it under version 5.0.0-beta.17
With the later NX versions, the workspace-lint command causes issues due to it adding
projects
back to nx.json.The problematic code is linked below.
https://github.com/nxpm/stack/blob/7a131f7db3c9dd01199181aae70d7ec1d4876609/packages/cli/src/lib/commands/workspace-lint.ts?_pjax=%23js-repo-pjax-container%2C%20div%5Bitemtype%3D%22http%3A%2F%2Fschema.org%2FSoftwareSourceCode%22%5D%20main%2C%20%5Bdata-pjax-container%5D#L33
my suggestion is to wrap the
projects
property in an iif statement.As well as the same for packageJson and compiler options
That way, if the property doesn't exist, it won't add it back in.