From 819736ade0245612f793730ebd50f7e680e937d3 Mon Sep 17 00:00:00 2001 From: David Sanders Date: Sun, 3 Nov 2024 00:38:20 -0700 Subject: [PATCH] refactor: use dynamic import, not require --- src/extension.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 6c716e8..ac44926 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -324,9 +324,8 @@ export async function activate(context: vscode.ExtensionContext) { setupDocsLinting(context); // Render emojis in Markdown - result.extendMarkdownIt = (md: MarkdownIt) => - // eslint-disable-next-line @typescript-eslint/no-require-imports - md.use(require("markdown-it-emoji")); + const { default: emojiMarkdownIt } = await import("markdown-it-emoji"); + result.extendMarkdownIt = (md: MarkdownIt) => md.use(emojiMarkdownIt); } }