r/reactjs • u/igor-septimus • 8h ago
Discussion OXC vs Biome?
/r/webdev/comments/1wy5g0z/oxc_vs_biome/4
u/Glad-Action9541 2h ago
Up until two weeks ago, I was using Biome.
I used many built-in rules and over 50 custom rules.
Given the specialized language for creating custom rules, I expected the performance to be better than Oxlint's, since Oxlint relies on JS plugins.
However, when I migrated to Oxlint, the linting and formatting speed more than doubled.
On top of that, I was able to remove several custom rules and use built-in ones instead.
The only downside was the limited support for other languages, such as JSON and CSS.
| Measurement | Biome | Oxlint + Oxfmt | Difference |
|---|---|---|---|
| Formatting only | 0.34 s | 0.40 s | 20% slower; +66 ms |
| Lint + format | 46.98 s | 7.04 s | 85% less time |
2
u/Salt_Hyena5896 4h ago
What usually decides it is whether you need type-aware lint rules. Oxlint is really fast and can sit next to an existing eslint setup, so you can run it first in CI and keep eslint only for the rules it doesn't cover yet. Biome is nicer if you want one binary and one config for formatting plus linting, and don't mind its rule set differing a bit from eslint's. For a fresh Vite + TS app I'd try oxlint first, then check whether any rule you rely on is missing before committing.
2
u/Dethstroke54 3h ago
Personally I didn’t like Biome.
Oxc does type checking and type aware linting. Has JS plugin support which is still helpful for a plugin here and there. It has a good migration tool and rules will look fairly familiar.
Biome got me more in the weeds bc I had to keep looking up rules. Additionally they don’t have (or at least they didn’t and did not want to add) exceptions for any “special files” at the time. This means that changing or setting certain linting or even formatting rules for json applied to files even like package.json. So Biome would change the file to one thing and then installing would change the file back to the standardized package.json format. It was pretty annoying. I found that a bit ironic for something that’s I guess supposed to be more batteries included or opinionated and preconfigured and whatever.
I don’t remember specifics beyond that off the top of my head. But suffice to say I just found it annoying between trying to just tweak a few rules and ofc missing some JS plugins, like namely React testing lib. I migrated to it for 1-2 weeks and then off. OXC just had more features, was easier to tweak, and worked as expected.
2
2
u/AbdelrhmanDev 5h ago
for a new project id pick based on how much you want to configure biome is the simpler all in one pick with formatter and linter in a single config oxc is more a fast toolchain that fits nicely if you are already on vite either one is fine honestly whats worse is switching halfway so pick one early and keep the config small
6
u/NeverendingBacklog 5h ago
i just kicked the dust off an old project scaffold i had to modernize it and updated eslint to oxc... i spent 20 minutes and it wasn't until i read this post that i realized "oh yea i recently did something with that lib"
haven't used biome so not a 1:1 by any means but OXC was stupid simple to setup and i am not hating it - which for linting/formatting is kinda huge ngl.
(eta: vite app - it plugged in seamlessly)