ESLint v9.28.0 released

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

--pass-on-unpruned-suppressions CLI Option

ESLint v9.24.0 introduced bulk suppressions, a highly anticipated feature. When bulk suppressions are enabled, ESLint tracks previously suppressed violations in a file called eslint-suppressions.json, ensuring they remain ignored in subsequent runs. As the codebase is edited, some of these violations may be resolved but will still be listed in the suppressions file until explicitly removed. The original bulk suppressions draft proposed exiting with exit code 2 in cases where unused suppressions were found, but users requested the ability to ignore unpruned suppressions for greater flexibility.

With ESLint v9.28.0, this is now possible thanks to a new CLI option. The --pass-on-unpruned-suppressions flag allows ESLint to skip suppressions that no longer occur. When this flag is enabled, unused suppressions are not reported as errors and do not affect the exit code.

TypeScript Syntax Support in Core Rules

As announced in the ESLint v9.23.0 release blog post, we are actively working to add TypeScript syntax support to core rules.

ESLint v9.28.0 introduces full TypeScript syntax support for five more core rules. These rules are:

  • func-style. This rule has the new TypeScript-specific option "allowTypeAnnotation" and has been updated to ignore overloaded function declarations in TypeScript code.
  • no-magic-numbers. This rule has new TypeScript-specific options: "ignoreEnums", "ignoreNumericLiteralTypes", "ignoreReadonlyClassProperties", and "ignoreTypeIndexes".
  • no-shadow. This rule has new TypeScript-specific options "ignoreTypeValueShadow" and "ignoreFunctionTypeParameterNameValueShadow", and the "hoist" option accept new, TypeScript-specific values.
  • no-use-before-define. This rule has new TypeScript-specific options: "enums", "typedefs", and "ignoreTypeReferences".
  • prefer-arrow-callback.

These rules can now be used to lint TypeScript files as well as regular JavaScript. To lint TypeScript code, be sure to use @typescript-eslint/parser, or another compatible parser.

Features

Bug Fixes

Documentation

  • 3ec2082 docs: Nested arrays in files config entry (#19799) (Nicholas C. Zakas)
  • 89a65b0 docs: clarify how config arrays can apply to subsets of files (#19788) (Shais Ch)
  • 2ba8a0d docs: Add description of meta.namespace to plugin docs (#19798) (Nicholas C. Zakas)
  • 59dd7e6 docs: update func-style with examples (#19793) (Tanuj Kanti)
  • e9129e0 docs: add global scope’s implicit field to Scope Manager docs (#19770) (Milos Djermanovic)
  • 52f5b7a docs: fix minor typos and add links (#19743) (루밀LuMir)
  • 00716a3 docs: upfront recommend against using the no-return-await rule (#19727) (Mike DiDomizio)

Chores

  • 175b7b8 chore: upgrade to @eslint/js@9.28.0 (#19802) (Francesco Trotta)
  • 844f5a6 chore: package.json update for @eslint/js release (Jenkins)
  • 62b1c1b chore: update globals to v16 (#19791) (Nitin Kumar)
  • e8a1cb8 chore: ignore jiti-v2.0 & jiti-v2.1 for renovate (#19786) (Nitin Kumar)
  • 43d3975 chore: Add Copilot Instructions file (#19753) (Nicholas C. Zakas)
  • 2dfb5eb test: update SourceCodeTraverser tests (#19763) (Milos Djermanovic)
  • 5bc21f9 chore: add *.code-workspace to .gitignore (#19771) (루밀LuMir)
  • f4fa40e refactor: NodeEventGenerator -> SourceCodeTraverser (#19679) (Nicholas C. Zakas)
  • 0f49329 refactor: use a service to emit warnings (#19725) (Francesco Trotta)
  • 20a9e59 chore: update dependency shelljs to ^0.10.0 (#19740) (renovate[bot])

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

ESLint v9.0.0: A retrospective
6 min read

ESLint v9.0.0: A retrospective

It's been over a year since ESLint v9.0.0 was released. In this post we review what went well, what didn't, and what we've learned.

ESLint v9.27.0 released
3 min read

ESLint v9.27.0 released

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