Skip to content

Commit

Permalink
refactor: use dynamic import, not require
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 committed Nov 3, 2024
1 parent 5fa1389 commit 819736a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 819736a

Please sign in to comment.