eslint-plugin-total-functions icon indicating copy to clipboard operation
eslint-plugin-total-functions copied to clipboard

Add rule for Web Storage API (localStorage, sessionStorage)

Open EvgenyOrekhov opened this issue 1 year ago • 0 comments

  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

EvgenyOrekhov avatar Jun 12 '24 16:06 EvgenyOrekhov