ESLint v8.x end-of-life is 2024-10-05 and will not be maintained after that. Upgrade or consider long-term support options

ESLint v8.51.0 released

We just pushed ESLint v8.51.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 CLI option --no-warn-ignored

This release includes a new CLI option --no-warn-ignored that, when on, suppresses warnings about ignored files that were explicitly passed in the file list. The new option is available only in the flat config mode.

This option is particularly useful when ESLint is run with --max-warnings 0 from tools that pass a list of individual files, such as lint-staged, as it prevents exit code 1 when an ignored file is passed.

{
    "lint-staged": {
        "*.js": "eslint --max-warnings 0 --no-warn-ignored"
    }
}

API

As part of this change, FlatESLint constructor has a new option warnIgnored: boolean, default true.

The warnIgnored option of FlatESLint#lintText() is still available, but it now defaults to the value of the constructor option. Effectively, its default value is changed from false to true. In order to retain previous behavior, pass warnIgnored: false to FlatESLint#lintText():

const eslint = new FlatESLint();

await eslint.lintFiles(patterns);
await eslint.lintText(code, { filePath, warnIgnored: false });

Features

Bug Fixes

  • f976b2f fix: make rule severity case-sensitive in flat config (#17619) (Milos Djermanovic)
  • 0edfe36 fix: Ensure crash error messages are not duplicated (#17584) (Nicholas C. Zakas)
  • dd79abc fix: eslint-disable to be able to parse quoted rule names (#17612) (Yosuke Ota)
  • d2f6801 fix: Ensure correct code path for && followed by ?? (#17618) (Nicholas C. Zakas)

Documentation

Chores

  • 1ef39ea chore: upgrade @eslint/js@8.51.0 (#17624) (Milos Djermanovic)
  • f8c7403 chore: package.json update for @eslint/js release (ESLint Jenkins)
  • 2665552 test: fix flat config linter tests to use Linter in flat config mode (#17616) (Milos Djermanovic)
  • 7b77bcc chore: Refactor CodePathState (#17510) (Nicholas C. Zakas)
  • bc77c9a chore: Document and refactor ForkContext (#17566) (Nicholas C. Zakas)
  • 24e1f14 chore: Refactor and document CodePath (#17558) (Nicholas C. Zakas)

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

ESLint v9.10.0 released
2 min read

ESLint v9.10.0 released

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

Trunk becomes ESLint gold sponsor
1 min read

Trunk becomes ESLint gold sponsor

We are happy to announce that Trunk is a gold sponsor of ESLint. We are grateful to founders Eli Schleifer and David Apirian, as well as the whole Trunk team.