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.

Highlights

allowTypeImports option in no-restricted-imports

The no-restricted-imports rule now supports the allowTypeImports option. When set to true, this will allow type-only imports in TypeScript files while still disallowing regular imports.

For example, the following rule setting permits only type-only imports from the node:assert module:

/*
    eslint no-restricted-imports: ["error", {
        name: "node:assert",
        allowTypeImports: true,
    }]
*/

import assert from "node:assert"; // ❌ Incorrect

import type { AssertionError } from "node:assert"; // ✅ Correct

This aligns the no-restricted-imports rule with the corresponding typescript-eslint rule, and continues ESLint’s ongoing efforts to extend TypeScript Syntax support in core rules.

Improved heuristic for --concurrency=auto

After the introduction of multithreaded linting in ESLint v9.34.0, some users running ESLint with the --cache flag reported slower performance when using --concurrency=auto compared to leaving the --concurrency option unset.

The slowdown occurred because ESLint would sometimes enable multithread mode even when most results were already cached, adding unnecessary overhead.

This behavior has been corrected in ESLint v9.37.0, where the heuristic for --concurrency=auto has been improved to better account for cases where increased parallelism provides no benefit.

preserve-caught-error recognizes computed cause property

The preserve-caught-error rule now correctly handles cases where the cause option in a thrown error is expressed using computed property syntax. For example:

try {
    // ...
} catch (error) {
    throw new Error("Unexpected error!", { ["cause"]: error });
}

Features

Bug Fixes

Documentation

  • b950359 docs: fix typos across the docs (#20182) (루밀LuMir)
  • 42498a2 docs: improve ToC accessibility by hiding non-semantic character (#20181) (Percy Ma)
  • 29ea092 docs: Update README (GitHub Actions Bot)
  • 5c97a04 docs: show availableUntil in deprecated rule banner (#20170) (Pixel998)
  • 90a71bf docs: update README files to add badge and instructions (#20115) (루밀LuMir)
  • 1603ae1 docs: update references from master to main (#20153) (루밀LuMir)

Chores

  • afe8a13 chore: update @eslint/js dependency to version 9.37.0 (#20183) (Francesco Trotta)
  • abee4ca chore: package.json update for @eslint/js release (Jenkins)
  • fc9381f chore: fix typos in comments (#20175) (overlookmotel)
  • e1574a2 chore: unpin jiti (#20173) (renovate[bot])
  • e1ac05e refactor: mark ESLint.findConfigFile() as async, add missing docs (#20157) (Pixel998)
  • 347906d chore: update eslint (#20149) (renovate[bot])
  • 0cb5897 test: remove tmp dir created for circular fixes in multithread mode test (#20146) (Milos Djermanovic)
  • bb99566 ci: pin jiti to version 2.5.1 (#20151) (Pixel998)
  • 177f669 perf: improve worker count calculation for "auto" concurrency (#20067) (Francesco Trotta)
  • 448b57b chore: Mark deprecated formatting rules as available until v11.0.0 (#20144) (Milos Djermanovic)

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.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.

ESLint v9.35.0 released
2 min read

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.