Reactjs 我对react vscode中的额外空格错误有问题

Reactjs 我对react vscode中的额外空格错误有问题,reactjs,react-native,visual-studio-code,eslint,Reactjs,React Native,Visual Studio Code,Eslint,hy,我在vscode中使用reactjs和react本机页面时遇到问题。 示例=“预期缩进10个空格,但找到20个”。 我安装了eslint和更漂亮的,但它没有 这是我的。eslintrc: { "env": { "browser": true, "es2020": true, "node": true }, "extends&quo

hy,我在vscode中使用reactjs和react本机页面时遇到问题。 示例=“预期缩进10个空格,但找到20个”。 我安装了eslint和更漂亮的,但它没有 这是我的。eslintrc:

{
    "env": {
        "browser": true,
        "es2020": true,
        "node": true
    },
    "extends": [
        "plugin:react/recommended",
        "airbnb"
    ],
    "parser": "babel-eslint",
    "parserOptions": {
        "ecmaFeatures": {
            "jsx": true
        },
        "ecmaVersion": 11,
        "sourceType": "module"
    },
    "plugins": [
        "react",
        "@typescript-eslint"
    ],
    "rules": {
        "indent": [2, "tab", { "SwitchCase": 1, "VariableDeclarator": 1 }],
        "no-tabs": 0,
        "react/prop-types": 0,
        "react/jsx-indent": [2, "tab"],
        "react/jsx-indent-props": [2, "tab"],
    }
}

但是我认为我的setting.json中有一个问题

如何修复它?

转到“文件”>“首选项”>“设置”,然后搜索“缩进”。 搜索“制表符大小”并将其设为4。 搜索“自动缩进”并选择“完全”


我希望这对您有用。

制表符大小为4,自动缩进已满,我没有更改。什么是“editor.defaultFormatter”:???