Follows up on #9853 and removes remaining React imports, as React 17 is supported and #9734 has been merged.
Activity
requested review from @root
requested review from @root
requested review from @root
requested review from @root
added CLA Signed label
A smoke test has the ESLint error
'React' is not defined react/jsx-no-undef
insrc/index.tsx
. It seems like this is only an issue with TypeScript. Should we disablereact/jsx-no-undef
with TS like we already do withno-undef
?Created by: yannickcr
@MichaelDeBoey For
eslint-plugsin-react
and React 17 you only have to disable thereact/jsx-uses-react
andreact/react-in-jsx-scope
rules: https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html#eslintFor this case I'd say the React import should not be removed from here http://metis.lti.cs.cmu.edu:8023/facebook/create-react-app/-/merge_requests/9907/files#diff-64c681ba8886069f7e1af46ff0db7eb161244eb14a4a7c780d83eaae6c126cbf since it is still used for
React.StrictMode
Created by: n3tr
The current version of TypeScript (4.0.x) doesn't support the new JSX transform (introducing in 4.1).
Removing
import React
from thetypescript
template might break the app unless the user installstypescript@4.1.0-beta
.There is code checking the ts version and switch to use new jsx configuration
@MichaelDeBoey @yannickcr Is it safe to remove those rules from
eslint-config-react-app
? It could cause confusion for any external users that still aren't using the new JSX transform, but CRA 4 users should be fine either way.@n3tr There is an issue with TS 4.1 beta support in CRA 4 (#9868 (closed)) that makes upgrading tricky anyway, and by the time that fix is published TS 4.1 may already be stable.
TypeScript 4.1 is stable and #9868 (closed) has been closed, so this should be ready to merge once the review suggestions are resolved.
added stale label
removed stale label
mentioned in merge request !10774 (closed)
mentioned in merge request !10299 (closed)
added stale label