After switching to the Bun JS Runtime, the distinction between ES Modules and CommonJS became irrelevant as Bun seamlessly handles both. However, VSCode seems to not be on the same page, throwing errors whenever actions that would work in Bun but not in Node.JS are performed. This leads to frustrating error messages like:
https://i.sstatic.net/mPaDc.png
and
https://i.sstatic.net/6SAI9.png
Although I could use @ts-ignore to suppress these errors, it's not a sustainable solution. I'm looking for ways to configure my TSConfig file or adjust my VSCode settings to eliminate these ESM vs CommonJS errors.
Edit: Interestingly, changing the package.json to
"type": "module"
ends up causing more errors than it resolves.