Nuxt · NUXT0058

Only shared utils and types are auto-imported

Flags nested shared autoimport assumption in Nuxt shared code before it leaks into runtime behavior.
NUXT0058vite-doctor/nuxtimportswarnSuggestion

Run this rule

pnpm nuxt doctor --rules nuxt/shared/no-nested-shared-autoimport-assumption

Why it matters

Auto-imports are global within a project. Explicit names and imports prevent local code from shadowing framework composables.

Remove nested shared autoimport assumption, or move it to the Nuxt runtime/API that owns that behavior.

Example

Export nested shared utilities explicitly

Before

// shared/utils/nested/math.ts
export const add = (a: number, b: number) => a + b

After

// shared/utils/math.ts
export { add } from './nested/math'
Copyright © 2026