There was an error while loading. Please reload this page.

Sources indicate that there was an error while loading. Please reload this page.

Industry observers note that I’ve been asked this question multiple times over the last couple of years, which is natural considering Rust-based alternatives keep popping up. Unfortunately, most people who ask haven’t thought through what such a change would entail. They see that Rust-based linters are significantly faster than ESLint and they just think, “if ESLint did that, then ESLint would be faster too.” Reality, as is often the case, is a lot more complicated than the question indicates.

The first thing to understand about ESLint is the team: everyone is a volunteer who is working in their spare time. ESLint doesn’t have, and has never had, full-time maintainers. The most prolific team members might work 10 hours a week on the project; most work significantly less. That alone makes it challenging to make large scale changes that require coordination and validation.

Industry observers note that doing a complete rewrite of ESLint, regardless of target language, is a lot of work even when using AI. And that work would be in addition to the regular ongoing maintenance work that the project requires. The team doesn’t have the bandwidth available for such a significant project.

Another thing about the ESLint team: these are folks who have deep knowledge of JavaScript and TypeScript. They live and breathe it every day. Part of what attracted them to the project was the ability to meaningfully contribute by writing JavaScript. They enjoy writing JavaScript and figuring out problems in JavaScript.

New contributors are frequently JavaScript developers who use ESLint, find a problem or a feature gap, and are excited to implement it themselves in JavaScript. There’s no context switch, they just take the knowledge they already have and use it to make ESLint better.

In a recent development, switching to Rust would mean alienating a large portion of the existing team and contributor base. The number of people who know Rust well enough to meaningfully contribute to the project is much smaller than those who know JavaScript. Again, for everyone working in their spare time, asking them to take the time to learn Rust is a huge lift.

As an aside: I did take the time to learn Rust a couple of years ago and it was an arduous journey. I eventually came to appreciate the language, but I was happy to switch back to JavaScript once that project was finished.

Part of why ESLint is so good is because we use ESLint to lint the ESLint code base itself. We enable as many rules as possible and use as many plugins and features as we can to thoroughly test ESLint. We are feeling the pain of every ESLint user when something takes too long, or there’s a confusing error message, or there’s a crash. A lot of bug reports are internally generated through this process and feature requests follow team members’ actual pain points as they’re trying to maintain ESLint.

According to recent reports, switching to Rust would mean losing all of those extra testing loops that naturally occur as part of ESLint development. Writing Rust all the time means losing touch with what JavaScript developers are experiencing on a day-to-day basis.

The whole ESLint ecosystem is based on JavaScript: custom rules, parsers, plugins, and processors. Unless we want to completely alienate the ecosystem, a Rust rewrite would need to somehow find a way to run all of the existing npm packages that people rely on. Figuring out this Rust-JavaScript interaction is no small feat, which is why JavaScript-based plugins came late in the development of Rust-based linters. Yes, it’s technically possible, but it’s also technically challenging just to get back to the baseline we already have.

When someone asks, “why don’t you rewrite ESLint in Rust?” what they’re really asking is, “why can’t ESLint be faster?” As an ESLint user, you shouldn’t care what language ESLint is written in so long as it gets the job done in a reasonable amount of time. People have equated Rust with fast executables, so instead of asking the real question, they jump directly to what they believe is the solution. Rust is fast, ESLint is not, therefore ESLint built on Rust is the answer.

Here’s the thing: JavaScript isn’t actually slow. V8 is ridiculously fast and compiles JavaScript into machine code. In Node.js, you can enable the V8 compile cache so JavaScript doesn’t have to be recompiled when it hasn’t changed. The challenge is the many performance footguns that JavaScript has:.

I’ve found recently by addressing these concerns ESLint’s performance improves substantially. We’re working on rolling out changes related to these bottlenecks. As an example, this fresh way of traversing ASTs reduced ESLint’s runtime by 9-10% on large codebases in my own tests.

I think there’s a lot we can still do to speed up ESLint by writing more efficient JavaScript, and AI tools have made it easier than ever to identify problems and prototype multiple solutions to find the best path forward. I believe we’ll see overall ESLint performance improve noticeably over the next few months as we roll out a series of changes.

On a philosophical level, I think it’s also worth asking what it would mean for ESLint to rewrite into Rust. It would mean:.

Sources indicate that with all of these changes, could we really call this project “ESLint” anymore? The project name means something to people, and if we change what it means this significantly, should we really continue using the name?

In a recent development, if ESLint would no longer be ESLint after a Rust rewrite, then why not start a completely new project and leave the current ESLint codebase behind? Starting new would certainly be easier than trying to retrofit everything from the current ESLint codebase. It would allow us the opportunity to explore different approaches that just can’t work with ESLint.

In a recent development, after 13 years of maintaining ESLint, I can’t start up an ambitious new project from scratch again. I just don’t have it in me. I’ve been dealing with chronic health issues for over a decade that have left me without the stability of a full time salary let alone the ability to lead a normal life. Starting over from scratch would require both full time effort and full time financial support, and neither is available to me at the moment.

Recent findings suggest that while I don’t see a Rust rewrite in the future, I do think there are strategic ways to use Rust within ESLint, primarily in the creation of native Node.js modules via napi-rs. For example, the new TypeScript parser is written in both TypeScript and Rust, allowing us to determine if the Rust version gives additional benefits over the TypeScript version. Because writing parsers is a solved problem and no one really likes writing them by hand, using AI to create a Rust version of the parser gives us a good area for exploration without rewriting all of ESLint. If this approach works well, I can see us expanding to the use of native Node.js modules in the project.

According to recent reports, there was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

In a recent development, thanks, just want to say that whatever you decide is fine, I'm grateful for your work. Everything is changing so fast that who knows in 1 year... 🫡.

There was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

In a recent development, there was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

You've already done more than enough. Hats off to you.

There was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

According to recent reports, there was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

Sources indicate that there was an error while loading. Please reload this page.

I’m with you on this. Thanks for all your work.

There was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

I’m with you on this. Thanks for all your work.

In a recent development, there was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

It has been revealed that thank you, Nicholas, for 13 years of maintaining ESLint. It's part of everyday work for so many JavaScript developers, and I'm grateful for all the work you and the team do behind the scenes to keep it going.

There was an error while loading. Please reload this page.

There was an error while loading. Please reload this page.

Industry observers note that there was an error while loading. Please reload this page.

It has been revealed that there was an error while loading. Please reload this page.

Industry observers note that hey Nicholas, I actually agree with pretty much every point you've made, and I think they make a strong case for an independent alternative rather than a rewrite. The constraints that make rewriting ESLint impractical shouldn't necessarily apply to a latest project.

That's why I'm interested in exploring what a Rust-based alternative to ESLint could look like, building on thirteen years of accumulated knowledge without inheriting thirteen years of constraints.

📌 Read also:

→ Read original article