Repository navigation
feat(@angular/cli): support Oxfmt for automatic file formatting - #34460
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the Angular CLI formatting utility to support both oxfmt and prettier as formatters, renaming the utility file and updating imports and tests accordingly. The review feedback suggests improving robustness and performance by caching the resolved formatter path at the module level to avoid redundant disk I/O. Additionally, it points out that the --no-error-on-unmatched-pattern flag should only be passed to prettier, as oxfmt uses strict argument parsing and will fail if an unknown option is provided.
alan-agius4
left a comment
There was a problem hiding this comment.
Thanks for working on this! Left a few comments regarding formatter precedence, caching during ng update, and E2E test cleanup.
8fc3c20 to
b17c46a
Compare
|
Thanks for the review @alan-agius4 ! I amended the commit with your feedback. |
|
@cexbrayat, thanks for this. |
|
This PR was merged into the repository. The changes were merged into the following branches:
|
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The only auto formatting supported out if the box is prettier
What is the new behavior?
If the project has oxfmt installed, then oxfmt is preferred. Prettier is then used as a fallback to preserve the existing behavior.
Does this PR introduce a breaking change?
Other information