Eslint checks jsx syntax rules

1, IDE reported an error as follows

2, eslint is configured as follows

{
  "env": {
    "es6": true,
    "node":true,
    "browser": true
  },
  "parserOptions": {
    "ecmaVersion": 6,
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true,
      "experimentalObjectRestSpread": true
    }
  },
  "extends": [
    "plugin:react/recommended"
  ],
  ...
  "indent": [2, 2, {
      "SwitchCase": 1,
      "ObjectExpression": 1
    }],
}

3. How can I configure it so that when eslint checks, it is aligned according to the attributes of the element tags (as shown in the figure by 19 squares) and does not report an error.

Mar.16,2021

simply configure indent as 0 , so you don't check it.
indent: 0 .


is not misaligned, but is preceded by spaces

.
Menu