eps1lon
released this
11 Oct 13:32
·
67 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
_Button
or_component
are 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. }
_Component
should be renamed toComponent
.
- Add support for ESLint v9. (@eps1lon in #28773)
- Consider dispatch from
useActionState
stable. (@eps1lon in #29665) - Accept
as
expression in callback. (@StyleShit in #28202) - Accept
as
expressions 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
as
expressions. (@cpojer in #27590) - Allow
useEffect(fn, undefined)
. (@kassens in #27525) - Disallow hooks in async functions. (@acdlite in #27045)
- Rename experimental
useEvent
touseEffectEvent
. (@sebmarkbage in #25881) - Lint for presence of
useEvent
functions in dependency lists. (@poteto in #25512) - Check
useEvent
references instead. (@poteto in #25319) - Update
RulesOfHooks
withuseEvent
rules. (@poteto in #25285)