gpt4 book ai didi

vuejs3 - .eslintrc 错误解析错误 : Maximum call stack size exceeded

转载 作者:行者123 更新时间:2023-12-05 05:45:59 29 4
gpt4 key购买 nike

我正在使用 vite、eslint 和 vue3 typescript 。当我运行命令时:

npm run lint

我遇到了很多错误:

0:0  error  Parsing error: Maximum call stack size exceeded

我的 .eslintrc.js 设置是:

module.exports = {
parserOptions: {
parser: 'vue-eslint-parser',
sourceType: 'module'
},
env: {
node: true,
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'prettier'
],
rules: {
// override/add rules settings here, such as:
// 'vue/no-unused-vars': 'error'
}
}

最佳答案

这解决了问题,.eslintrc.js:

module.exports = {
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
sourceType: "module"
},
env: {
node: true,
},
extends: [
'eslint:recommended',
'plugin:vue/vue3-recommended',
'prettier'
],
rules: {
// override/add rules settings here, such as:
// 'vue/no-unused-vars': 'error'
}
}

关于vuejs3 - .eslintrc 错误解析错误 : Maximum call stack size exceeded,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71241683/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com