Is this a bug report?
yes
Steps to Reproduce
- create app
npx create-react-app app
- replace content of
src/App.js
with
import React from 'react';
const App = (
<>App</>
);
export default App;
- run
npx eslint ./src
insideapp
Expected Behavior
no errors, no warnings
Actual Behavior
There is a warning:
.../src/App.js
1:8 warning 'React' is defined but never used no-unused-vars
✖ 1 problem (0 errors, 1 warning)
If I remove react import from src/App.js
, then it shows an error:
.../src/App.js
2:3 error 'React' must be in scope when using JSX react/react-in-jsx-scope
✖ 1 problem (1 error, 0 warnings)