Created by: iansu
Closes #9553 (closed)
Activity
requested review from @root
requested review from @root
requested review from @root
added CLA Signed label
added tag: enhancement label
changed milestone to %4.0
mentioned in issue #9682
Created by: radiosilence
Despite using react scripts
next.98
, react 17, typescript 4.1, havingEXTEND_ESLINT=1
in my.env
, and this in my .eslintrc:"react/jsx-uses-react": 0, "react/react-in-jsx-scope": 0,
I am still getting:
Line 5:5: 'React' must be in scope when using JSX react/react-in-jsx-scope
Am I missing something?
Edit: I had to upgrade
@typescript-eslint/parser
to 4.2! Leaving this up for anyone else who had a problemEdit 2: Wait no, still seems flakey.
Edit 3:
EXTEND_ESLINT=true
needed to betrue
not1
. ♀️Edit 4: Oh wait, no, it's broken again.
Created by: mrmckeb
This should be fixed properly with http://metis.lti.cs.cmu.edu:8023/facebook/create-react-app/-/merge_requests/9683 @radiosilence :) Sorry for the inconvenience.
@iansu also found a Jest issue that we're investigating, but we aim to ship v4 with this fully working.
Created by: pluma
@mrmckeb nope, just a
tsconfig.json
. I had problems getting custom ESLint configs to work with CRA before, so I don't use one. Also everything works fine in4.0.0-next.77
and the current3.x
release.AFAICT it doesn't complain about all TS syntax (e.g. it didn't complain about a
type
definition earlier in the same file) but it did complain about theas
keyword and!
suffix, both of which are perfectly valid parts of TS syntax.Created by: alexeyraspopov
Does Jest use a different config for Babel? I was able to update my project to react-scripts@4.0.0-next.98 and react@17.0.0-rc.2. The app works fine, even though I needed to override
react/react-in-jsx-scope
, but tests failing because ofReferenceError: React is not defined
. Shall open a separate issue?Created by: mrmckeb
@alexeyraspopov we're aware if those issue when using the new transform, and you're right - that is the cause. We just need to fix it
@iansu from what I can see, the issue is that we tell the Babel config what to do from the Webpack config - which is never used in tests. The fix may be to just move all of the logic to the preset. I can make that change if there are no concerns or objections?
mentioned in issue #9772 (closed)
Created by: gaearon
http://metis.lti.cs.cmu.edu:8023/facebook/create-react-app/-/issues/9772
mentioned in merge request !9788 (merged)
Created by: hoo88
What the fuck is this
On Fri, Oct 2, 2020, 4:31 AM Brody McKee notifications@github.com wrote:
@alexeyraspopov https://github.com/alexeyraspopov we're aware if those issue when using the new transform, and you're right - that is the cause. We just need to fix it
@iansu https://github.com/iansu from what I can see, the issue is that we tell the Babel config what to do from the Webpack config - which is never used in tests. The fix may be to just move all of the logic to the preset. I can make that change if there are no concerns or objections?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub http://metis.lti.cs.cmu.edu:8023/facebook/create-react-app/-/merge_requests/9645#issuecomment-702598801, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARGDFCHA7KPYSWRYS3S4QVTSIWFX5ANCNFSM4RMQEWYA .
Created by: max-programming
I noticed a problem. When I updated
react-scripts
to4.0.0-next.98
, it gave me an error about serviceWorker that it can't find the file. You can see the error on this address. https://5f8fb5ed83ef4c0008113607--maxtodos.netlify.app/Then I switched back to 3.4.x, and imported React everywhere, but then it gave the warnings about not using React. Could you please do something regarding this?
mentioned in merge request !12378 (closed)