Open adamreisnz opened 2 days ago
@adamreisnz Why would you add your own @eslint/js
and eslint-plugin-vue
configs to override Nuxt's configs?
Why does that matter for this problem?
I don't know what base settings Nuxt uses, and I want to make sure that the base Vue settings that I need are included.
This shouldn't affect global as they don't get overwritten.
On Sat, 29 Jun 2024, 13:03 Anthony Fu, @.***> wrote:
@adamreisnz https://github.com/adamreisnz Why would you add your own @eslint/js and eslint-plugin-vue configs to override Nuxt's configs?
— Reply to this email directly, view it on GitHub https://github.com/nuxt/eslint/issues/461#issuecomment-2197807277, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADXYQXZTLQQISOX3APSW2DZJYBXJAVCNFSM6AAAAABKCSJCCGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJXHAYDOMRXG4 . You are receiving this because you were mentioned.Message ID: @.***>
I don't know what base settings Nuxt uses, and I want to make sure that the base Vue settings that I need are included.
Use the config inspector to see what is being loaded. Or check the source-code.
I have removed the extra configuration from the eslint.config.mjs
file to avoid discussions about it detracting from the problem at hand.
Methods calls like defineEventHandler
and readBody
are still flagged as not defined in .js
files.
The error goes away in the .ts
file, because in your config, no-undef
has been disabled fully for TS files (see https://github.com/nuxt/eslint/issues/452)
Environment
Package
None
Reproduction
https://github.com/adamreisnz/nuxt-eslint-reproduction/tree/issue-461
Describe the bug
Several built-in Nuxt globals are showing up as undefined, despite using the Nuxt ESLint module. For example, check the files:
nuxt.config.ts
-->defineNuxtConfig
is marked by ESLint as not definedserver/test.js
-->defineEventHandler
andreadBody
are marked by ESLint as not definedThis list is probably non-exhaustive, it's just the methods I've used so far.
Additional context
This is with a brand new Nuxt app with module enabled, and some additional globals
Logs
No response