我正在尝试制作简单的组件。但是当我点击ctrl + s
它时:
警告和错误是这样的:
[eslint] 预期结束标记以匹配开头的缩进。(react/jsx-closing-tag-location) [eslint] 预期缩进 4 个空格字符,但找到 2 个。 (react/jsx-indent)
我的.eslintrc
:
{
"extends": "airbnb",
"parserOptions": {
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
}
},
"rules": {
"max-len": ["warn", 120],
"indent": ["warn", 2],
"react/jsx-indent": ["warn", 4],
"react/forbid-prop-types": 0,
"semi": [2, "never"],
"no-underscore-dangle": 0,
"no-console": 0,
"linebreak-style": 0,
"comma-dangle": [2, {
"arrays": "never",
"objects": "always",
"imports": "never",
"exports": "never",
"functions": "ignore"
}]
},
"globals": {
"localStorage": true
},
"env": {
"browser": true,
"node": true
}
}
怎么了?