[scope-manager] should ignore parserOptions.ecmaVersion
#2900
Labels
accepting prs
Go ahead, send a pull request that resolves this issue
enhancement
New feature or request
package: scope-manager
Issues related to @typescript-eslint/scope-manager
Milestone
See discussion in jsx-eslint/eslint-plugin-react#2882
There are only two cases in this project that we honour
parserOptions.ecmaVersion
, and both are inscope-manager
:typescript-eslint/packages/scope-manager/src/ScopeManager.ts
Lines 78 to 84 in 498f397
These usages were brought across when I forked
eslint-scope
.However in the context of TS scope analysis - the
ecmaVersion
makes zero sense.TS will never treat your code as if it's ES5 or lower - it is always (syntactically and semantically) "ESNext".
Whilst other parts of the ecosystem respects them - and they should continue to - our parser and scope analyser should (like TS itself) always treat code as if it is ESNext in terms of language features.
The text was updated successfully, but these errors were encountered: