nuxt / eslint-plugin-nuxt

ESLint plugin for Nuxt.js [WIP]
MIT License
129 stars 14 forks source link

Auto-imports marked as "is not defined" in Nuxt 3 .js files #202

Closed danielaag closed 8 months ago

danielaag commented 11 months ago

Hello!

I'm using Nuxt 3 but I prefer writing composables, plugins, utils, etc. in .js files rather than .ts since I don't want to use TypeScript.

Whenever I use auto-imported Vue or Nuxt functions, like ref or reactive, or even defineNuxtPlugin, eslint shows a warning that they are not defined, even though my application runs properly. This does not happen if I switch my files to .ts

Does anybody else have this issue? How can I fix this?

antfu commented 8 months ago

https://github.com/nuxt/eslint with https://github.com/nuxt/eslint/pull/336 should fix it for Nuxt 3.