Describe the bug
– Autocomplete wrongly suggests to import from react/cjs/react.development,
or from react/cjs/react.production.min instead of from react.
– For more details, see Bad autocomplete in eslint-config-react-app: react/cjs/react.development.
Did you try recovering your dependencies?
– Yes. Running npm --version results in :
Which terms did you search for in User Guide?
None is relevant.
Environment
C:\xBkps\stackexchange-x\stackoverflow-x\linting-x\eslint-x\Q71819622>npx create-react-app --info
Environment Info:
current version of create-react-app: 5.0.0
running from C:\Users\henke-hp15bw056no\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-react-app
System:
OS: Windows 10 10.0.17134
CPU: (2) x64 AMD A6-9220 RADEON R4, 5 COMPUTE CORES 2C+3G
Binaries:
Node: 16.13.2 - C:\programs\nodejs\node.EXE
Yarn: 1.22.15 - C:\programs\nodejs\yarn.CMD
npm: 8.6.0 - C:\programs\nodejs\npm.CMD
Browsers:
Chrome: 100.0.4896.75
Edge: Spartan (42.17134.1098.0)
Internet Explorer: 11.0.17134.1
npmPackages:
react: ^18.0.0 => 18.0.0
react-dom: ^18.0.0 => 18.0.0
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
– For instructions to reproduce, see
Bad autocomplete in eslint-config-react-app: react/cjs/react.development.
Expected behavior
– Autocomplete should suggest to import from react.
Actual behavior
– Autocomplete instead suggests to import from react/cjs/react.development,
or from react/cjs/react.production.min.
See relevant screenshots at
Bad autocomplete in eslint-config-react-app: react/cjs/react.development.
Reproducible demo
I haven't pushed the project to GitHub, but all the files needed for the project are in a zip file
available for download.
My suggested remedy
– Add @types/react as a dependency of eslint-config-react-app.
Describe the bug
– Autocomplete wrongly suggests to import from
react/cjs/react.development,or from
react/cjs/react.production.mininstead of fromreact.– For more details, see Bad autocomplete in eslint-config-react-app: react/cjs/react.development.
Did you try recovering your dependencies?
– Yes. Running
npm --versionresults in :Which terms did you search for in User Guide?
None is relevant.
Environment
Steps to reproduce
– For instructions to reproduce, see
Bad autocomplete in eslint-config-react-app: react/cjs/react.development.
Expected behavior
– Autocomplete should suggest to import from
react.Actual behavior
– Autocomplete instead suggests to import from
react/cjs/react.development,or from
react/cjs/react.production.min.See relevant screenshots at
Bad autocomplete in eslint-config-react-app: react/cjs/react.development.
Reproducible demo
I haven't pushed the project to GitHub, but all the files needed for the project are in a zip file
available for download.
My suggested remedy
– Add
@types/reactas a dependency ofeslint-config-react-app.