ESLint doesn't detect undefined auto-imported components
pending triage
### Environment
- nuxt: 4.2.1
- vue: 3.5.24
- @nuxt/eslint: 1.10.0
- eslint: 9.39.1
- node: 22.x
### Package
@nuxt/eslint
### Reproduction
**StackBlitz:** https://stackblitz.com/edit/github-x6fkhrye?file=app%2Fapp.vue
**Steps to reproduce:**
1. Open reproduction
2. Note `<NonExistentComponent />` is used in app.vue
3. Note `app/components/NonExistentComponent.vue` doesn't exist
4. Run `npm run lint`
5. **Bug:** Lint passes ✅ (should fail ❌)
### Expected Behavior
Lint should fail with:
error: Component 'NonExistentComponent' is not defined
### Current Behavior
Lint passes with no errors. Only fails at runtime/build.
### Describe the bug
ESLint passes when components are referenced but don't exist (deleted/renamed/typo).
### Additional context
- `vue/no-undef-components` doesn't work with Nuxt auto-imports
- This affects pre-commit hooks and CI/CD reliability
### Logs
```shell-script
~/projects/github-x6fkhrye 1m 14s
❯ npm install
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: undefined,
npm warn EBADENGINE required: { node: '22.x' },
npm warn EBADENGINE current: { node: 'v20.19.1', npm: '10.8.2' }
npm warn EBADENGINE }
> postinstall
> nuxt prepare
[1:07:55 PM] ERROR (node:86) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)
✔ Types generated in .nuxt nuxi 1:08:03 PM
added 15 packages, and changed 1 package in 13s
196 packages are looking for funding
run `npm fund` for details
~/projects/github-x6fkhrye 13s
❯ npm run lint
> lint
> npm run type-check && npm run eslint:check
> type-check
> vue-tsc -b --noEmit
> eslint:check
> eslint .
(node:91) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
~/projects/github-x6fkhrye 4s
❯ npm run dev
> dev
> nuxt dev
[1:08:19 PM] ERROR (node:94) ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)
Nuxt 4.2.1 (with Nitro 2.12.9, Vite 7.2.2 and Vue 3.5.24) nuxi 1:08:19 PM
1:08:19 PM
█▀▀▀▀▀▀▀███▀████▀▀▀▀▀▀█▀▀▀▀▀▀▀█
█ █▀▀▀█ █ ▄▄██▄▄▄ ▀▄█ █ █▀▀▀█ █
█ █ █ █▀ ▀█ ▀ ▀ █ ███ █ █ █
█ ▀▀▀▀▀ █ █ █ █▀▄ █ ▄▀█ ▀▀▀▀▀ █
█▀▀█▀██▀▀▄█▄ ▀▀▀ ▀▄▄ ▄█▀▀▀█▀▀██
██▄▀▀▀ ▀▄▀▄█ █▀██▄█▀▄▄ ▀█ ▀▀▄█
██▀▄▀▄ ▀ ▄ ▄ ██▀▀██ ▀ ██▀▄ ▀█
██ ▀▀█▀▄▄██ █▄███▀▀▄▄▄▀█▀▀▀▀▀█
█▀█▄▀▄ ▀ ▄▀ ▄▀▄█▄ ▄█ ▄▄█▄█ ██
█▀█ ▄██▀▄ ▀█▀ ▀█ █▄█ ▄▄▀▄█▀ █
█▀██ █▀ ▄▀█▄▀▀ ▄▀ ▀ ▀▀█▀▄▄█
█▀▀▀▀▀▀▀█ █ ▄█▀ █▄▀██ █▀█ █▄ ▄█
█ █▀▀▀█ ██▄▄█▀ █▄▄▀▄█ ▀▀▀ ▄▄█▄█
█ █ █ █▄▀▄▄ █▀██▄█▀██▄█ ▄▀█
█ ▀▀▀▀▀ █ ▄▀ █ ▄█ ▄█ ██ ██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
➜ Network: https://stackblitz.com/edit/github-x6fkhrye [QR code]
➜ Local: http://localhost:3000/
➜ DevTools: press Shift + Alt + D in the browser (v3.0.1) 1:08:20 PM
ℹ Re-optimizing dependencies because lockfile has changed 1:08:21 PM
✔ Vite client built in 260ms 1:08:21 PM
✔ Vite server built in 368ms 1:08:22 PM
✔ Nuxt Nitro server built in 569ms nitro 1:08:23 PM
ℹ Vite server warmed up in 0ms 1:08:23 PM
ℹ Vite client warmed up in 1ms 1:08:23 PM
WARN [Vue warn]: Failed to resolve component: NonExistentComponent 1:08:24 PM
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. at <App>
at <NuxtRoot>
WARN [Vue warn]: Component <Anonymous> is missing template or render function. at <Anonymous> 1:08:24 PM
at <App>
at <NuxtRoot>
WARN [Vue warn]: Failed to resolve component: NonExistentComponent 1:08:24 PM
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. at <App>
at <NuxtRoot>
WARN [Vue warn]: Component <Anonymous> is missing template or render function. at <Anonymous> 1:08:24 PM
at <App>
at <NuxtRoot>
ℹ 1:08:24 PM
[vue-tsc] Found 0 errors. Watching for file changes.
ℹ 1:08:25 PM
[vue-tsc] Found 0 errors. Watching for file changes. (x2)
ℹ ✨ new dependencies optimized: @vue/devtools-core, @vue/devtools-kit 1:08:25 PM
```
关闭于 2025-11-07 1 条评论