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

Update optional chaining representation to match ESTree spec #2204

Labels
ASTPRs and Issues about the AST structurebreaking changeThis change will require a new major version to be releasedpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree
Milestone
@bradzacher

Description

@bradzacher

ESTree just merged the representation for optional chaining.
estree/estree#204

They chose a different representation to babel's representation, which we went with originally (as it was the only representation in the ecosystem).

We now need to update our parser to match this representation.

interfaceChainExpression<:Expression{type:"ChainExpression"expression:ChainElement}interfaceChainElement<:Node{optional:boolean}extendinterfaceCallExpression<:ChainElement{}extendinterfaceMemberExpression<:ChainElement{}

In terms of timelines, we need to track ESLint here, as they will be moving to implement this as well. With it, they will update their lint rules to support it.


This is ofc a breaking change in the AST structure, and will unfortunately be a relatively painful one for consumers of our plugins.

I don't see this as beingtoo painful, however. There will be some new false-negatives in the ecosystem due to theChainExpression node, but because everything is now just aCall/MemberExpression, most of the plugins should "just work".


This is required to support ESLint 7.5.0, which added support to rules for optional chaining.
https://eslint.org/blog/2020/07/eslint-v7.5.0-released

Metadata

Metadata

Assignees

No one assigned

    Labels

    ASTPRs and Issues about the AST structurebreaking changeThis change will require a new major version to be releasedpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginpackage: typescript-estreeIssues related to @typescript-eslint/typescript-estree

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp