Post

Announcing Oxfmt Alpha! 🚀 We’re excited to announce the alpha release of Oxfmt, our Rust-powered formatter. We designed Oxfmt to be easily adoptable, especially for existing Prettier users More below and in our announcement post voidzero.dev/posts/announ...

voidzero.devAnnouncing Oxfmt AlphaOxfmt 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.

19 reposts138 likes

If you wonder what Prettier-compatible means: ✅ Over 95% compatibility with Prettier's output leading to minimal diffs 🔄 Migrate your configuration just by renaming your `.prettierrc` (supporting most major options) And for switching you get 30x faster formatting performance with Oxfmt!

As soon as embedded syntax (in my case GraphQL, html and css) lands, I’m going to aggressively try and adopt this at work. We just had to switch back from biome to prettier because of stability issues (and continuing lack of support for embedded syntax), but I miss the speed.

not sure if feedback is useful but slight nitpick on the example given in the blog post: sorting imports is not a styling concern (and should imo not be done by a formatter). it's a semantically meaningful change, whereas a formatter is expected to never make semantically meaningful changes.

+1 Sorting imports is kind of sorting object properties. In most cases it's fine, but it actually changes semantics. Sorting imports can cause some very difficult-to-debug problems as soon as you have cycles, since then they get "de-cycled" differently and some vars suddenly start being in TDZ.

Merging duplicate import statements is instead something that a formatter can safely do, as long as it preserves the order in which each import occurs the first time.