Why it matters
An unload handler makes the page ineligible for the back/forward cache in most browsers, so every back navigation reloads the page instead of restoring it instantly. The event is also unreliable on mobile.
How to fix it
Use pagehide (or visibilitychange for analytics beacons). Only add beforeunload while there are unsaved changes.
Example
addEventListener('pagehide', () => navigator.sendBeacon('/log', data))References
More lint rules
void lint reports 67 rules in this category. Static source checks with no browser: Tailwind v4 silent failures, Next.js 16 API traps, React render-body bugs, accessibility markup, SEO files and motion hygiene.
webgl-in-mapWebGL canvas rendered inside `.map()`raf-without-cancel`requestAnimationFrame` loop in an effect without `cancelAnimationFrame`listener-without-cleanupEvent listener or interval added in an effect without cleanupscroll-listener-nonpassive`wheel` / `touchstart` / `touchmove` listener without `{ passive: true }`useeffect-fetchPage fetches its data in `useEffect`div-buttonClickable `<div>`/`<span>` without button semanticsdangerously-set-jsonld-unescapedJSON-LD injected with `JSON.stringify` without escaping `<`transition-all`transition: all` / `transition-all`