eslint / eslint-scope

eslint-scope: ECMAScript scope analyzer
BSD 2-Clause "Simplified" License
125 stars 30 forks source link

feat: Add isGlobalReturn method on scopeManager #96

Closed nzakas closed 1 year ago

nzakas commented 1 year ago

Renames the private __isNodejsScope to isGlobalReturn to formally make it part of the interface and available in ESLint.

I chose isGlobalReturn instead of isNodejsScope because the typescript-eslint scope manager already exposes a method called isGlobalReturn, so copying that would ensure that the most popular alternative scope manager already has the same method.

Refs eslint/eslint#16999