VUE 解决eslint 报错问题

715 阅读1分钟
Unexpected trailing comma (comma-dangle)

字面意思:尾随了一个多余逗号
解决方法:删除对应行的尾末逗号

Newline required at end of file but not found (eol-last)

字面意思:文件末尾需要换行符,但找不到
解决方法:需要换行符

Require self-closing on Vue.js custom components ()

字面意思:需要在vue自定义组件上自己关闭
解决方法:

Extra semicolon (semi)

字面意思:多余分号
解决方法:去掉末尾多余分号

Expected indentation of 2 spaces but found 4 (indent)

字面意思:预期缩进2个空格,但发现4个(缩进)
解决方法:去掉多余空格

Trailing spaces not allowed (no-trailing-spaces)

字面意思:不允许尾随空格
解决方法:去掉多余行