Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Find Unused Imports in MarkdownNew to Visual Studio Code? Get it now.
Find Unused Imports in Markdown

Find Unused Imports in Markdown

LWilhelmer

|
232 installs
| (1) | Free
Finds unused import statements in Markdown files and marks them as errors.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Find Unused Imports in Markdown

This VS Code extension finds unused import statements in Markdown files and marks them as errors.

It's specifically designed to match the syntax of Docusaurus import statements.

This means that all import statements without a matching XML tag on the page will be marked as errors.

Example

When viewing the following Markdown sample in VS Code, the MyComponentSource import statement is marked as an error because it's never used.

import PartialExample from './_markdown-partial-example.mdx';
import MyComponentSource from '!!raw-loader!./myComponent';
import CodeBlock from '@theme/CodeBlock';

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

<CodeBlock language="jsx">{MyComponentSource}</CodeBlock>

Stet clita kasd gubergren, no sea takimata sanctus est <PartialExample name="Sebastien" /> dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. 

VS Code Screenshot

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft