[bug] Inaccessible methods from default exports in CJS
The ESLint is still in CJS so I decided to write plugin in TS and bundle it to CJS using esbuild
. It didn't work outright! I had to resort to manually tweaking the esbuild
produced files, specifically to replace module.exports
line so that ESLint could access the methods from a default export:
Minimal repro
Here's a minimal repo git: https://github.com/revelt/esbuild-bug — just follow the instructions.
I got a real ESLint plugin on npm and it's been built from TS and ESM imports to CJS using esbuild
and was patched this way.
Thank you.