Zum Inhalt springen

Eslint Release Notes

Einträge
16
Quellen
1
Zuletzt aktualisiert

Folge Eslint, um die Release Notes in deinen Feed zu holen.

Eslint

ESLint v10.16.0 released

Highlights

Faster config merging

This release includes an updated version of @eslint/config-array with a faster config object merging implementation. This is the step in which ESLint calculates the final configuration for a file based on all config objects that match the file. In benchmarks with a moderate to large number of matching config objects, this step is now about two times faster.

Config merging is only one part of an ESLint run, so the effect on total lint time depends on your project. No changes are required on your end.

Suggestions

  • The no-new-native-nonconstructor rule now provides suggestions to convert invalid constructor calls to valid function calls.
  • The no-eq-null rule now provides suggestions to convert comparisons using == or != into comparisons using === or !==, with or without undefined included.
  • The eqeqeq rule now provides additional suggestions that include comparisons with undefined.

Other rule improvements

The following core rules have been updated to address edge cases:

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

Retiring the contributor pool

Back in 2022, we shared our plan to pay all contributors for non-trivial contributions to ESLint. Our belief was that all contributions of a certain size are valuable and it didn’t make sense to pay team members for their pull requests and not pay anything for work done by outsider contributors. We decided that people deserved to be compensated for taking the time out of their day to contribute regardless if this was their only contribution or an ongoing one. For outsider contributors, we called this the contributor pool.

What was the contributor pool?

The contributor pool was a pool of money set aside each month to pay outsider contributors for meaningful contributions to the project. Initially we started with a $1,000/month pool before moving to a 10% of monthly income pool. Eligible contributions could be pull requests (even documentation updates), helping answer questions in Discord, or anything else that was a net benefit to the project as a whole. We hoped that doing so would encourage more contributions and in many cases it did. While most first-time contributors had no prior knowledge of the contributor pool, it did attract repeat contributions and, eventually, new team members.

Over the last couple of years, the number of contributions grew and so did the payouts. In 2025, we paid out USD $24,680 to outside contributors. We considered this a success.

Year …

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v10.15.0 released

Highlights

Faster config resolution

This release includes an updated version of @eslint/config-array with a faster implementation of config resolution. This is the step in which ESLint decides, for every file and directory it visits, whether the path is ignored and which objects in the config apply to it.

In our benchmark, which resolves the configs for 1,500 files against a typical flat config, this step is more than three times faster with POSIX paths and about 15% faster with Windows paths. The improvements, made primarily with AI assistance, include:

  • A config object’s files and ignores patterns are analyzed only once instead of once per file.
  • Paths that cannot match a pattern’s literal parts, such as the src/ or .js in src/**/*.js, are rejected before the full glob match runs.
  • For POSIX paths, a file’s location relative to the base path is now computed more efficiently when the path is already normalized.

Config resolution is only one part of an ESLint run, so the effect on total lint time depends on your project. No changes are needed on your side.

Rule improvements

The following rules have been updated to address edge cases or to make reported problem locations more intuitive:

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint now officially supports linting of shell scripts

Back in July of 2024 we announced our plan to make ESLint a more general-purpose linter capable of linting any language. Since then, we’ve added official support for JSON, Markdown, and CSS. Today, we’re happy to add shell scripts to that list with the introduction of the @eslint/shell plugin.

Shell linting with @eslint/shell

The @eslint/shell plugin is an officially supported language plugin for ESLint. It provides parsing for shell scripts, a set of rules inspired by ShellCheck, and a recommended configuration. To use it, install it from npm:

npm install @eslint/shell -D

Copy code to clipboard

Then add the recommended configuration to your eslint.config.js:

import { defineConfig } from "eslint/config";
import shell from "@eslint/shell";

export default defineConfig([
    {
        plugins: { shell },
        extends: ["shell/recommended"],
    },
]);

Copy code to clipboard

The recommended configuration uses Bash and enables rules that catch common problems, such as unquoted expansions, unused variables, and unsafe read usage. You can also configure the plugin manually and choose a shell dialect:

import { defineConfig } from "eslint/config";
import shell from "@eslint/shell";

export default defineConfig([
    {
        files: ["**/*.sh"],
        plugins: { shell }, …

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v10.14.0 released

Highlights

In ESLint v10.14.0, the following rules have been updated to avoid incorrect or unexpected behavior in some edge cases:

Features

Bug Fixes

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v10.13.0 released

Highlights

Several core rules have been updated to report more linting problems.

no-use-before-define

The no-use-before-define rule has been updated to account for the fact that IIFEs execute immediately by treating them as part of the execution context where they are defined and called.

This change can produce more linting errors in cases such as the following:

/* eslint no-use-before-define: ["error", { variables: false }] */

(() => {
    console.log(foo); // 'foo' was used before it was defined.
})();

const foo = "bar";

Copy code to clipboard

no-obj-calls

The no-obj-calls rule has been updated to report calls to globalThis.

/* eslint no-obj-calls: "error" */

const foo = globalThis(); // 'globalThis' is not a function.

const bar = new globalThis(); // 'globalThis' is not a function.

Copy code to clipboard

no-unsafe-optional-chaining

The no-unsafe-optional-chaining rule has been updated to report unsafe usage of optional chaining in arguments of yield*.

/* eslint no-unsafe-optional-chaining: "error" */

function* gen() {
    yield* obj?.foo; // Unsafe usage of optional chaining. If it short-circuits with 'undefined' the evaluation will throw TypeError.
}

Copy code to clipboard

Features …

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v10.12.0

ESLint v10.12.0 passt Dokumentation und Typdefinitionen von getText(), getLoc() und getRange() in SourceCode an, sodass auch Tokens und Kommentare akzeptiert werden, und korrigiert Randfälle in mehreren Regeln wie consistent-return, new-cap und no-eval.

Highlights

Support for tokens and comments in SourceCode

Rule authors often work with ESLint’s SourceCode object, which represents the JavaScript source code being linted. Its getText(), getLoc(), and getRange() methods have always accepted a node, token, or comment, but the documentation didn’t describe every argument type, and the type definitions rejected some valid calls, such as passing a comment.

This release updates the documentation and type definitions to match the actual behavior. This also aligns these methods with implementations of the core SourceCodeBase interface used in language plugins. Code that calls these methods is unaffected, but TypeScript code that implements or mocks SourceCode may need its getText(), getLoc(), and getRange() signatures updated to accept tokens and comments.

Rule fixes

The following rules have been updated to work correctly in certain edge cases, including autofix behavior and the handling of supplementary Unicode characters in code:

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v10.11.0: schnellerer Start und Linting

ESLint v10.11.0 beschleunigt Start und Linting durch Leistungsverbesserungen, etwa durch verzögertes Initialisieren des JSON-Schema-Validators (20–25 % kürzere Ladezeit) und schnellere Regelausführung, bei unveränderten Ergebnissen und API.

Highlights

Faster startup and linting

This release includes a set of performance improvements across ESLint’s core linting pipeline and the stylish formatter. Linting results and the public API are unchanged: the same files produce the same messages as before, just faster.

The main improvements are:

  • Startup. Loading the eslint package no longer eagerly initializes the JSON Schema validator used for rule options. It’s now created the first time a rule’s options actually need to be validated, which removes about 45 modules from the initial dependency graph and reduces package load time by 20–25%.
  • Rule execution. When ESLint traverses a file’s structure, it has to decide, for every piece of code, which rules are interested in it and then call those rules. This is the most frequently executed part of the linting process, and it now takes a shorter route in the most common cases. Common node selector types are handled by fast paths, and rule visitors are invoked directly whenever possible instead of through a wrapper function on every node. …

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v10.10.0

ESLint v10.10.0 erweitert no-unexpected-multiline um die Prüfung von regulären Ausdrücken mit d- und v-Flags und korrigiert Randfälle in new-cap, no-extra-bind, no-unreachable und prefer-object-has-own.

Highlights

The no-unexpected-multiline rule has been updated to check regular expression literals with d and v flags.

/* eslint no-unexpected-multiline: "error" */

// Unexpected newline between numerator and division operator
foo = bar
/regex/v.exec(baz).forEach(qux);

Copy code to clipboard

The following rules have also been updated to avoid incorrect or unexpected behavior in some edge cases:

Features

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v10.9.1

ESLint v10.9.1 behebt falsch positive Meldungen der Regel no-loss-of-precision, die in v10.9.0 eingeführt wurden.

Highlights

This patch release fixes false positives in the no-loss-of-precision rule that were introduced in v10.9.0.

Bug Fixes

Documentation

  • ad74a8d docs: add deprecation steps for EOL package versions (#21248) (Francesco Trotta)

Chores

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v10.9.0

ESLint v10.9.0 führt die Option checkConditionalExpressions für no-unmodified-loop-condition ein, behandelt Underflow in no-loss-of-precision und verhindert einen unsicheren no-var-Autofix bei hoisted Funktionen.

Highlights

New option checkConditionalExpressions in no-unmodified-loop-condition

The no-unmodified-loop-condition rule now supports a checkConditionalExpressions option. When enabled, each branch in a ternary expression is checked independently.

For example, with { "checkConditionalExpressions": true }, the rule reports the done variable as not modified in the loop:

let chunk = getInitialChunk();
let done = false;

while (chunk ? !done : false) {
    chunk = nextOrNull();
}

Copy code to clipboard

Features

Bug Fixes

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v10.8.1

ESLint v10.8.1 korrigiert Randfälle in mehreren Regeln, darunter accessor-pairs, getter-return, id-denylist, id-match, no-unused-labels und no-unused-vars, unter anderem einen ASI-Hazard im Autofix von no-unused-labels.

Highlights

The following rules have been updated to ensure that they behave correctly in some edge cases:

Bug Fixes

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v10.8.0

ESLint v10.8.0 exportiert ConfigObject aus eslint/config, maskiert reservierte Zeichen in Regel-IDs im html-Formatter, verhindert einen Absturz in no-unreachable-loop und korrigiert Randfälle in weiteren Regeln.

Highlights

In ESLint v10.8.0, the following rules have been updated to avoid incorrect or unexpected behavior in some edge cases:

Features

  • 2fee9bb feat: export ConfigObject from eslint/config (#21082) (sethamus)

Bug Fixes

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint-Migrationen automatisieren mit Codemod

ESLint kündigt eine Partnerschaft mit Codemod an, um Migrationen von ESLint v8 auf v9 und v9 auf v10 über offizielle Codemods aus eslint/codemods und der Codemod Registry zu automatisieren.

We are excited to announce a partnership between ESLint and Codemod to create a better migration experience for ESLint users, starting with the ESLint v8 to v9 and v9 to v10 migrations. All official ESLint codemods live in eslint/codemods and on the Codemod Registry. Community members are encouraged to open issues for missing codemods or contribute new ones through pull requests. Once reviewed and merged by maintainers, codemods are automatically published to the Codemod Registry through GitHub Actions.

What is Codemod?

Codemod is an open source platform for building, sharing, and running automated code migrations at scale. It is an OpenJS Foundation partner, and its tooling has been adopted by projects such as React, Node.js, Express, React Router, Nuxt.js, pnpm, Webpack, MSW, i18next, and more.

Its platform includes JSSG (JS ast-grep), a codemod runtime and workflow engine that supports multi-step transformations and combines deterministic, compiler-aware transformations with AI-powered steps to deliver the right balance of reliability, efficiency, and flexibility. The source code for the Codemod CLI and engine is available on GitHub.

Key features of Codemod include:

  • Workspace-wide semantic analysis
  • Cross-file refactors
  • Multi-language support
  • Repository-scale performance …

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v9.39.5

ESLint v9.39.5 portiert einen Fix aus v10.3.0 zurück, der Abstürze in Umgebungen ohne require.cache, etwa Yarn Plug'n'Play, verhindert.

Highlights

This release backports a fix originally released in v10.3.0 that prevents ESLint from crashing in host environments where require.cache is unavailable, such as Yarn Plug’n’Play.

Bug Fixes

Documentation

  • 74930ed docs: switch build to Node.js 24 (#20894) (Milos Djermanovic)
  • eaec8bb docs: Add ESLint v9.x EOL notice (#20828) (Milos Djermanovic)

Chores

  • 458205f chore: update @eslint/eslintrc and @eslint/js for v9.39.5 (#21077) (Francesco Trotta)
  • 202117b chore: package.json update for @eslint/js release (Jenkins) …

Originalquelle(öffnet in neuem Tab)Problem melden

Eslint

ESLint v10.7.0

ESLint v10.7.0 ergänzt die Option checkConstructorCallCallbacks für max-nested-callbacks und die Option errorClassNames für preserve-caught-error sowie Suggestions für no-compare-neg-zero.

Highlights

New option checkConstructorCallCallbacks in max-nested-callbacks

The max-nested-callbacks rule now supports a checkConstructorCallCallbacks option. When enabled, the rule also counts callback functions passed to constructor calls with new, such as new Promise((resolve) => {}), when calculating nesting depth.

For example, with { "max": 1, "checkConstructorCallCallbacks": true }, the rule reports the following code as exceeding the allowed callback nesting depth:

run(() => {
    new Promise(resolve => resolve());
});

Copy code to clipboard

New option errorClassNames in preserve-caught-error

The preserve-caught-error rule now supports an errorClassNames option. This option lets you specify additional custom error class names that must preserve the original caught error by passing it as a cause.

For example, with { "errorClassNames": ["MyError"] }, the following code is reported because the thrown MyError does not include the original error as a cause, just like built-in error types must:

try {
    doSomething();
} catch (error) {
    throw new MyError("something went wrong");
}

Copy code to clipboard

Suggestions for no-compare-neg-zero …

Originalquelle(öffnet in neuem Tab)Problem melden