eslint-mdx icon indicating copy to clipboard operation
eslint-mdx copied to clipboard

feat: use `worker.mts` for pure ESM

Open JounQin opened this issue 1 year ago • 0 comments
trafficstars

Initial checklist

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

JounQin avatar Dec 22 '23 14:12 JounQin