Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>SWRNew to Visual Studio Code? Get it now.
SWR

SWR

Symartec LTD.

|
1 install
| (0) | Free
See SWR keys and catch a mutate() key that does not match a useSWR key.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SWR

SWR keys in the sidebar. mutate() is checked against useSWR, useSWRImmutable, and useSWRMutation.

The match is exact. mutate("/api/user") does not match useSWR(["/api/user", page]), because SWR treats a string and an array as different keys. A key built from a variable is listed, and it is not compared.

A useSWR key that nothing mutates is normal, so it is not a warning.

What you get

  • Sidebar of cache keys
  • Jump from mutate() to the matching hook
  • Warning when mutate() has no matching key

The sidebar stays empty until the workspace depends on swr.

Settings

Setting Default What it does
swr.codeLens on Link above mutate()
swr.diagnostics on Warn when the key does not exactly match a hook

Commands

  • SWR: Refresh reads the workspace again
  • SWR: Focus Keys opens the sidebar
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft