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

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

1、报错解释

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

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

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

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_44433499/article/details/113699815
今日推荐