ESLint v9.35.0 released

We just pushed ESLint v9.35.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.

Highlights

New Rule preserve-caught-error

One new rule has been added to the core: preserve-caught-error.

This rule enforces the use of the cause property when throwing a new error inside a catch block.

An example of incorrect code for this rule:

/* eslint preserve-caught-error: "error" */

try {
    // ...
} catch (error) {
    throw new Error("Something went wrong");
}

An example of correct code for this rule:

/* eslint preserve-caught-error: "error" */

try {
    // ...
} catch (error) {
    throw new Error("Something went wrong", { cause: error });
}

Other notable changes

  • The no-empty-function and no-empty-static-block rules now provide suggestions to add an /* empty */ comment when the function or class static block is intentionally empty.
  • The no-empty rule now allows empty switch statements with a comment inside the body.

Features

Bug Fixes

Documentation

  • d265515 docs: improve phrasing - “if” → “even if” from getting-started section (#20074) (jjangga0214)
  • a355a0e docs: invert comparison logic for example in no-var doc page (#20064) (OTonGitHub)
  • 5082fc2 docs: Update README (GitHub Actions Bot)
  • 99cfd7e docs: add missing “the” in rule deprecation docs (#20050) (Josh Goldberg ✨)
  • 6ad8973 docs: update --no-ignore and --ignore-pattern documentation (#20036) (Francesco Trotta)
  • 8033b19 docs: add documentation for --no-config-lookup (#20033) (Francesco Trotta)

Chores

  • da87f2f chore: upgrade @eslint/js@9.35.0 (#20077) (Milos Djermanovic)
  • af2a087 chore: package.json update for @eslint/js release (Jenkins)
  • 7055764 test: remove tests/lib/eslint/eslint.config.js (#20065) (Milos Djermanovic)
  • 84ffb96 chore: update @eslint-community/eslint-utils (#20069) (Francesco Trotta)
  • d5ef939 refactor: remove deprecated context.parserOptions usage across rules (#20060) (sethamus)
  • 1b3881d chore: remove redundant word (#20058) (pxwanglu)

The latest ESLint news, case studies, tutorials, and resources.

What's coming in ESLint v10.0.0
4 min read

What's coming in ESLint v10.0.0

We want to share with you the significant changes that will be coming in v10.0.0 so you can better prepare for the changes and understand why the changes are necessary.

ESLint v9.37.0 released
2 min read

ESLint v9.37.0 released

We just pushed ESLint v9.37.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.

ESLint v9.36.0 released
1 min read

ESLint v9.36.0 released

We just pushed ESLint v9.36.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.