npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mdxlint

v1.0.0

Published

A unified-engine base CLI for MDX

Downloads

28,648

Readme

mdxlint

github actions codecov npm version npm downloads

A CLI to lint and format MDX content.

Table of Contents

Installation

npm install mdxlint

Usage

Check all .mdx files for lint violations:

mdxlint . --frail

Transform and format all .mdx files:

mdxlint . --output

For more options, see:

mdxlint --help

Configuration file

The mdxlint CLI loads one the following configuration files:

  • The mdxlint key in package.json
  • .mdxlintrc
  • .mdxlintrc.json
  • .mdxlintrc.js
  • .mdxlintrc.cjs
  • .mdxlintrc.mjs
  • .mdxlintrc.yml
  • .mdxlintrc.yaml

Ignore patterns can be specified in .mdxlintignore.

Plugins

The plugins property specifies which plugins or presets to load. All remark plugins and remark-lint rules are supported.

Settings

The settings property specifies how content is formatted. It accepts the same fields as the options from remark-stringify.

API

defineConfig(config)

A type-safe way to define a mdxlint configuration.

Arguments

  • config (Config) — The configuration.

Returns

The configuration.

mdxlint

A unified processor which can process MDX content.

Examples

Syntax extensions

The following .mdxlintrc.json file adds support for GFM and frontmatter with TOML and YAML syntax.

{
  "plugins": ["remark-gfm", ["remark-frontmatter", ["toml", "yaml"]]]
}

Linting

The following .mdxlintrc.js file reports errors if link definitions or JSX attributes are not sorted.

import { defineConfig } from 'mdxlint'

export default defineConfig({
  plugins: ['remark-lint-definition-sort', 'remark-lint-mdx-jsx-attribute-sort']
})

Spell checking

The following .mdxlintrc.mjs file does spell checking based on retext plugins.

/**
 * @import { Config } from 'mdxlint'
 */

import dictionary from 'dictionary-en'
import remarkRetext from 'remark-retext'
import retextEnglish from 'retext-english'
import retextSpell from 'retext-spell'
import retextSyntaxURLs from 'retext-syntax-urls'
import { unified } from 'unified'

/** @type {Config} */
export default {
  plugins: [
    [
      remarkRetext,
      unified().use(retextEnglish).use(retextSyntaxURLs).use(retextSpell, { dictionary })
    ]
  ]
}

Consistent formatting

The following .mdxlintrc.yaml file ensures the file is always formatted, where a hyphen (-) is used for bullet lists. It also makes sure the table of contents is always up-to-date.

settings:
  bullet: '-'
plugins:
  - remark-toc
  - unified-consistency

Prettier

Unfortunately Prettier doesn’t support MDX 3. If you use Prettier, add the following to your .prettierignore:

*.mdx

Compatibility

This project is compatible with Node.js 20 or greater.

Related projects

Sponsoring

If you like this project, consider sponsoring me via GitHub Sponsors.

License

MIT © Remco Haszing