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
When running nx repair on a repo, the nx.json file is updated in a way that is different from the format specified by .prettierrc. When running nx format:write after, the generated diff is gone.
This means that nx repair generates nx.json that is unstable.
Expected Behavior
The updated nx.json created by running nx repair should be properly formatted by prettier.
Notice that nx.json is updated: the diff is coming solely from formatting
Run nx format:write: notice that diff disappears
This suggests that the output of nx repair is not property formatted. I would expect the files generated by nx repair is already properly formatted, because we run nx format:check in our CI pipeline to ensure that PRs are properly formatted. A team member who just ran nx repair may commit the changes without knowing it is not correctly violated. Of course this can be fixed with a pre-push hook, but I would expect formatting to be part of the job done by nx repair.
Current Behavior
When running
nx repair
on a repo, thenx.json
file is updated in a way that is different from the format specified by.prettierrc
. When runningnx format:write
after, the generated diff is gone.This means that
nx repair
generatesnx.json
that is unstable.Expected Behavior
The updated
nx.json
created by runningnx repair
should be properly formatted by prettier.GitHub Repo
https://github.com/terrymun/nx-repair-prettier
Steps to Reproduce
nx repair
nx.json
is updated: the diff is coming solely from formattingnx format:write
: notice that diff disappearsThis suggests that the output of
nx repair
is not property formatted. I would expect the files generated bynx repair
is already properly formatted, because we runnx format:check
in our CI pipeline to ensure that PRs are properly formatted. A team member who just rannx repair
may commit the changes without knowing it is not correctly violated. Of course this can be fixed with a pre-push hook, but I would expect formatting to be part of the job done bynx repair
.Nx Report
Failure Logs
No response
Package Manager Version
4.1.0
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: