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
Add rule mandatory-useEvent
#100
Conversation
No actual checks yet, all tests failing
What about adding |
@sergeysova But i have added this hook as a valid case too: Also, this rule (with minor changes) can be transformed to |
Aliased imports may be useful in near future because of possible clash with React's `useEvent` RFC
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.
Great job, thanks ❤️
Please merge as soon as you are ready. I'll prepare the next release in a week.
if (parserServices.hasFullTypeInformation) { | ||
return { | ||
Identifier(node) { | ||
if (isInsideReactComponent(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.
🤓 personally, I would prefer early returns rather than 3 levels of nesting.
Closes #30