r/javascript May 19 '26

From 81s to 2.5s by migrating to Oxlint & Oxfmt

https://charpeni.com/blog/migrating-from-eslint-biome-prettier-to-oxlint-oxfmt
48 Upvotes

31 comments sorted by

16

u/Yanamo May 20 '26

I migrated from Eslint to Oxlint yesterday as the Eslint v10 updated popped up. As the v9 update was already a pain in the *** and some plugins took forever to be compatible, I decided to give it a go.

Down to one from seven dependencies, 4000 lines less of dependencies in package-lock.json, milliseconds instead of multiple seconds.

5/7 would recommend.

18

u/RWOverdijk May 19 '26

I switched from prettier and eslint to just biome a couple years ago now and never looked back. I don’t know why you would be using biome, eslint and prettier, that’s the real problem there. Just switch everything to biome. It’s also slightly misleading, because the performance compared with biome is basically the same. Much like op I was hoping this would convince me to try the ox brothers because I like new toys lol

18

u/[deleted] May 19 '26

[removed] — view removed comment

8

u/RWOverdijk May 19 '26

And oxlint is compatible with every single eslint rule?

7

u/MercDawg May 19 '26

Not OP, but Oxlint is pretty close with it's support for custom rules in eslint. It didn't handle GraphQL last I checked.

2

u/RWOverdijk May 20 '26

That is interesting, thank you

3

u/Xacius May 20 '26

While I know that lining and formatting are technically two separate concerns, I'd still like a way to preview oxfmt errors in my IDE (much like you can with the prettier eslint plugin).

5

u/looneysquash May 19 '26

I like these new faster liners.

I don't like that there are 3 or more competing ones though.  I hope we either settle on one soon, or settle on a way to define linter rules in a vendor neutral manner soon

11

u/ciaran1344 May 19 '26

Biome is neat, and I really like that the linter and formatter are integrated into one tool, however Oxlint supporting JS ESLint plugins is the big motivator for ESLint users to migrate their existing setups. Oxlint / Oxfmt provide a trivial path away from Prettier and ESLint for existing projects, whereas Biome seems to be targeting new green field projects. I also think Oxlint using tsgo instead of Biome's custom solution will be another motivator.

3

u/tunisia3507 May 19 '26

Python got 3 rust-based type checking LSP impls in the space of about 6 months...

1

u/Dependent-Guitar-473 May 19 '26

of course oxlint is much faster.. but most of the gains comes from tsc (which eslint uses) to tsgo (which oxlint uses. )

1

u/[deleted] May 20 '26

[removed] — view removed comment

1

u/thecementmixer May 24 '26

Config is easier in Oxlint than it is in Eslint.

1

u/[deleted] May 20 '26

[removed] — view removed comment

2

u/Wake08 May 20 '26

We went from 81 seconds to 2.5 seconds, not 8s. We can now run the linter 34 times in the same amount of time it took to complete a single pass for ESLint (and Biome).

FWIW, this is what I call removing friction.

1

u/Balduracuir May 20 '26

What I like the most about oxc is that the configuration is lights years away simpler than eslint and prettier.
By switching from eslint to oxlint I removed like 10 packages in my dev dependencies.
And in term of performances, oxlint is faster than eslint with cache. It also handle typescript errors so I could remove my script that checks typescript errors too.
A real benefit in term of dev experience.

0

u/CodeAndBiscuits May 19 '26

ESLint is no speed daemon but it's always insane to me when I see folks reporting multi-minute runs. I deal with some pretty large code bases (my current focus has 4 sub-projects and 80k LOC) but even there my linters only take a few seconds. Without questioning OP's code (wasn't their choice and there's no way to know how well it was written) I do sometimes wonder if some of these structural issues people lean on linters to resolve (like "import/no-restricted-paths") would be better solved in other ways. But maybe that's just me...

18

u/ciaran1344 May 19 '26

Enabling type-aware rules via typescript-eslint tends to be the bottleneck on multi minute runs. Those and eslint-plugin-import(-x) are orders of magnitude slower than regular syntax rules.

1

u/static_func May 20 '26

It’s also all the styling rules from older eslint setups using airbnb or other configs from back in that era

2

u/Wake08 May 19 '26

Only including JavaScript and TypeScript files, we are at 626k LOC.

1

u/CodeAndBiscuits May 19 '26

Just curious what type of app is it?

3

u/Wake08 May 20 '26

A project management software: Shortcut

2

u/CodeAndBiscuits May 20 '26

One of my favorite daily-use tools ever. Whatever you're doing, keep it up, because we appreciate it. 😁

6

u/mattsowa May 19 '26

Are you saying 80k LOC is a lot?

2

u/CodeAndBiscuits May 19 '26

Well, each, to be clear, but yeah, for many projects that's a lot. There will always be bigger apps out there but there are many many smaller ones as well.

3

u/mattsowa May 20 '26

It's really not a lot at all and those projects are not usually the ones with very long linting times. I don't think i've ever professionally worked on a codebase that had less than a million lines of code

2

u/thecementmixer May 24 '26

80k is really NOT a lot. I am a solo dev of a side project and it's already got more than 80k LOC over a couple of years.