Nuxt · NUXT0067
Use VueUse storage composables
Finds VueUse project code that should use the supported use storage pattern instead.
Run this rule
pnpm nuxt doctor --rules vueuse/prefer-use-storage
Why it matters
Manual storage reads and watches duplicate serialization, cross-tab synchronization, default handling, and reactive updates already handled by useStorage().
Recommended fix
Use VueUse useStorage() for client storage so refs, serialization, and cleanup stay together.
Useful links
Example
Use VueUse storage
Before
const theme = ref(localStorage.getItem('theme') || 'light')
watch(theme, value => localStorage.setItem('theme', value))
After
const theme = useStorage('theme', 'light')