老师,EslInt 总是报这个错误,该如何解决?
下面是 .eslintrc.cjs 配置
module.exports = {
env: {
browser: true,
es2021: true,
node: true
},
extends: [
'standard-with-typescript',
'plugin:vue/vue3-essential'
],
overrides: [
{
env: {
node: true
},
files: [
'.eslintrc.{js,cjs}'
],
parserOptions: {
sourceType: 'script'
}
}
],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
// "parser": "vue-eslint-parser", // 解决 Parsing error: Unexpected token 错误
},
plugins: [
'vue'
],
rules: {
}
}