💖💖💖错误描述
vue项目中复制别人代码或者clone了一个github项目,运行到后面发现一直在报语法错误。如下图片显示
🎉错误代码
错误提示会提示你:您可以使用特殊注释来禁用某些警告。
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
💖💖💖解决方案
在vue项目中找到在vue.config.js 中添加lintOnSave: false 关闭语法检查
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,//关闭语法检查
})