HamSter007
@HamSter007
HTML/CSS верстальщик

Ошибка Plugin «react» was conflicted between «.eslintrc.json» and "BaseConfig?

Как решить такую ошибку:

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"}
        ]
    }
}


Доп.:
win10
nodejs 16.0
react 17.0


Переустановка npm i и удаление package-lock.json не помогает. Установка более старой версии node (12 или 14) не помогает. Установка более старых версий пакетов:

"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"
  }


тоже не помогает (
  • Вопрос задан
  • 2725 просмотров
Решения вопроса 1
Seasle
@Seasle Куратор тега React
Просто уберите eslint из зависимостей, он идёт вместе с CRA.
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы