代码格式错误提示:http://eslint.org/docs/rules/eol-last Newline required at end of file but not found

柔情只为你懂 2022-10-28 04:58 339阅读 0赞

初次运行时出现:http://eslint.org/docs/rules/eol-last Newline required at end of file but not found错误提示。
在这里插入图片描述

1、报错解释

  1. Errors:
  2. 1.http://eslint.org/docs/rules/eol-last 表示:文档末尾要换行
  3. Errors:
  4. 2 http://eslint.org/docs/rules/spaced-comment 表示: // 注释后要跟空格
  5. Errors:
  6. 3 http://eslint.org/docs/rules/indent 表示:缩进错误,设置'indent':0
  7. Errors:
  8. 4 http://eslint.org/docs/rules/no-tabs 表示:tab缩进错误

2、报错原因
文件编码的代码,不符合eslint的语法校验规则

解决方案:
在vs的搜索(左侧图标放大镜)里搜 useEslint: true 将其值改为false 就好了

在这里插入图片描述

发表评论

表情:
评论列表 (有 0 条评论,339人围观)

还没有评论,来说两句吧...

相关阅读