Socket
Socket
Sign inDemoInstall

eslint-plugin-mdx

Package Overview
Dependencies
Maintainers
1
Versions
90
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


Version published
Weekly downloads
271K
decreased by-0.76%
Maintainers
1
Weekly downloads
 
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

FAQs

Package last updated on 21 Sep 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc