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.

Highlights

MCP Server Integration

ESLint v9.26.0 adds support for a Model Context Protocol (MCP) server, enabling ESLint to interact with AI models and tools through a unified interface. This feature allows large language models (LLMs) to run ESLint in IDEs and other software, assisting developers with tasks like linting and code analysis. The MCP server can be started using the --mcp flag in the ESLint command line. This feature is particularly useful for developers using AI-powered coding assistants like GitHub Copilot. Read the documentation to learn how the MCP server can help you in your development tasks.

Support globalThis in no-shadow-restricted-names

The no-shadow-restricted-names rule now includes support for detecting shadowing of globalThis, in addition to other restricted identifiers like NaN, Infinity, undefined, eval, and arguments. To enable this feature, the reportGlobalThis option must be set to true.

/* eslint no-shadow-restricted-names: ["error", { "reportGlobalThis": true }] */

const globalThis = { /* custom object */ };

This enhancement helps developers avoid confusing or unintended shadowing of the globalThis object, which was introduced in the ECMAScript 2020 language specification.

ignoreDirectives option in no-unused-expressions

The no-unused-expressions has a new ignoreDirectives option which can be used to ignore directives in ES3 codebases. This option allows users to ignore directives (e.g., "use strict") when linting ES3 codebases. By default, the rule now reports directives as unused expressions in ES3 environments, as ES3 does not formally support directives, treating them as unused code. This behavior aligns with the default behavior in ESLint v9.25.0, which was reverted in ESLint v9.25.1 because of compatibility concerns.

Features

Bug Fixes

  • 96e84de fix: check cache file existence before deletion (#19648) (sethamus)
  • d683aeb fix: don’t crash on tests with circular references in RuleTester (#19664) (Milos Djermanovic)
  • 9736d5d fix: add namespace to Plugin.meta type (#19661) (Milos Djermanovic)
  • 17bae69 fix: update RuleTester.run() type (#19634) (Nitin Kumar)

Documentation

  • dd98d63 docs: Update README (GitHub Actions Bot)
  • c25e858 docs: Update README (GitHub Actions Bot)
  • b2397e9 docs: Update README (GitHub Actions Bot)
  • addd0a6 docs: fix formatting of unordered lists in Markdown (#19660) (Milos Djermanovic)
  • a21b38d docs: Update README (GitHub Actions Bot)
  • c0721a7 docs: fix double space in command (#19657) (CamWass)

Chores

  • 5b247c8 chore: upgrade to @eslint/js@9.26.0 (#19681) (Francesco Trotta)
  • d6fa4ac chore: package.json update for @eslint/js release (Jenkins)
  • 0958690 chore: disambiguate internal types LanguageOptions and Rule (#19669) (Francesco Trotta)
  • f1c858e chore: fix internal type references to Plugin and Rule (#19665) (Francesco Trotta)
  • 40dd299 refactor: One-shot ESQuery selector analysis (#19652) (Nicholas C. Zakas)
  • 1cfd702 chore: update dependency @eslint/json to ^0.12.0 (#19656) (renovate[bot])

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

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.

ESLint v9.25.0 released
2 min read

ESLint v9.25.0 released

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

Introducing bulk suppressions
3 min read

Introducing bulk suppressions

How to enable stricter linting incrementally