ITADN

ESLint using Vue 2 rules with Nuxt 4

#648Closedoliverjane 创建于 2026-02-11
pending triage
O
oliverjanecommented
### Environment | | | | -------------------- | ------------------------------------------------- | | **Operating system** | `Linux 6.17.0-12-generic` | | **CPU** | `12th Gen Intel(R) Core(TM) i7-12650H (16 cores)` | | **Node.js version** | `v22.14.0` | | **nuxt/cli version** | `3.33.1` | | **Package manager** | `npm@11.6.0` | | **Nuxt version** | `4.3.1` | | **Nitro version** | `2.13.1` | | **Builder** | `vite@7.3.1` | | **Config** | `compatibilityDate`, `devtools`, `modules` | | **Modules** | `@nuxt/eslint@1.15.1` | ### Package @nuxt/eslint ### Reproduction 1. Create a new project with `npm create nuxt@latest` 2. Select `@nuxt/eslint` when asked to install modules 3. Add any code which violates Vue 2 rules (vue/no-multiple-template-root in my example repo) 4. Observe that Vue 2 rules are applied. A reproduction can be found at [https://github.com/oliverjane/nuxt-eslint-issue](https://github.com/oliverjane/nuxt-eslint-issue) ### Describe the bug When creating a new Nuxt 4 project with ESLint, Vue 2 rules are applied instead of Vue 3: ``` olliej@Oliver-Linux-Nitro:~/Programming/JS/macaron$ npx eslint . /home/olliej/Programming/JS/macaron/app/pages/index.vue 3:5 error The template root requires exactly one element vue/no-multiple-template-root `` ✖ 1 problem (1 error, 0 warnings) ``` ### Additional context _No response_ ### Logs ```shell-script ```
关闭于 2026-02-11 1 条评论