agiledigital-labs / agiledigital-labs/eslint-plugin-total-functions

Add rule for Web Storage API (localStorage, sessionStorage)

Offen
#899 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
92
Forks
5
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

1. Accessing `localStorage` or `sessionStorage` objects can throw `SecurityError DOMException`
2. "Set" operations can throw `QuotaExceededError DOMException`
3. `localStorage` and `sessionStorage` can be `null` (not sure if this is per spec, but Safari, Mobile Safari, and Chrome Mobile WebView definitely do this)

Reference: https://html.spec.whatwg.org/multipage/webstorage.html

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.