vue3项目中tsx生效但编辑器有红色提示

266 阅读1分钟

项目中代码排查没有问题,依旧提示

提示“Parsing error: ',' expected.

提示“Parsing error: Unterminated regular expression literal.

把项目文件“eslint.config.ts”中的注释打开

// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
import { configureVueProject } from '@vue/eslint-config-typescript'
configureVueProject({ scriptLangs: ['ts', 'tsx'] })
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup