Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Open
Description
Before You File a Proposal Please Confirm You Have Done The Following...
- I havesearched for related issues and found none that match my proposal.
- I have searched thecurrent rule list and found no rules that match my proposal.
- I haveread the FAQ and my problem is not listed.
Relevant Package
scope-manager
My proposal is suitable for this project
- I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).
Description
ESLint v10.0.0 will introduce two breaking changes for customScopeManager implementations:
- It is expected that all references to global variables declared in code, including
varandfunctiondeclarations, have already been resolved. Previously, ESLint was resolving unresolved references. ScopeManagershould provide an instance methodaddGlobals(names: string[])that creates variables with the given names in the global scope and resolves references to them.
The proposal is to implement these changes in@typescript-eslint/scope-manager, for compatibility with ESLint v10.
Additional Info
eslint v10.0.0-alpha.0 already expects these changes and can be used for testing.
eslint-scope v9.0.0 already implements these changes.
Relevant links:
- ESLint v10 Migration Guide:https://eslint.org/docs/next/use/migrate-to-10.0.0#scope-manager
- ESLint v10
parseForESLintReturn Object specification:https://eslint.org/docs/next/extend/custom-parsers#parseforeslint-return-object. - ESLint v10.0.0-alpha.0 release notes:https://eslint.org/blog/2025/11/eslint-v10.0.0-alpha.0-released/#new-requirements-for-scopemanager-implementations.
- Original issue:Question: how come function references on the global scope are not closed eslint/js#665
eslint-scopeupdate:feat!: Resolve references to globalvar/function, addaddGlobals()eslint/js#682eslintupdate:feat!: UseScopeManager#addGlobals()eslint/eslint#20132