eslint icon indicating copy to clipboard operation
eslint copied to clipboard

@nuxt/eslint-config is not picking up Nuxt globals in JS files

Open TheDutchCoder opened this issue 1 year ago • 4 comments

~~Everything works fine with @nuxt/eslint-config, but as soon as you swap it out for @nuxt/eslint-config-typescript, eslint will tell you that it can't find @nuxt/eslint-config-typescript to extend from:~~

~~Error: Failed to load config "@nuxt/eslint-config-typescript" to extend from.~~

TheDutchCoder avatar Dec 21 '23 15:12 TheDutchCoder

~~Ah boy, the module was renamed from @nuxt to @nuxtjs namespace but the docs haven't updated properly I think?~~

TheDutchCoder avatar Dec 21 '23 15:12 TheDutchCoder

Okay, apparently this isn't supposed to be used with Nuxt3, which leads me to the original problem I'm experiencing:

When using @nuxt/eslint-config and you have a TS and JS project, eslint works fine for the TS files, but it does not pick up any of the Nuxt globals in JS files.

TheDutchCoder avatar Dec 21 '23 16:12 TheDutchCoder

Do you have globals picked up from ts files? I don't have it picking up globals from anywhere.

cco3 avatar Jan 19 '24 15:01 cco3

Same here, Even after generating TS styles (nuxi prepare), and using @nuxt/eslint-config as last extend inside my .eslintrc.js config file.

MrStanDu33 avatar Jan 21 '24 19:01 MrStanDu33