ESLint 错误: 尾随空格问题
ESLint 代码检查工具检测到您的代码中存在一个错误:在文件 'src\components\Shopcart.vue' 的第 17 行存在不允许出现的尾随空格。
错误信息:
'✘ http://eslint.org/docs/rules/no-trailing-spaces Trailing spaces not allowed src\components\Shopcart.vue:17:1
^
✘ 1 problem (1 error, 0 warnings)'
原因:
ESLint 规则 'no-trailing-spaces' 规定代码中不允许出现尾随空格。
解决方法:
删除第 17 行末尾的空格即可。
禁用警告:
您可以使用特殊注释来禁用某些警告。
- 使用 '// eslint-disable-next-line' 来忽略下一行代码的警告。
- 使用 '/* eslint-disable */' 来忽略文件中所有警告。
原文地址: https://www.cveoy.top/t/topic/oiez 著作权归作者所有。请勿转载和采集!