我过去常常使用'eslint-config-rallycoding'和.eslintrc,如下所示:
}
"extends": "rallycoding"
}
最近我开始有错误,尽管谷歌搜索我无法解决所以我切换到'esling-config-react'
}
"extends": "react"
}
现在eslint抱怨: '期望缩进4个空格,但找到2个(缩进)'
我很好2.我怎么能改变它接受2? 感谢
编辑:
我查看了下面建议的链接,并将以下内容放在.eslintrc中:
{
"extends": "react",
"rules": {
"indent": ["error": 2]
}
}
导致控制台出错:
Configuration for rule "indent" is invalid:
Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '{ error: 2 }').
Error: /Users/wasteland/projects/react/shapes/.eslintrc:
Configuration for rule "indent" is invalid:
Severity should be one of the following: 0 = off, 1 = warn, 2 = error (you passed '{ error: 2 }').