Why not rewrite ESLint in Rust?

(github.com)

30 points | by ksec 29 minutes ago

10 comments

  • david_p 0 minutes ago
    In case some people here are unaware, this project seems relevant to the conversation: https://oxc.rs/docs/guide/usage/linter

      Oxlint is a high-performance linter for JavaScript and TypeScript built on the Oxc compiler stack. 
      Oxc: The Oxidation Compiler is a collection of high-performance tools for JavaScript and TypeScript written in Rust.
  • geraldwhen 6 minutes ago
    ESLint is so slow and an absolute dog on memory on large codebases.

    Everyone will move on if they don’t move with the times.

  • thimabi 3 minutes ago
    > When someone asks, “why don’t you rewrite ESLint in Rust?” what they’re really asking is, “why can’t ESLint be faster?” […] 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.

    I’ve never heard this framed in this way and this is, in fact, a very powerful argument. Rust code benefits from memory safety, from the compile-time guarantees that make it easier for AI agents to write and maintain it… but at the end of the day many people like Rust mostly because it facilitates building more performant software.

    I wonder if the vast majority of that performance boost could be obtained if efforts were directed towards improving programs in their own language, like the ESLint team is doing, rather than going straight for a full-on rewrite in Rust. My nagging suspicion is that this is very much possible, as seen for instance in VS Code pushing the boundaries of Electron apps. But that does require some effort.

  • ch4s3 5 minutes ago
    I think the idea that dogfooding is a core reason to stay in js is very reasonable given the nature of the tool.
    • NuclearPM 3 minutes ago
      I’m not sure where your missing comma is supposed to go.
      • nhinck3 2 minutes ago
        parenthetical commas around "that dogfooding is a core reason to stay in js"
  • eterm 13 minutes ago
    This is a decent enough explanation, it's not dogmatic or anti-AI, just a calm explanation of where they stand.
  • fwlr 1 minute ago
    Rewriting ESLint in Rust will produce up to 1 Rust-based JavaScript linters.

    Not rewriting ESLint in Rust has already produced >1 Rust-based JavaScript linters and that number will likely continue to increase.

  • etatester 4 minutes ago
    Sure, nobody has time, everyone is a volunteer, nevermind the $100k/year being donated to eslint.

    The rest reads like a bunch of excuses. It's very clear that linting via rust is very much possible, you're only lacking intent. Which is perfectly fine, but at least be honest.

    • throw-the-towel 2 minutes ago
      100k/year would barely cover one full-time dev.
      • etatester 0 minutes ago
        Still very far from "everyone is a volunteer." $100k should go a very long way with AI
  • sherburt3 18 minutes ago
    The worst part about rust is rust evangelists
    • sevenzero 12 minutes ago
      Idk considering we get like 1 once a decade CVE every week now, mostly due to using tech that doesn't have secure memory access, it kinda makes sense to switch shit to Rust.
      • eterm 4 minutes ago
        It makes sense to switch from non-memory safe languages to memory safe languages.

        If ESLint were written in C that'd be a compelling (ish) argument.

        But ESLint is written in Javascript, and doesn't suffer from memory access issues at this layer.

        Now if you'd said, "Let's re-write V8 in rust", then you'd have a reason to argue for memory safety.

        • sevenzero 2 minutes ago
          Well OPs comment wasnt about ESLint was it?
    • Ygg2 14 minutes ago
      Categorically false.

      Worst part about Rust is vibe coders using Rust, while hating the language.

      • _tardigrade_ 6 minutes ago
        we rewrote most our internal apps to rust and we dont even have one rust developer
        • carlos-menezes 1 minute ago
          "we" is doing a lot of heavy lifting there.
      • orbital-decay 4 minutes ago
        Actual vibecoders are probably ambivalent since they don't read the code anyway.
  • chpatrick 11 minutes ago
    There's oxlint for that.
  • morkalork 7 minutes ago
    Very reasonable take