NuxtN
Nuxt15mo ago
Tincan

nuxt/eslint doesn't recognise global helpers in plugins folder

I have a number of files in my plugins folder and nuxt/eslint module is flagging the following as undefined, even though they're not and my project still works useRuntimeConfig, defineNuxtPlugin.

A workaround is to add this to config, but it seems odd (a bug?) that it can't just read these in the plugins folder when it doesn't flag as a problem for the rest of the project

languageOptions: {
globals: {
defineNuxtPlugin: "readonly",
useRuntimeConfig: "readonly",
},
},
Was this page helpful?