报错:
error Newline required at end of file but not found eol-last
✖ 1 problem (1 error, 0 warnings)
1 error and 0 warnings potentially fixable with the `--fix` option.
原因:package.json
中配置项lint少了 --fixed
解决办法:
1.在package.json中配置如下:
"lint": "eslint --fix --ext .js,.vue src"
其他配置不用修改,直接在末尾添加即可。
2.根据字面意思文件的末尾需要有空的一行。在最后加上一行空白就可以了。