其他分享
首页 > 其他分享> > 【Trailing spaces not allowed no-trailing-spaces】报错

【Trailing spaces not allowed no-trailing-spaces】报错

作者:互联网

当我们用 Eslint 插件检测我们代码的规范的时候,有时候会遇到 “Trailing spaces not allowed no-trailing-spaces”报错,意思是空格不允许,多了空格,错误如下:

D:\MyCodes\simulation-project\src\views\Register.vue
  61:6  error  Trailing spaces not allowed  no-trailing-spaces

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

这不是你的代码逻辑有错,而是你的代码不符合这个 Eslint 的规范
在这里我不想通过配置,屏蔽 Eslint 的检测,因为在公司中我们还是要符合规范的,这样与我们的初衷相违背。

解决:

总结:

标签:no,allowed,空格,61,spaces,报错,error,trailing
来源: https://blog.csdn.net/liuzr_/article/details/121606857