test: Switch tests to use .jsx file extension#4925
Conversation
| "noEmit": true, | ||
| "skipLibCheck": false | ||
| "skipLibCheck": false, | ||
| "types": ["vitest/globals"] |
There was a problem hiding this comment.
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.
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.