Skip to content

formatter: implement a new oxfmt application #10573

@camchenry

Description

@camchenry

Although the formatter is in the very early stages of development, I think it would be useful to start working on an oxfmt executable which functions and is named similarly to oxlint.

In the long-term, we could implement some features that Prettier supports but for now I would say that we just support the following:

  • Can format all JS files passed as paths: oxfmt src -> format all files in src directory
  • Output the newly formatted code to standard output by default
  • Write formatted code in-place if --write is passed
  • Output some basic stats at the end: Formatted 100 files in 100ms.

This way, we can start working on benchmarking and see how we compare to prettier and Biome and where we can improve.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions