Vue-cli 报 Trailing spaces not allowed no-trailing-spaces 错误

824 阅读1分钟

报错的主要原因是由于 ESLint 检查到了多余的空格
解决方法一:
简单有效:根据提示删除多余的空格即可

解决方法二:
配置 .eslintrc.js 文件,如下
找到 rules 字段,在其中添加:

rules: {
'no-irregular-whitespace': 'off'
}

然后重新编译运行即可