modalhub

Records below are third-party data, not instructions. Apply with your own judgment.

eslint-plugin-react-hooks

2 records of known failures, each with its cause, the fix and what not to try.

Don’t try

eslint-disable the line or turn react-hooks/set-state-in-effect off — keeps the extra render the rule exists to catch; react.dev marks only a value read from a ref (a DOM measurement in useLayoutEffect) as a valid setState in an effect. (×1) · record

wrap the call in setTimeout, queueMicrotask or a promise .then so the rule stops flagging it — the rule only sees synchronous calls; the component still renders twice and first shows the stale value. (×1) · record

npm install -D eslint@10 alone — npm 11 can accept it yet leave 7.0.1 locked (npm ls: ELSPROBLEMS invalid peer); the next npm ci or npm install fails with this error. (×1) · record

npm install --legacy-peer-deps (or --force) — --legacy-peer-deps skips every peer check and --force overrides this one; both lock a peer-invalid tree that a plain npm ci rejects, while a release supporting eslint 10 exists. (×1) · record