·
1686 commits
to main
since this release
This release only contains eslint-plugin-react-hooks. Notably, new violations and support for ESLint v9 were added.
eslint-plugin-react-hooks
- New Violations: Component names now need to start with an uppercase letter instead of a non-lowercase letter. This means
_Buttonor_componentare no longer valid. (@kassens) in #25162
For example, infunction _Component() { useState() ^^^^^^^^ A React Hook "useState" is called in function "_Component" which is neither a Component nor a custom React Hook function. }
_Componentshould be renamed toComponent.
- Add support for ESLint v9. (@eps1lon in #28773)
- Consider dispatch from
useActionStatestable. (@eps1lon in #29665) - Accept
asexpression in callback. (@StyleShit in #28202) - Accept
asexpressions in deps array. (@StyleShit in #28189) - Treat
React.use()the same asuse(). (@kassens in #27769) - Move
use()lint to non-experimental. (@kassens in #27768) - Support Flow
asexpressions. (@cpojer in #27590) - Allow
useEffect(fn, undefined). (@kassens in #27525) - Disallow hooks in async functions. (@acdlite in #27045)
- Rename experimental
useEventtouseEffectEvent. (@sebmarkbage in #25881) - Lint for presence of
useEventfunctions in dependency lists. (@poteto in #25512) - Check
useEventreferences instead. (@poteto in #25319) - Update
RulesOfHookswithuseEventrules. (@poteto in #25285)