Vue报错:Newline required at end of file but not found eol-last

今天遇到一个非常奇怪的问题,Vue 项目使用了 Eslint 规范,然后就老是报错。

  11:2  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.

找了半天没找到语法错误,最后才知道,这是 Vue 一个奇葩的报错:你的文件最后没有空一行

Vue-endLine.png Vue报错:Newline required at end of file but not found  eol-last 经验总结

最后空一行,就不报错了。

未经允许不得转载:Web前端开发资源网 » Vue报错:Newline required at end of file but not found eol-last

推荐阅读:

Vue.js学习笔记——条件、循环、双向绑定

jQuery实现元素的鼠标移入移出及点击显示隐藏(微信二维码)

Linux下导入SQL文件及MySQL常用命令

Linux下如何重置MySQL密码

PHP连接MySQL数据库报错:Call to undefined function mysql_connect()的解决方法

赞 (3)
分享到: +

评论 沙发

Avatar

换个身份

  • 昵称 (必填)
  • 邮箱 (选填)