Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-mdx

Package Overview
Dependencies
Maintainers
4
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

  • 3.1.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
246K
decreased by-15.11%
Maintainers
4
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 14 Jan 2024

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