Closed JounQin closed 2 years ago
This isn't intended to be part of the public API. Why are you using it?
My eslint-mdx
parser is using remark-mdx
which use acorn
as parser, so I need to transform the acron tokens into ESLint's.
TSC Summary: This issue proposes exporting the internal TokenTranslator class that we use to translate Acorn tokens into Espree tokens.
TSC Question: Do we want to export this class?
Hi @JounQin, it doesn’t make sense for us to expose this as part of Espree’s public API because the underlying Acorn parser is just an implementation detail. Since the TokenTranslator implementation doesn’t change, copying the code should be viable.
My current hack workaround is using absolute path to require the module
https://github.com/mdx-js/eslint-mdx/pull/284/files#diff-28c9951bdd4b9fbbb77321aec606c4ec820dc169ca472ad8991aa553bc4283baR220-R229