
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
e9754e7feat: add reportGlobalThis to no-shadow-restricted-names (#19670) (sethamus)0fa2b7afeat: add suggestions foreqeqeqrule (#19640) (Nitin Kumar)dcbdcc9feat: Add MCP server (#19592) (Nicholas C. Zakas)2dfd83efeat: addignoreDirectivesoption inno-unused-expressions(#19645) (sethamus)
Bug Fixes
96e84defix: check cache file existence before deletion (#19648) (sethamus)d683aebfix: don’t crash on tests with circular references inRuleTester(#19664) (Milos Djermanovic)9736d5dfix: addnamespacetoPlugin.metatype (#19661) (Milos Djermanovic)17bae69fix: updateRuleTester.run()type (#19634) (Nitin Kumar)
Documentation
dd98d63docs: Update README (GitHub Actions Bot)c25e858docs: Update README (GitHub Actions Bot)b2397e9docs: Update README (GitHub Actions Bot)addd0a6docs: fix formatting of unordered lists in Markdown (#19660) (Milos Djermanovic)a21b38ddocs: Update README (GitHub Actions Bot)c0721a7docs: fix double space in command (#19657) (CamWass)
Chores
5b247c8chore: upgrade to@eslint/js@9.26.0(#19681) (Francesco Trotta)d6fa4acchore: package.json update for @eslint/js release (Jenkins)0958690chore: disambiguate internal typesLanguageOptionsandRule(#19669) (Francesco Trotta)f1c858echore: fix internal type references toPluginandRule(#19665) (Francesco Trotta)40dd299refactor: One-shot ESQuery selector analysis (#19652) (Nicholas C. Zakas)1cfd702chore: update dependency @eslint/json to ^0.12.0 (#19656) (renovate[bot])
