ESLint v9.0.0-beta.2 released

We just pushed ESLint v9.0.0-beta.2, which is a major release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release. This release also has some breaking changes, so please read the following closely.

Highlights

This is a summary of the major changes you need to know about for this version of ESLint.

Installing

Since this is a pre-release version, you will not automatically be upgraded by npm. You must specify the next tag when installing:

npm i eslint@next --save-dev

You can also specify the version directly:

npm i eslint@9.0.0-beta.2 --save-dev

Migration Guide

As there are a lot of changes, we’ve created a migration guide describing the breaking changes in great detail along with the steps you should take to address them. We expect that most users should be able to upgrade without any build changes, but the migration guide should be a useful resource if you encounter problems.

Multiple /* eslint */ comments for the same rule are now disallowed

In ESLint v8.x, if the file being linted contained multiple /* eslint */ configuration comments for the same rule, the last one would be applied, while the others would be silently ignored.

In ESLint v9.0.0, the first one is applied, while the others are reported as lint errors.

New Features

  • The no-restricted-imports rule has new options allowImportNames and allowImportNamePattern.
  • The no-unused-vars rule has a new option ignoreClassWithStaticInitBlock.
  • The complexity rule now also takes into account optional chaining and default values in destructuring patterns and parameters.

Breaking Changes

  • 79a95eb feat!: disallow multiple configuration comments for same rule (#18157) (Milos Djermanovic)

Features

Bug Fixes

  • e37153f fix: improve error message for invalid rule config (#18147) (Nitin Kumar)
  • af6e170 fix: stop linting files after an error (#18155) (Francesco Trotta)

Documentation

  • ba1c1bb docs: Update README (GitHub Actions Bot)
  • 337cdf9 docs: Explain limitations of RuleTester fix testing (#18175) (Nicholas C. Zakas)
  • c7abd89 docs: Explain Node.js version support (#18176) (Nicholas C. Zakas)
  • d961eeb docs: show red underlines in examples in rules docs (#18041) (Yosuke Ota)
  • 558274a docs: Update README (GitHub Actions Bot)
  • 2908b9b docs: Update release documentation (#18174) (Nicholas C. Zakas)
  • 1f1260e docs: replace HackerOne link with GitHub advisory (#18165) (Francesco Trotta)
  • e5ef3cd docs: add inline cases condition in no-fallthrough (#18158) (Tanuj Kanti)
  • 450d0f0 docs: fix ignore option docs (#18154) (Francesco Trotta)

Chores

  • 7509276 chore: upgrade @eslint/js@9.0.0-beta.2 (#18180) (Milos Djermanovic)
  • 96087b3 chore: package.json update for @eslint/js release (Jenkins)
  • 925afa2 chore: Remove some uses of lodash.merge (#18179) (Milos Djermanovic)
  • 972ef15 chore: remove invalid type in @eslint/js (#18164) (Nitin Kumar)

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

ESLint v9.1.1 released
1 min read

ESLint v9.1.1 released

We just pushed ESLint v9.1.1, which is a patch release upgrade of ESLint. This release fixes several bugs found in the previous release.

ESLint v9.1.0 released
2 min read

ESLint v9.1.0 released

We just pushed ESLint v9.1.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.0.0 released
12 min read

ESLint v9.0.0 released

We just pushed ESLint v9.0.0, which is a major release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release. This release also has some breaking changes, so please read the following closely.