问题:
vue3中在.vue文件中使用tsx/jsx时,eslint报错:Parsing error: '>' expected. eslint
解决方法:
在eslintrc文件中增加parserOptions.ecmaFeature.jsx: true
.eslintrc.js
module.exports = {
parser: "vue-eslint-parser",
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaVersion: 'latest',
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
}
}