Zum Inhalt springen

Eslint Release Notes

9 Einträge aus 1 Quelle. Zuletzt aktualisiert:

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

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

Angaben zum Datum

Datum aus der Quelle.

Erstmals gesehen am .

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