facebook / create-react-app

Set up a modern web app by running one command.
https://create-react-app.dev
MIT License
102.61k stars 26.79k forks source link

When npm start, show "Plugin "react" was conflicted between "package.json » eslint-config-react-app..."bug #11940

Open BrickerZou opened 2 years ago

BrickerZou commented 2 years ago
Plugin "react" was conflicted between "package.json » eslint-config-react-app » D:\d\react\test_react\node_modules\eslint-config-react-app\base.js" and "BaseConfig » D:\d\react\test_react\node_modules\eslint-config-react-app\base.js".
igortas commented 2 years ago

@7889zcm try to update setupTests.ts with this import statement: import @types/jest

BrickerZou commented 2 years ago

Thanks, but I'm not sure. What exactly do in setupTest.ts?Just import @types/jest ?

igortas commented 2 years ago

Thanks, but I'm not sure. What exactly do in setupTest.ts?Just import @types/jest ?

U are right, I'm in middle of setting up monorepo w/ lerna and things are not going well., so I was figuring things out Actually u don't need that import, but, u need to set skip eslint flag: DISABLE_ESLINT_PLUGIN=true in your start script.

Do this, in case u have custom .eslintrc file. Also I've remove CRA eslint config inside package.json.

BrickerZou commented 2 years ago

oh yes thanks

magicdima commented 1 year ago

delete eslint config .eslintrc.{js,yml,json} file in your project, CRA provides eslint configuration and your custom config in conflict with the base one. If you want to override the base CRA esling config refer to this section of docs https://create-react-app.dev/docs/setting-up-your-editor/#extending-or-replacing-the-default-eslint-config

Selvakumar-123 commented 1 year ago

data not shown in list