New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@babel/eslint-parser: update scope analysis for ClassPrivateProperty #10913
@babel/eslint-parser: update scope analysis for ClassPrivateProperty #10913
Conversation
This is not something I usually ask to do, but could you split this PR in two parts (one for |
@@ -166,6 +166,10 @@ class Referencer extends OriginalReferencer { | |||
this._visitClassProperty(node); | |||
} | |||
|
|||
ClassPrivateMethod(node) { | |||
super.MethodDefinition(node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May worth a todo item here that once TypeScript or Flow supports private method, ClassPrivateMethod
should visit typeAnnotations
before super.MethodDefinition
, of which the similar has been done in _visitClassProperty
.
8205f2d
to
58d9c89
Compare
Done! |
58d9c89
to
474f3c2
Compare
Closed accidentally |
It allowed tests to run again after the other PR was merged, so no worries! 😆 |
@kaicataldo I'm not sure about why the e2e tests are failing. While investigating I found a bug in our publishing process which might be related (0075830), so rebasing might make them pass. |
474f3c2
to
2940571
Compare
@nicolo-ribaudo Looks like rebasing fixed it! |
This PR updates the scope analysis for
ClassPrivateMethod
s once #10914 is merged and we're parsing these nodes correctly.Note that
ClassPrivateMethod
s still aren't 100% compatible withno-undef
/no-unused-vars
, but I didn't want to throw too much into this PR. I'll handle that as part of auditing the the plugin and making sure rules work with@babel/eslint-parser
.This is the last known issue on the parser side of things!
These changes rely on #10914 being merged first.