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

原文地址:https://www.cnblogs.com/pylf/p/13892211.html