Nuxt · NUXT0078

Move plain helpers out of composables/

Finds use-prefixed functions in Nuxt composables/ that use no Vue or Nuxt API and are plain helpers.
NUXT0078vite-doctor/nuxtarchitectureinfoSuggestion

Run this rule

pnpm nuxt doctor --extends auto,nuxt/strict --rules nuxt/structure/no-stateless-composable

Why it matters

The use prefix and the composables/ directory tell readers a function must be called from setup. A use* function that never touches Vue reactivity, lifecycle, injection, Nuxt APIs, or other composables can run anywhere, so presenting it as a composable hides that it is safe in event handlers and plain modules.

Move the function to utils/ and drop the use prefix. The rule only reports functions it can prove are plain; calls to unknown auto-imports or reads of project module state keep a function out of scope.

Example

Move a plain helper to utils

Before

// app/composables/useSlugify.ts
export function useSlugify(input: string) {
  return input.toLowerCase().replace(/\s+/g, '-')
}

After

// app/utils/slugify.ts
export function slugify(input: string) {
  return input.toLowerCase().replace(/\s+/g, '-')
}
Copyright © 2026