Update optional chaining representation to match ESTree spec #2204
Labels
AST
PRs and Issues about the AST structure
breaking change
This change will require a new major version to be released
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
package: typescript-estree
Issues related to @typescript-eslint/typescript-estree
Milestone
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.
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 being too painful, however. There will be some new false-negatives in the ecosystem due to the
ChainExpression
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
The text was updated successfully, but these errors were encountered: