-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Chore: add isValidThisArg in ast-utils. #9500
Conversation
LGTM |
7ed6a32
to
6fd9192
Compare
LGTM |
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.
Thanks for the PR! This seems like a good idea to me, but I do think we need to add tests for any public methods we add to ast-utils
. Can you add a suite of tests for isValidThisArg
?
IMO, it might be better to export |
maybe we can export both? |
I'm fine with that too, although I think |
I'm fine with both too as long as we have test coverage :) |
6fd9192
to
0c02a5d
Compare
@not-an-aardvark @kaicataldo updated the PR to export |
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.
LGTM! Thanks for contributing.
What is the purpose of this pull request? (put an "X" next to item)
[x] Other, please explain:
What changes did you make? (Give an overview)
isValidThisArg
is used both inno-useless-call.js
andprefer-spread.js
. placed it in ast-utils in case some other rules will use it.Is there anything you'd like reviewers to focus on?