/posts/announcing-oxfmt-alpha.mdFor more technical details, implementations, and considerations for Oxfmt, see the blog post on the Oxc website.
TL;DR: Oxfmt is a fast Rust-based formatter that is available now in alpha stage and supports JavaScript and TypeScript files. It is 30x faster than Prettier while having >95% compatibility.
VoidZero is excited to announce the alpha release of Oxfmt (/oh-eks-for-mat/), the Rust-based code formatter. This release focuses on JavaScript and TypeScript, with support for additional languages coming soon. Oxfmt is a welcome addition to VoidZero’s existing projects of build tool, bundler, test runner, and linter.
The first stable version of Oxlint was released half a year ago. Since then, there have been consistent requests for styling changes like sorting imports. We firmly believe that a linter checks for logic, while a formatter focuses on code style. These requests fall within the domain of a formatter.
However, existing tools don't always respect this boundary. Meaning additional configurations are needed to disable overlapping rules. By building both Oxfmt and Oxlint, we're able to reduce setup configurations and create a better developer experience.
Oxfmt is designed with these goals in mind:
VoidZero designs tools to be compatible with existing solutions because:
Like how Vitest is compatible with Jest, Oxfmt is designed to be compatible with Prettier.
Oxfmt currently passes around 95% of Prettier’s JavaScript and TypeScript tests. There should be minimal formatting differences when migrating from Prettier. VoidZero has been actively submitting bug reports and pull requests directly to Prettier to reduce the remaining differences. Many of these improvements landed in the recent Prettier 3.7 release.
While Oxfmt does not yet support all of Prettier’s configuration options, it does support major options like singleQuote, printWidth, and more. (full list)
For Oxfmt’s beta release, VoidZero is working on:
We’d love to hear your feedback on Oxfmt, and are excited to see how it helps improve your development workflow.
Connect with us:
oxfmt bugs to oxcVoidZero would like to extend our gratitude to:
biome_formatter infrastructure.CallToAction.vue