Skip to content

Conversation

@leeguooooo
Copy link

Fixes #20196

Summary

  • treat optional-chained hook calls as conditional hook usage

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
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.

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: eslint-plugin-react-hooks doesn't report conditional typescript "?." hooks

2 participants