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: normalizeMethodCall should expect a CallExpression node #177

Conversation

rpl
Copy link
Member

@rpl rpl commented Aug 23, 2021

We do already expect "ArrowFunctionExpression" in normalizeMethodCall, and so it seems reasonable to also expect "CallExpression" (and return an empty method name as we are doing for the "ArrowFunctionExpression").

At the moment code like the one in the test case is triggering the additonal linting issue that we log for unexpected cases we would like to be reported as new issue in this repo.

@rpl rpl requested a review from mozfreddyb August 23, 2021 15:18
@rpl
Copy link
Member Author

rpl commented Aug 23, 2021

@mozfreddyb I did notice this while I was giving one last review pass to #169 (it was triggered by the Grammarly extension attached to mozilla/addons/issues#1263).
Given that it isn't a new issue introduced by the changes from #169, I opted to create a separate pull request with a new test case and a proposed one line fix.

lib/ruleHelper.js Show resolved Hide resolved
@mozfreddyb mozfreddyb merged commit 92c8bd6 into mozilla:master Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants