Newline required at end of file but not found.

报错

Newline required at end of file but not found.

解决方案

  1. 在 .editorconfig 文件中 insert_final_newline = false
    在这里插入图片描述
  2. 在 .eslintrc.js 文件的 rules 中添加 ‘eol-last’: 0(不检查最后一行)
    在这里插入图片描述
    至此,错误解决。

猜你喜欢

转载自blog.csdn.net/qq_45902692/article/details/125991126