New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-mdx

Package Overview
Dependencies
Maintainers
0
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-mdx

ESLint Plugin for MDX

3.2.0
latest
Source
npm
Version published
Maintainers
0
Created

What is eslint-plugin-mdx?

eslint-plugin-mdx is an ESLint plugin that provides linting and formatting capabilities for MDX (Markdown with JSX) files. It helps ensure code quality and consistency in MDX files by applying ESLint rules.

What are eslint-plugin-mdx's main functionalities?

Linting MDX Files

This configuration enables linting for MDX files by extending the recommended settings provided by eslint-plugin-mdx.

module.exports = {
  "extends": [
    "plugin:mdx/recommended"
  ],
  "overrides": [
    {
      "files": ["*.mdx"],
      "extends": ["plugin:mdx/recommended"]
    }
  ]
};

Custom MDX Rules

This configuration demonstrates how to apply custom rules specifically for MDX files. In this example, the rule 'mdx/no-jsx-html-comments' is set to 'error'.

module.exports = {
  "overrides": [
    {
      "files": ["*.mdx"],
      "extends": ["plugin:mdx/recommended"],
      "rules": {
        "mdx/no-jsx-html-comments": "error"
      }
    }
  ]
};

Integrating with Prettier

This configuration shows how to integrate eslint-plugin-mdx with Prettier for consistent code formatting in MDX files.

module.exports = {
  "extends": [
    "plugin:mdx/recommended",
    "prettier"
  ],
  "overrides": [
    {
      "files": ["*.mdx"],
      "extends": ["plugin:mdx/recommended", "prettier/mdx"]
    }
  ]
};

Other packages similar to eslint-plugin-mdx

Keywords

eslint

FAQs

Package last updated on 08 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts