Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[scope-manager] should ignoreparserOptions.ecmaVersion #2900

Assignees
JoshuaKGoldberg
Labels
accepting prsGo ahead, send a pull request that resolves this issueenhancementNew feature or requestpackage: scope-managerIssues related to @typescript-eslint/scope-manager
Milestone
@bradzacher

Description

@bradzacher

See discussion injsx-eslint/eslint-plugin-react#2882

There are only two cases in this project that we honourparserOptions.ecmaVersion, and both are inscope-manager:

publicisStrictModeSupported():boolean{
returnthis.#options.ecmaVersion!=null&&this.#options.ecmaVersion>=5;
}
publicisES6():boolean{
returnthis.#options.ecmaVersion!=null&&this.#options.ecmaVersion>=6;
}

These usages were brought across when I forkedeslint-scope.

However in the context of TS scope analysis - theecmaVersion 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.

Metadata

Metadata

Labels

accepting prsGo ahead, send a pull request that resolves this issueenhancementNew feature or requestpackage: scope-managerIssues related to @typescript-eslint/scope-manager

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp