New May 16, 2025

ESLint v9.27.0 released

Libraries, Frameworks, etc. All from ESLint Blog View ESLint v9.27.0 released on eslint.org

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:

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

Chores

Scroll to top