H
H
HamSter2022-01-30 15:01:22
npm
HamSter, 2022-01-30 15:01:22

Error Plugin "react" was conflicted between ".eslintrc.json" and "BaseConfig?

How to solve this error:

ERROR

Plugin "react" was conflicted between ".eslintrc.json" and "BaseConfig » ....\node_modules\eslint-config-react-app\base.js".


package.json:

"devDependencies": {
    "eslint": "^8.8.0",
    "eslint-config-react-app": "^7.0.0",
    "eslint-config-standard": "^16.0.3",
    "eslint-plugin-flowtype": "^8.0.3",
    "eslint-plugin-import": "^2.25.4",
    "eslint-plugin-jsx-a11y": "^6.5.1",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^6.0.0",
    "eslint-plugin-react": "^7.28.0",
    "eslint-plugin-react-hooks": "^4.3.0"
  }


.eslintrc.json:
{
    "env": {
        "browser": true,
        "es2021": true
    },
    "extends": [
        "eslint:recommended",
        "plugin:react/recommended",
        "react-app"
    ],
    "parserOptions": {
        "ecmaFeatures": {
            "jsx": true
        },
        "ecmaVersion": "latest",
        "sourceType": "module"
    },
    "plugins": [
        "react"
    ],
    "rules": {
        "semi": [
          "error",
          "always"
        ],
        "quotes": [
          "error",
          "double"
        ],
        "react/react-in-jsx-scope": "off",
        "react/prop-types": "off",
        "react/jsx-filename-extension": [
          1,
          {
            "extensions": [
              ".js",
              ".jsx"
            ]
          }
        ],
        "no-tabs": [
          "error",
          {
            "allowIndentationTabs": true
          }
        ],
        "indent": "off",
        "space-before-function-paren": [
          "off",
          "always"
        ],
        "comma-dangle": [
          "error",
          "never"
        ],
        "multiline-ternary": [
          "off",
          "always"
        ]
    },
    "settings": {
        "react": {
          "createClass": "createReactClass",
          "pragma": "React",
          "fragment": "Fragment",
          "version": "detect",
          "flowVersion": "0.53"
        },
        "propWrapperFunctions": [
            "forbidExtraProps",
            {"property": "freeze", "object": "Object"},
            {"property": "myFavoriteWrapper"},
            {"property": "forbidExtraProps", "exact": true}
        ],
        "componentWrapperFunctions": [
            "observer",
            {"property": "styled"},
            {"property": "observer", "object": "Mobx"},
            {"property": "observer", "object": "<pragma>"}
        ],
        "formComponents": [
          "CustomForm",
          {"name": "Form", "formAttribute": "endpoint"}
        ],
        "linkComponents": [
          "Hyperlink",
          {"name": "Link", "linkAttribute": "to"}
        ]
    }
}


Add.:
win10
nodejs 16.0
react 17.0


Reinstalling npm iand deleting package-lock.json does not help. Installing an older version of node (12 or 14) doesn't help. Installing older packages:

"devDependencies": {
    "babel-eslint": "^10.1.0",
    "eslint": "^7.31.0",
    "eslint-config-react-app": "^6.0.0",
    "eslint-config-standard": "^16.0.3",
    "eslint-plugin-flowtype": "^5.8.0",
    "eslint-plugin-import": "^2.23.4",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^5.1.0",
    "eslint-plugin-react": "^7.24.0",
    "eslint-plugin-react-hooks": "^4.2.0"
  }


does n't help either

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2022-01-30
@HamSter007

Just remove it eslintfrom dependencies, it comes with CRA.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question