Skip to content

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

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

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 thread packages/schematics/angular/workspace/files/.oxfmtrc.json.template
@cexbrayat
cexbrayat force-pushed the feat/oxfmt-generated-projects branch from 3a9b624 to 5faafa7 Compare October 21, 2026 04:21
@alan-agius4

Copy link
Copy Markdown
Collaborator

Thank you for putting this together, @cexbrayat!

For the time being, we would like to keep Prettier as the default formatter for newly generated workspaces. We can re-evaluate switching to oxfmt when we are closer to v23.

Closing this PR for now, and we can revisit it in the future!

@cexbrayat

Copy link
Copy Markdown
Member Author

Thanks for the feedback @alan-agius4

Instead of waiting for a major release, could it be considered to have a --formatter=oxfmt option when running ng new? Prettier would still be the default, but that would let people who want to use a faster alternative to generate the project with the proper deps and config. WDYT?

@alan-agius4

Copy link
Copy Markdown
Collaborator

We'd prefer not to introduce a --formatter option to ng new. Our goal is to reduce the number of options we expose and maintain during workspace generation. With #34460 in place, the CLI will still automatically use oxfmt if a user configures it in their workspace.

@cexbrayat

Copy link
Copy Markdown
Member Author

Understood. I'll ping you when v23 is close to check if it's worth reopening the PR. Thanks Alan.

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.

2 participants