Error:http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4

错误如下:

Error:http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4

错误原因:

    不符合eslint的校验规则  Tab键不等同于同行缩进,,校验错误

  或

  注释有问题  ://这种注释会报错  应换为/* */  这种的 但是成片代码这么多如何更换?????

 遇到这个问题试了各种办法都没有解决

但是最后还是找到了解决之法:

在  .eslintrc.js 文件中  添加  'no-unused-vars': 0

 大功告成  错误将显示   哈哈哈哈 开心

 修改图片如下:

  Error:http://eslint.org/docs/rules/indent Expected indentation of 2 spaces but found 4

希望对您有帮助!!!