-
-
Notifications
You must be signed in to change notification settings - Fork 2k
test: Switch tests to use .jsx
file extension
#4925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
"noEmit": true, | ||
"skipLibCheck": false | ||
"skipLibCheck": false, | ||
"types": ["vitest/globals"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this not an issue for everyone else btw? In every single file (beyond our TS tests, which also set this in their tsconfig.json
files) I get hundreds of Cannot fine name 'describe'/'expect'. Do you need to install type definitions...
I'd almost have to assume folks are using other editor setups than me as it makes mine light up like a christmas tree without this
0be08da
to
e16aca4
Compare
e79586c
to
40323e6
Compare
jsxImportSource: 'preact', | ||
jsxDev: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe these settings did nothing and were actively incorrect as ESBuild seems to prefer our settings in the jsconfig.json
instead, which uses the classic transform? Hence why we have the default React
imports in compat & the /** @jsx createElement */
comments everywhere else?
Switched it over to use the classic transform options, i.e., jsxFactory
& jsxFragment
though, as mentioned, it seems entirely redundant as these are overridden.
Seems to be the way the ecosystem has moved over the last 4-5 years, therefore it's likely that the only thing holding us back from doing this was the rather boring work of renaming all these files? Lmk though, not sure if anyone else has opinions here.