vue项目编译出现error Unexpected ‘debugger‘ statement no-debugger


问题描述:项目中使用debugger/console报错
error Unexpected ‘debugger’ statement no-debugger
error Unexpected ‘debugger’ statement no-debugger

解决办法:
1. 找到项目中的 package.json 文件
2. 找到 eslintConfig 配置参数
3. 在 eslintConfig 下的 rules 添加 “no-debugger”: “off”, “no-console”: “off”,如果off不行,可以把它改成0 ,因为我之前试了一下设置为off时,编译还是会报错

更多配置信息可以参考https://blog.csdn.net/tianxintiandisheng/article/details/102855926


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM