1.报错:
12:7 error Missing space before function parentheses space-before-function-paren
14:1 error Expected indentation of 6 spaces but found 8 indent
原因:写代码的时候有空格问题
解决方法:
要么自己把空格问题编辑好,要么忽略配置
在文件夹eslintrc.js中加入
rules: {
'indent': 0,
'space-before-function-paren': 0
}
2.报错
Trailing spaces not allowed no-trailing-spaces
原因:空格带多了,具体到哪一行,把空格给删了
3.报错
Newline required at end of file but not found eol-last
原因:页面最后少了一行,在最后加一行就行了