-
Notifications
You must be signed in to change notification settings - Fork 48.6k
[eslint-plugin-react-hooks] updates for component syntax #33089
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
Conversation
db00b21
to
72d9402
Compare
return false; | ||
|
||
case 'FunctionDeclaration': | ||
case 'ComponentDeclaration': |
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.
Since the changes to this package are trivial, what do you think about patching it instead? It wouldn't conflict that often and if it did it would be easy to fix.
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.
This is the patched version, not sure I follow.
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.
I mean as a git patch via https://www.npmjs.com/package/patch-package
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.
it's in node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js
etc
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.
I'll leave that as a followup for someone who wants to figure this out. Not sure adding more hacks on top of the already complicated build infra is actually better than a few forked files.
packages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js
Outdated
Show resolved
Hide resolved
Adds support for Flow's component and hook syntax. [docs](https://flow.org/en/docs/react/component-syntax/)
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.
Makes sense, thanks!
Adds support for Flow's component and hook syntax. [docs](https://flow.org/en/docs/react/component-syntax/) DiffTrain build for [4c4a57c](4c4a57c)
Adds support for Flow's component and hook syntax. [docs](https://flow.org/en/docs/react/component-syntax/)
Adds support for Flow's component and hook syntax. docs