0
点赞
收藏
分享

微信扫一扫

vscode莫名其妙的错误:eslint的语法校验规则

1、 报错信息:

vscode莫名其妙的错误:eslint的语法校验规则_缩进

http://eslint.org/docs/rules/eol-last 翻译:文档末尾要换行

2、分析原因:插件或相关配置eslint的语法进行校验,代码规范不符合校验规则。

3、解决:回车键换行一下

vscode莫名其妙的错误:eslint的语法校验规则_缩进_02

4、eslint的语法校验规则常见的错误:

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缩进错误


举报

相关推荐

0 条评论