ESLint v8.x reached end-of-life on 2024-10-05 and is no longer maintained. Upgrade or consider long-term support options

ESLint v9.0.0-beta.0 released

We just pushed ESLint v9.0.0-beta.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.

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

New default values ​​for rule options

In v9.0.0, the following rules have new defaults:

  • no-unused-vars: The default value of the caughtErrors option is changed from "none" to "all".
  • no-useless-computed-key: The default value of the enforceForClassMembers option is changed from false to true.

Stricter RuleTester validations

This release adds more checks in RuleTester:

  • Messages cannot have unsubstituted placeholders.
  • Suggestions must change the code.
  • Test case output must be different from code.
  • Test error objects must specify message or messageId.
  • Test error object must specify suggestions if the actual error provides suggestions.
  • Test suggestion objects must specify desc or messageId.
  • Test suggestion objects must specify output.
  • filename and only properties of test objects must be of the expected type (string and boolean, respectively).

New API loadESLint()

ESLint now exports a new function loadESLint() from its main entry point. Integrations can use this function to get either the ESLint class (former FlatESLint class) or the LegacyESLint class (former ESLint class) and thus easily swap between flat config and eslintrc APIs.

Breaking Changes

Features

Bug Fixes

Documentation

  • f1c7e6f docs: Switch to Ethical Ads (#18090) (Strek)
  • 15c143f docs: JS Foundation -> OpenJS Foundation in PR template (#18092) (Nicholas C. Zakas)
  • 6ea339e docs: add stricter rule test validations to v9 migration guide (#18085) (Milos Djermanovic)
  • 3c816f1 docs: use relative link from CLI to core concepts (#18083) (Milos Djermanovic)
  • 9458735 docs: fix malformed eslint config comments in rule examples (#18078) (Francesco Trotta)
  • 07a1ada docs: link from --fix CLI doc to the relevant core concept (#18080) (Bryan Mishkin)
  • b844324 docs: Update team responsibilities (#18048) (Nicholas C. Zakas)
  • aadfb60 docs: document languageOptions and other v9 changes for context (#18074) (fnx)
  • 857e242 docs: tweak explanation for meta.docs rule properties (#18057) (Bryan Mishkin)
  • 10485e8 docs: recommend messageId over message for reporting rule violations (#18050) (Bryan Mishkin)
  • 98b5ab4 docs: Update README (GitHub Actions Bot)
  • 505fbf4 docs: update no-restricted-imports rule (#18015) (Tanuj Kanti)
  • c25b4af docs: Update README (GitHub Actions Bot)

Chores

  • e40d1d7 chore: upgrade @eslint/js@9.0.0-beta.0 (#18108) (Milos Djermanovic)
  • 9870f93 chore: package.json update for @eslint/js release (Jenkins)
  • 2c62e79 chore: upgrade @eslint/eslintrc@3.0.1 (#18107) (Milos Djermanovic)
  • 81f0294 chore: upgrade espree@10.0.1 (#18106) (Milos Djermanovic)
  • 5e2b292 chore: upgrade eslint-visitor-keys@4.0.0 (#18105) (Milos Djermanovic)
  • ce838ad chore: replace dependency npm-run-all with npm-run-all2 ^5.0.0 (#18045) (renovate[bot])
  • 54df731 chore: update dependency markdownlint-cli to ^0.39.0 (#18084) (renovate[bot])
  • 8f06a60 chore: update dependency shelljs to ^0.8.5 (#18079) (Francesco Trotta)
  • 93ffe30 chore: update dependency file-entry-cache to v8 (#17903) (renovate[bot])

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

ESLint v9.15.0 released
2 min read

ESLint v9.15.0 released

We just pushed ESLint v9.15.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.14.0 released
2 min read

ESLint v9.14.0 released

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

ESLint v9.13.0 released

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