Skip to content

oxlint-plugin-react-doctor@0.9.21

Choose a tag to compare

@github-actions github-actions released this 01 Nov 07:02
· 480 commits to main since this release
8552771

Patch Changes

  • #2320 5a2c6f5 Thanks @aidenybai! - Report an unguarded useReducer dispatch after await or inside a microtask or Promise callback when it goes through a transparent local setter helper, such as queueMicrotask(() => assign(dispatch, action)), exactly where the direct dispatch is reported. Only no-set-state-after-await-in-effect accepts the forwarded dispatch, because it already counts a direct dispatch. The prop-change rules, which compare writes against useState initializers, stay unchanged. Imported, reassigned, asynchronous, deferred and conditional helpers, and reassigned dispatch bindings, stay outside the proof.

  • #2319 39152dc Thanks @aidenybai! - Report react-hooks-js/set-state-in-effect when an effect updates state synchronously through a transparent local setter helper, such as useEffect(() => assign(setValue, next)), which React Compiler does not follow. A new forwarded-set-state-in-effect rule finds the write with the forwarded setter proof, runs only when the compiler rule is enabled, and React Doctor reports its finding under the compiler's rule key, message and docs link, so react-hooks/set-state-in-effect disable comments, ignores and scoring treat it like the compiler finding. Compiler-visible synchronous setter calls retain duplicate suppression. Ref-derived measurements and guarded ref writes remain allowed. Imported, reassigned, asynchronous, deferred, conditional and multi-statement forwarding helpers stay outside the proof.