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前端开发资源网 - w3h5 » Vue报错:Newline required at end of file but not found eol-last

推荐阅读:

Linux安装JDK+Tomcat+MySQL及发布项目教程

找回Windows Server&Windows10 ltsb 图片查看器

HTML img src图片路径不存在,则显示一张默认图片的方法

js 获取input的value值及验证手机号和汉字的正则表达式

腾讯云IIS 百度HTTPS认证失败必读及抓取诊断

赞 (3)
分享到: +

评论 沙发

Avatar

换个身份

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