1一乐

V1

2023/03/27阅读:24主题:默认主题

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

1、 报错信息: image

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

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

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

image
image

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

分类:

前端

标签:

前端

作者介绍

1一乐
V1