初次运行时出现: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
就好了