我今天上班时发现我的 linter 包中出现了一个不寻常的错误。我查看了包的文档,但我的 eslintrc 文件看不到任何问题。
这是我正在使用的副本
{
"extends": "airbnb",
"parser": "babel-eslint",
"rules": {
"import/no-extraneous-dependencies": "off",
"import/extensions": "off",
"import/no-unresolved": "off",
"eol-last": "off",
"no-unused-expressions": ["error",{
"allowTernary": true,
"allowShortCircuit": true
}],
"react/jsx-indent-props": "off",
"react/jsx-indent" : ["error", 4, { "props": 4 }],
"indent": [ "error", 4],
"react/jsx-filename-extension": "off",
"jsx-a11y/anchor-is-valid": [
"error",
{
"components": [],
"specialLink": [
"hrefLeft",
"hrefRight"
],
"aspects": [
"noHref",
"invalidHref",
"preferButton"
]
}
],
"no-bitwise": "off"
},
"env": {
"browser": true,
"jest": true
}
}
当我从命令行运行 eslint 时,我没有任何问题,这使得这更加令人困惑!
任何帮助将不胜感激 :)