
Highlights
ECMAScript 2026 Explicit Resource Management
ESLint’s default parser espree now supports new Explicit Resource Management syntax: using and await using declarations, which automatically calls a dispose method when a resource goes out of scope.
if (something) {
using someResource = getSomeResource();
// ... use `someResource`
} // dispose `someResource`
async function foo() {
if (something) {
await using someResource = getSomeResource();
// ... use `someResource`
} // await dispose `someResource`
}
To enable parsing this syntax, set languageOptions.ecmaVersion to 2026 or "latest" (default).
Please note that the core rules have not yet been updated to support this syntax.
New allowProperties option in no-restricted-properties
The no-restricted-properties rule can now be configured to restrict all properties on an object except for specific ones.
/* eslint no-restricted-properties: [2, { "object": "config", "allowProperties": ["settings", "version"] }] */
config.settings = { theme: "dark" }; // ok
config.version = "1.0.0"; // ok
config.apiKey = "12345"; // error
config.timeout = 5000; // error
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.29.0 introduces full TypeScript syntax support for two more core rules. These rules are:
no-restricted-globals. This rule now ignores references in type annotations.no-var. This rule now allowsvarin global type 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.
New SourceCode#isGlobalReference(node) method
The SourceCode class has a new method isGlobalReference(node).
It returns true if passed Identifier node references a global variable configured via languageOptions.globals, /* global */ comments, or ecmaVersion, and not declared by a local binding.
const myRule = {
meta: {
// ...
},
create(context) {
return {
Identifier(node) {
if (context.sourceCode.isGlobalReference(node)) {
// do something
}
},
};
},
};
Other notable changes
- New ECMAScript 2025 global variables
Float16ArrayandIteratorwill now be automatically enabled whenlanguageOptions.ecmaVersionis set to2025(or higher) or"latest". - The
--prune-suppressionsCLI option will now also remove entries for files that no longer exist. - The
includeIgnoreFile()helper function now accepts a second optionalnameparameter that allows you to set a custom name for the configuration object this function returns. - The
class-methods-use-thisrule now supports class auto-accessors. This language feature is part of the Decorators proposal, which is still in stage 3 status, but the auto-accessors syntax is already available in TypeScript.
Features
f686fcbfeat: addecmaVersion: 2026, parsingusingandawait using(#19832) (Milos Djermanovic)19cdd22feat: prune suppressions for non-existent files (#19825) (TKDev7)b3d720ffeat: add ES2025 globals (#19835) (fisker Cheung)677a283feat: add auto-accessor fields support to class-methods-use-this (#19789) (sethamus)dbba058feat: allow global type declaration inno-var(#19714) (Remco Haszing)342bd29feat: ignore type annotations in no-restricted-globals (#19781) (sethamus)786bcd1feat: add allowProperties option to no-restricted-properties (#19772) (sethamus)05b66d0feat: addsourceCode.isGlobalReference(node)method (#19695) (Nitin Kumar)
Bug Fixes
85c082cfix: explicit matching behavior with negated patterns and arrays (#19845) (Milos Djermanovic)9bda4a9fix: fixLintOptions.filterCodeBlocktypes (#19837) (ntnyq)7ab77a2fix: correct breaking deprecation of FlatConfig type (#19826) (Logicer)1ba3318fix: addlanguageanddialectstono-use-before-define(#19808) (Francesco Trotta)
Documentation
00e3e6adocs: add support for custom name parameter toincludeIgnoreFile(#19795) (루밀LuMir)3aed075docs: Update README (GitHub Actions Bot)a2f888ddocs: enhance documentation with links and fix typos (#19761) (루밀LuMir)53c3235docs: update to clarify prompt usage (#19748) (Jennifer Davis)
Chores
5c114c9chore: upgrade @eslint/js@9.29.0 (#19851) (Milos Djermanovic)acf2201chore: package.json update for @eslint/js release (Jenkins)a806994refactor: Remove eslintrc from flat config functionality (#19833) (Nicholas C. Zakas)152ed51test: switch to flat config mode in code path analysis tests (#19824) (Milos Djermanovic)b647239chore: Update first-party dependencies faster with Renovate (#19822) (Nicholas C. Zakas)7abe42erefactor: SafeEmitter -> SourceCodeVisitor (#19708) (Nicholas C. Zakas)e392895perf: improve time complexity ofgetLocFromIndex(#19782) (루밀LuMir)0ed289cchore: remove accidentally committed file (#19807) (Francesco Trotta)
