Skip to content

eslint-plugin-react-hooks: disallow hook arguments#35411

Closed
leeguooooo wants to merge 1 commit intofacebook:mainfrom
leeguooooo:pr-hook-argument
Closed

eslint-plugin-react-hooks: disallow hook arguments#35411
leeguooooo wants to merge 1 commit intofacebook:mainfrom
leeguooooo:pr-hook-argument

Conversation

@leeguooooo
Copy link
Copy Markdown

Fixes #22254

Summary

  • report hooks passed as arguments inside components/hooks

Testing

  • yarn workspace eslint-plugin-react-hooks test -- --runTestsByPath tests/ESLintRulesOfHooks-test.js

@meta-cla meta-cla Bot added the CLA Signed label Dec 26, 2025
@josephsavona
Copy link
Copy Markdown
Member

Thanks for the contribution. This is already fixed in React Compiler’s version of this analysis - our plan is to replace the current version of the lint rule with that version.

I’m not saying we shouldn’t land this, but it does seem better to put the effort into finishing refining the RC version of the rule.

@leeguooooo leeguooooo closed this by deleting the head repository Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Rules of Hooks should not allow passing a Hook as a function argument

2 participants