Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces Prettier with oxfmt as the default formatter in the Angular workspace schematics, updating the dependencies, configuration templates, and associated tests. Feedback on the changes highlights that the excludeFiles property in the new .oxfmtrc.json.template is unsupported by oxfmt and will cause configuration parsing to fail, so it should be removed.
| "files": ["**/*.html"], | ||
| "excludeFiles": ["**/index.html"], | ||
| "language": "angular-html" |
There was a problem hiding this comment.
The excludeFiles property is not supported by the Association configuration in oxfmt / oxc. Since oxfmt uses strict JSON schema validation and deserialization (often with deny_unknown_fields enabled), including an unsupported property like excludeFiles will cause the formatter to fail to parse the configuration file and crash. Removing this property resolves the issue, and index.html will be formatted successfully under the angular-html association (which is fully compatible with standard HTML).
"files": ["**/*.html"],
"language": "angular-html"
There was a problem hiding this comment.
excludeFiles is supported by associations in Oxfmt 0.74.0, which this PR uses. It is present in the published configuration schema and documented in the associations configuration https://oxc.rs/docs/guide/usage/formatter/config.html#associations
3a9b624 to
5faafa7
Compare
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 generated projects set up prettier
What is the new behavior?
Now that oxc-project/oxc#17852 is resolved, oxfmt can be used in modern Angular project. This PR replaces the prettier dependency and config by oxfmt
Does this PR introduce a breaking change?
Other information