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.

Highlights

Separate Package for MCP Server

The ESLint MCP server, added to the core in v9.26.0, has been extracted into a separate package @eslint/mcp. The server can be started by running npx @eslint/mcp@latest. For more details on setup and usage, please read the documentation.

This change has been made to reduce the number and size of ESLint dependencies. The --mcp ESLint CLI flag still works, maintaining the same behavior for users who are already relying on it, but now it just runs npx @eslint/mcp@latest.

ESLINT_FLAGS environment variable

Feature flags can now also be set using the ESLINT_FLAGS environment variable.

# .bashrc

export ESLINT_FLAGS="unstable_config_lookup_from_file,unstable_native_nodejs_ts_config"

This approach can be especially useful in CI/CD pipelines or when you want to enable the same flags across multiple ESLint commands.

See Enable Feature Flags with Environment Variables for more details.

Sorted eslint-suppressions.json

Object keys in suppressions files are now sorted, to avoid unnecessary diff when the content changes.

New Rule no-unassigned-vars

One new rule has been added to the core: no-unassigned-vars.

This rule reports variables declared using let or var that are never assigned a value but are still read in the code. Since these variables will always have the value undefined, their usage is likely a programming mistake.

/*eslint no-unassigned-vars: "error"*/

let status; // error: 'status' is always 'undefined' because it's never assigned.

if (status === 'ready') {
  console.log('Ready!');
}

allowRegexCharacters option in no-useless-escape

The no-useless-escape rule has a new allowRegexCharacters option, which can be used to allow unnecessary escapes for specified characters in regular expression literals.

/*eslint no-useless-escape: ["error", { "allowRegexCharacters": ["-"] }]*/

/[0\-]/; // not reported, because "-" is specified in "allowRegexCharacters"

In the above example, escaping - doesn’t change the behavior of the regular expression, and therefore this rule would report it by default. However, allowing escaped - might be useful to prevent it from forming the range syntax if another character is later added to the end of the character class.

no-array-constructor is autofixable

Most problems reported by the no-array-constructor rule can now be automatically fixed with the --fix command line option.

In cases where the fix wouldn’t be safe, such as new Array(...args) due to an unknown number of arguments and the specific behavior of the Array constructor when a single argument is passed, this rule still provides suggestions.

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.27.0 introduces full TypeScript syntax support for two more core rules. These rules are:

  • max-params. This rule has a new TypeScript-specific option countVoidThis.
  • no-unassigned-vars. This newly added rule supports TypeScript syntax from the start, by not reporting ambient declarations.

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

  • 5687ce7 fix: correct mismatched removed rules (#19734) (루밀LuMir)
  • dc5ed33 fix: correct types and tighten type definitions in SourceCode class (#19731) (루밀LuMir)
  • de1b5de fix: correct service property name in Linter.ESLintParseResult type (#19713) (Francesco Trotta)
  • 60c3e2c fix: sort keys in eslint-suppressions.json to avoid git churn (#19711) (Ron Waldon-Howe)
  • 9da90ca fix: add allowReserved to Linter.ParserOptions type (#19710) (Francesco Trotta)
  • fbb8be9 fix: add info to ESLint.DeprecatedRuleUse type (#19701) (Francesco Trotta)

Documentation

  • 25de550 docs: Update description of frozen rules to mention TypeScript (#19736) (Nicholas C. Zakas)
  • bd5def6 docs: Clean up configuration files docs (#19735) (Nicholas C. Zakas)
  • 4d0c60d docs: Add Neovim to editor integrations (#19729) (Maria José Solano)
  • 71317eb docs: Update README (GitHub Actions Bot)
  • 4c289e6 docs: Update README (GitHub Actions Bot)
  • f0f0d46 docs: clarify that unused suppressions cause non-zero exit code (#19698) (Milos Djermanovic)
  • 8ed3273 docs: fix internal usages of ConfigData type (#19688) (Francesco Trotta)
  • eb316a8 docs: add fmt and check sections to Package.json Conventions (#19686) (루밀LuMir)
  • a3a2559 docs: fix wording in Combine Configs (#19685) (Milos Djermanovic)
  • c8d17e1 docs: Update README (GitHub Actions Bot)

Chores

  • f8f1560 chore: upgrade @eslint/js@9.27.0 (#19739) (Milos Djermanovic)
  • ecaef73 chore: package.json update for @eslint/js release (Jenkins)
  • 596fdc6 chore: update dependency @arethetypeswrong/cli to ^0.18.0 (#19732) (renovate[bot])
  • f791da0 chore: remove unbalanced curly brace from .editorconfig (#19730) (Maria José Solano)
  • e86edee refactor: Consolidate Config helpers (#19675) (Nicholas C. Zakas)
  • cf36352 chore: remove shared types (#19718) (Francesco Trotta)
  • f60f276 refactor: Easier RuleContext creation (#19709) (Nicholas C. Zakas)
  • 58a171e chore: update dependency @eslint/plugin-kit to ^0.3.1 (#19712) (renovate[bot])
  • 3a075a2 chore: update dependency @eslint/core to ^0.14.0 (#19715) (renovate[bot])
  • 44bac9d ci: run tests in Node.js 24 (#19702) (Francesco Trotta)
  • 35304dd chore: add missing funding field to packages (#19684) (루밀LuMir)
  • f305beb test: mock process.emitWarning to prevent output disruption (#19687) (Francesco Trotta)

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

ESLint v9.26.0 released
2 min read

ESLint v9.26.0 released

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

ESLint v9.25.1 released

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