Skip to content

feat(@schematics/angular): use Oxfmt in generated workspaces - #34459

Open
cexbrayat wants to merge 1 commit into
angular:mainfrom
cexbrayat:feat/oxfmt-generated-projects
Open

cexbrayat wants to merge 1 commit into
angular:mainfrom
cexbrayat:feat/oxfmt-generated-projects

Conversation

@cexbrayat

Copy link
Copy Markdown
Member

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

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?

  • Yes
  • No

Other information

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +8 to +10
"files": ["**/*.html"],
"excludeFiles": ["**/index.html"],
"language": "angular-html"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

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"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@cexbrayat
cexbrayat force-pushed the feat/oxfmt-generated-projects branch from 3a9b624 to 5faafa7 Compare October 21, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant