ESLint:Expected indentation of 2 spaces but found 4

ESLint:Expected indentation of 2 spaces but found 4

修改eslint 配置文件 .eslintrc.js

rules: {
   ...
    // 缩进
    // 'indent': 2,
    // 'indent': [2, 2, {"SwitchCase": 1}],
    "indent": [1, 2],
   ...
 }

官方文档rule说明:http://eslint.org/docs/2.0.0/...

你可能感兴趣的:(ESLint:Expected indentation of 2 spaces but found 4)