Skip to content
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

fix(unbound-method): check MemberExpression when parent is CallExpression #1087

Closed

Conversation

komkanit
Copy link
Contributor

Resolve: #1085
First I check console method type is a MemberExpression then I try to except error when a parent is
CallExpression and node is MemberExpression
This is my first pr on typescript-eslint I'm not sure this is collect or not. you can recommend anything. Thank you

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @komcal!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.
This change does not actually fix the issue at all.

The logic for the code path you've modified is now this:

  • Select nodes that are MemberExpression
  • Is it a safe usage of a member expression? Call isSafeUse
  • Is parent type CallExpression? Yes
  • Is the node itself a MemberExpression? Yes, because the very first step of the rule was to only select MemberExpression nodes.

This will require a lot of checks around the method names, and the object types. I would say that this is probably too complex of an enhancement for a very first contribution.

@bradzacher bradzacher added the awaiting response Issues waiting for a reply from the OP or another party label Nov 12, 2019
@bradzacher bradzacher added the bug Something isn't working label Dec 19, 2019
@G-Rath
Copy link
Contributor

G-Rath commented Mar 8, 2020

@bradzacher I think this can be closed as it was superseded by #1526

@bradzacher bradzacher closed this Mar 8, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
awaiting response Issues waiting for a reply from the OP or another party bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[unbound-method] console methods are bound
3 participants