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 v8.54.0 released
1 min read

ESLint v8.54.0 released

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

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

What's coming in ESLint v9.0.0

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

ESLint v8.53.0 released
1 min read

ESLint v8.53.0 released

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