
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
e9754e7
feat: add reportGlobalThis to no-shadow-restricted-names (#19670) (sethamus)0fa2b7a
feat: add suggestions foreqeqeq
rule (#19640) (Nitin Kumar)dcbdcc9
feat: Add MCP server (#19592) (Nicholas C. Zakas)2dfd83e
feat: addignoreDirectives
option inno-unused-expressions
(#19645) (sethamus)
Bug Fixes
96e84de
fix: check cache file existence before deletion (#19648) (sethamus)d683aeb
fix: don’t crash on tests with circular references inRuleTester
(#19664) (Milos Djermanovic)9736d5d
fix: addnamespace
toPlugin.meta
type (#19661) (Milos Djermanovic)17bae69
fix: updateRuleTester.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 typesLanguageOptions
andRule
(#19669) (Francesco Trotta)f1c858e
chore: fix internal type references toPlugin
andRule
(#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])