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

推荐阅读:

HTML页面 用CSS实现禁止选中、复制和右键

利用css中的伪类 给元素设置特殊样式效果

给网站添加熊掌号粉丝关注按钮

【笔记】5.2学习小程序用到的网站和资料

【笔记】微信小程序注册、发布流程及首页自动跳转

赞 (3)
分享到: +

评论 沙发

Avatar

换个身份

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