在将Eslint添加到我的项目中之后,我在我的应用程序中遇到了这个错误.模板部件中的vue文件
Parsing error: '>' expected.eslint
在这个代码块中
<template>
<div class="flex justify-center h-40">
<div class="bg-blue-500 w-40 h-full"></div>
</div>
</template>
Basically, adding an attribute to any HTML tag throws this error
I'm using a Vue 3 with the "vue-ts" Vite template.
VSCode is my editor and i'm obviously the ESlint plugin :)
Here is my .eslintrc configuration
module.exports = {
'env': {
'node': true,
},
'extends': [
'eslint:recommended',
'plugin:vue/base',
'plugin:vue/vue3-recommended',
'plugin:@typescript-eslint/recommended'
],
'parserOptions': {
'ecmaVersion': 12,
'parser': '@typescript-eslint/parser',
'sourceType': 'module'
},
'plugins': [
'vue',
'@typescript-eslint'
],
'rules': {
'indent': [
'error',
'tab'
],
'linebreak-style': [
'error',
'unix'
],
'quotes': [
'error',
'single'
],
'semi': [
'error',
'never'
]
}
}
谢谢