Nuxt · NUXT0068
Use VueUse timer composables
Finds VueUse project code that should use the supported use timers pattern instead.
Run this rule
pnpm nuxt doctor --rules vueuse/prefer-use-timers
Why it matters
Effects that outlive their component create leaks and stale updates. Register cleanup where Vue or VueUse can dispose it automatically.
Recommended fix
Use the VueUse-supported use timers pattern instead.
Useful links
Example
Use VueUse timers
Before
<script setup lang="ts">
const timer = setInterval(tick, 1000)
onBeforeUnmount(() => clearInterval(timer))
</script>
After
<script setup lang="ts">
useIntervalFn(tick, 1000)
</script>