New Jul 5, 2024

What's coming next for ESLint

Libraries, Frameworks, etc. All from ESLint Blog View What's coming next for ESLint on eslint.org

When we released ESLint v9.0.0 in April, it was the first major release in 30 months and formally introduced the new configuration system. ESLint v9.0.0 also made some rule API changes to prepare the core for what’s coming next. After the release, we spent a lot of time creating compatibility utilities, a configuration migration tool, and a rule API transform utility to help the ecosystem move to ESLint v9.0.0. All of that work was necessary for us to move on to the next significant changes coming to ESLint.

Language plugins

Two years ago, the TSC decided that it was time to open up ESLint to make it possible to lint languages other than JavaScript. Practically speaking, there are a lot of things that the ESLint core does that are not specific to JavaScript: the finding and reading of files, the loading of file-specific configuration, collecting rule violations, outputting results to the console, and so on. Further, we kept finding plugins that were linting other languages (like GraphQL and HTML) from within ESLint, passing a different AST through the same logic that JavaScript was using. That’s inefficient and error-prone, and there had to be a better way.

In 2023, the language plugins RFC was formally approved. In order to implement this RFC, however, we needed to officially ship the new configuration and make some rule API changes. The rule API changes, in particular, were necessary to separate what the ESLint core was doing and what a language plugin would provide to custom rules. Once those two changes were available, we started the laborious task of refactoring the ESLint core to extract the JavaScript-specific parts from the language-agnostic parts.

Here’s what to expect going forward (with no specific timetable as everything is dependent upon contributor availability):

The current plan is to have these three official ESLint language plugins with the hopes that they serve as examples for the ecosystem to develop more language plugins.

With language-specific functionality extracted into separate repositories, that leaves us with the task of rewriting the core completely.

Core rewrite

The architecture of the code in the ESLint repository hasn’t changed considerably since ESLint was first created 11 years ago. As a result, there is a lot of technical debt that has accumulated and prevents us from making some of the changes we’d like to make. Some of the problems we currently face:

After thinking through the options of continually to incrementally change the existing core or starting from scratch, we decided that it was time to start from scratch. While we firmly believe that a complete rewrite represents a significant risk, after 11 years, we can honestly say that we got the most out of the initial architecture.

Going forward, here’s what you can expect:

Conclusion

We are very excited for this future direction of ESLint as we think this represents the next logical step in ESLint’s evolution. Turning ESLint into a language-agnostic linter that anyone can write plugins for will simplify development by reducing the number of linting tools and editor extensions any one project needs. Further, rewriting our core into a more composable API allows easier and more customizable integrations, along with owning our own type definitions to ensure compatibility with the APIs.

ESLint has made it through 11 years with its current architecture, and we hope that these changes will get us through the next 11 years.

Scroll to top