解决方法:配置文件eslintrc.js中设置
完整的如下:
// ESlint 检查配置
module.exports = {
root: true,
parser: "vue-eslint-parser",
parserOptions: {
parser: "babel-eslint",
sourceType: "module",
ecmaVersion: 2020,
},
env: {
browser: true,
node: true,
es6: true,
},
extends: [],
// add your custom rules here
// it is base on https://github.com/vuejs/eslint-config-vue
rules: {
quotes: "off",
semi: "off",
commaDangle: "off",
"vue/no-parsing-error": ["off"]
},
}