antfu / eslint-config

Anthony's ESLint config preset
https://eslint-config.antfu.me/
MIT License
4.02k stars 443 forks source link

Parsing error with Nuxt and TypeScript #565

Closed iamwxq closed 3 months ago

iamwxq commented 3 months ago

Describe the bug

Hi, thanx for your awesome repo.

I found a parsing error when I use your eslint-config with Nuxt and TypeScript. I generated it by the . You can check it with my minimal repo. It shows that eslint seems can't properly parse .vue file with <script setup lang="ts"></script>

screenshot:

eslint

Reproduction

https://stackblitz.com/edit/nuxt-starter-6fuuku

System Info

System:
    设备名称    DESKTOP-1R0P5I0
    处理器 13th Gen Intel(R) Core(TM) i7-13700K   3.40 GHz
    机带 RAM  64.0 GB (63.7 GB 可用)
    系统类型    64 位操作系统, 基于 x64 的处理器
  Binaries:
    Node: 20.15.1
    npm: 10.7.0
    pnpm: 9.6.0
  Browsers:
    Chrome: 126.0.6478.183

Used Package Manager

pnpm

Validations

Contributions

antfu commented 3 months ago

Try to install typescript in your project root

iamwxq commented 3 months ago

thanks a lot! it could be solved after installing typescript