Repo: Use mdast-util-from-markdown in Docusaurus plugins #5393
Labels
blocked by external API
Blocked by a tool we depend on exposing an API, such as TypeScript's Type Relationship API
package: website
Issues related to the @typescript-eslint website
repo maintenance
things to do with maintenance of the repo, and not with code/docs
Suggestion
Right now our
generated-rule-docs.ts
file manually inserts POJO objects for the MDAST. It'd be great if we could use a package like https://github.com/syntax-tree/mdast-util-from-markdown to clean up that code.However, that package is written in ESM, which Docusaurus doesn't support yet. Adding this inside a plugin:
...gives a loading failure:
Switching to an async import:
Delays the failure until each rule docs page's generation:
cc @Josh-Cena, our resident Docusaurus expert! 😄
The text was updated successfully, but these errors were encountered: