'Unexpected token' linting error when type
appears inside <script setup>
#492
Description
Environment
- Operating System: Windows_NT
- Node Version: v20.11.0
- Nuxt Version: 3.13.0
- CLI Version: 3.13.1
- Nitro Version: 2.9.7
- Package Manager: pnpm@9.6.0
- Builder: -
- User Config: compatibilityDate, devtools, ssr, modules, i18n, eslint, runtimeConfig, image, supabase
- Runtime Modules: @vueuse/nuxt@11.0.3, @nuxt/eslint@0.5.4, @nuxt/image@1.8.0, @nuxtjs/cloudinary@3.1.0, @nuxtjs/i18n@8.5.1, @nuxtjs/supabase@1.4.0, @nuxtjs/tailwindcss@6.12.1, @formkit/nuxt@1.6.5, @pinia/nuxt@0.5.4
- Build Modules: -
Package
@nuxt/eslint
Reproduction
Link to my repo: https://github.com/AloisSeckar/ELRHistory
Describe the bug
After updating from @nuxt/eslint
version 0.3.13
to current 0.5.4
, I am getting invalid (imho) linting errors related to using type
keyword inside <script setup>
.
Example 1 - definition of custom type:
Both VSCode ESlint extension and eslint
CLI command report the same problem:
Was there some development in Vue/Nuxt/ESLint that made using type
inside <script setup>
forbidden recently and I have missed it? Or what else could have happened?
EDIT: so I found out it happening not only in .vue
files, but in all .ts
files as well. Just my eslint config was only applied on .vue
files. When I added .ts
files, I got new batch of same linting errors from them...
Additional context
Similar issue was reported in May, but closed with no reply: #444
Logs
No response
Activity