Skip to main content

no-window-alert

window.alert() should use a proper notification component.

SeverityDimensionFiles
ErrorConsistency.tsx .jsx .ts

What it flags

A line like this:

window.alert('Saved')

is reported as:

window.alert() — use a Toast or Dialog component instead

How to fix it

Replace with a design system notification component.

preset AI suggests a fix: Replace window.alert() with Toast component. Browser alerts block the UI and cannot be styled. Use a Toast or Dialog component from the design system.

Before:

window.alert('Saved')

After:

toast({ title: "message" })

Was this page helpful?

Last reviewed by @jschuyler
All systems operationalDocsDevelopersPlatformPricing
PrivacyTerms© 2026 fndd, LLC