Closed
Description
144:17 error Expected indentation of 14 space characters but found 16 react/jsx-indent
code:
<Breadcrumb.Item>
<Link to="/">山西省</Link>
</Breadcrumb.Item>
and: .eslintrc
{
"extends": "eslint-config-airbnb",
"parser": "babel-eslint",
"rules": {
"spaced-comment": [1],
"no-unused-vars": [1],
"no-empty": [1],
"react/wrap-multilines": [1],
"react/no-multi-comp": [1],
"no-constant-condition": [1],
"react/jsx-no-bind": [1],
"react/prop-types": [1],
"arrow-body-style": [0],
"react/prefer-stateless-function": [1],
"semi": [1],
"no-param-reassign": 0,
},
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
}
package.json:
"scripts": {
"lint": "eslint --ext .js,.jsx src",
"lintf": "eslint --ext .js,.jsx src --fix",
}
All package related to eslint in devDependencies
in package.json:
"eslint": "^2.7.0",
"eslint-config-airbnb": "^9.0.1",
"eslint-plugin-import": "^1.8.1",
"eslint-plugin-jsx-a11y": "^1.3.0",
"eslint-plugin-react": "^5.1.1",
After running npm run lintf
, the error shows and the code stays the same. --fix
dit not auto fix react/jsx-indent
.
Any Ideas?