Nuxt · Data fetching

NUXT0038Avoid unscoped refreshNuxtData calls

Flags global refresh without justification in Nuxt project code before it leaks into runtime behavior.

Why it happens

Refreshing every async-data key refetches unrelated state and hides which data a mutation actually invalidates.

Fix

Remove global refresh without justification, or move it to the Nuxt runtime/API that owns that behavior.

Example

Refresh specific async data keys

Before

await refreshNuxtData()

After

await refreshNuxtData('orders')

Verify the fix

Run only this rule after editing so the report stays focused on the diagnostic you are closing:

pnpm nuxt doctor --rules nuxt/no-global-refresh-without-justification
Copyright © 2026