ESLint 10.0: New features for JavaScript code analysis in major release
The linter designed for JavaScript brings several changes, including new options for the RuleTester API and an update in handling JSX references.
(Image: Tero Vesalainen/Shutterstock.com)
The open-source tool ESLint for static code analysis has been released in version 10.0, with numerous new features and breaking changes. As this is a major version, developers may not receive the update automatically via npm but will need to download it manually: npm i eslint@10.0.0 --save-dev.
ESLint 10.0 introduces new behavior regarding configuration files: it localizes eslint.config* by starting from the directory of each file it is linting. Previous versions started from the current working directory. This change allows multiple configuration files to be used in the same run, which is particularly helpful in monorepo setups.
(Image:Â jaboy/123rf.com)
Tools and trends in the JavaScript world: enterJS 2026 will take place on June 16 and 17 in Mannheim. The program revolves around JavaScript and TypeScript, frameworks, tools and libraries, security, UX, and more. Early bird tickets are available in the online ticket shop.
Updates for RuleTester API and JSX References
The RuleTester API allows plugin authors to test their rules against custom test cases and configurations. In ESLint 10.0, RuleTester receives some enhancements for more robust test definitions and improved debugging. The RuleTester#run() method can now handle assertion options, namely requireMessage, requireLocation and requireData. Developers can thus enforce stricter requirements in their tests.
Furthermore, ESLint tracks JSX references to enable correct scope analysis of JSX elements. Previously, incorrect results could occur when dealing with JSX identifiers. The ESLint team provides the following code example:
import { Card } from "./card.jsx";
export function createCard(name) {
return <Card name={name} />;
}
Here, false positives could occur, as <Card> could be reported as “defined but never used.” A false negative was also possible, as removing the import might not have thrown the “undefined variable” error.
In addition to other updates, numerous breaking changes are included in the release. According to the ESLint team, most users should be able to update ESLint to version 10.0 without build changes, but a migration guide is available with more in-depth details on the breaking changes. The new features are covered in the announcement in the ESLint blog.
(mai)