eslint-mdx
eslint-mdx copied to clipboard
feat: use `worker.mts` for pure ESM
trafficstars
Initial checklist
- [X] I read the support docs
- [X] I read the contributing guide
- [X] I agree to follow the code of conduct
- [X] I searched issues and couldn’t find anything (or linked relevant results below)
Problem
A lot of await import in https://github.com/mdx-js/eslint-mdx/blob/3bdd2eb88244aeda636c11f3ccaff35ae2c05ac2/packages/eslint-mdx/src/worker.ts and the hack loadEsmModule
https://github.com/mdx-js/eslint-mdx/blob/3bdd2eb88244aeda636c11f3ccaff35ae2c05ac2/packages/eslint-mdx/src/helpers.ts#L60-L64
is unnecessary.
Solution
Just change worker.ts to pure ESM worker.mts which is just supported by synckit natively.
Alternatives
N/A