前端基础知识【eslint常见报错】

 1 文件末尾存在空行(eol-last):Too many blank lines at the end of file.Max of 0 allowed
 2 
 3 缺少分号(‘semi’: [‘error’,’always’]) :Missing semicolon
 4 
 5 函数关键字后面缺少空格 :Missing space before function parentheses
 6 
 7 字符串没有使用单引号(’quotes’: [1, ’single’]) :String must use singlequote
 8 
 9 缩进错误 : Expected indentation of 2 spaces but found 4
10 
11 没有使用全等(eqeqeq) : Expected ’ === ’ and instaed saw ‘==12 
13 导入组件却没有使用 : ‘seller’ is defined but never used
14 
15 new了一个对象却没有赋值给某个常量(可以在该实例前添加此代码/eslint-disable
16 
17 no-new/忽略ESLint的检查): Do not user’newfor side effects
18 
19 超过一行空白行(no-multiple-empty-lines):More than 1 blank line not allowed
20 
21 注释符 // 后面缩进错误(lines-around-comment): Expected space or tab after
22//’ in comment
23 
24 模块导入没有放在顶部:Import in body of module; reorder to top
25 
26 前面缺少空格:Missing space before
27 
28 已定义但是没有使用:‘scope’ is defined but never used

 

posted @ 2021-12-18 21:32  为你编程  阅读(286)  评论(0)    收藏  举报