Nuxt · NUXT0011
Use Nuxt Scripts instead of raw app.head scripts
Flags third party config script in Nuxt project code before it leaks into runtime behavior.
Run this rule
pnpm nuxt doctor --rules nuxt-scripts/no-third-party-config-script
Why it matters
Untrusted HTML and scripts are high-risk rendering surfaces. Keep them explicit, constrained, and routed through framework APIs that encode intent.
Recommended fix
Remove third party config script, or move it to the Nuxt runtime/API that owns that behavior.
Useful links
Example
Avoid third party config script
Before
useHead({
script: [{ src: 'https://example.com/widget.js' }],
})
After
useHeadSafe({
script: [{ src: trustedWidgetUrl }],
})