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

@mastra/lint-docs

v1.1.1

Published

A collection of linting tools for Mastra's documentation sites

Readme

@mastra/lint-docs

A collection of linting tools for Mastra's documentation sites. This package contains:

  • /check-duplicate-redirects: A checker for duplicate or invalid redirect sources
  • /check-frontmatter: A checker for required MDX frontmatter fields
  • /oxfmt-mdx: An Oxfmt-powered formatter for MDX JSX expressions and fenced code blocks
  • /prettier-mdx: A Prettier plugin to correctly format code blocks in MDX files
  • /remark-preset: A preset of remark plugins to lint MDX files for common issues and style consistency

Installation

npm install @mastra/lint-docs

Usage

Check duplicate redirects

Use the CLI with a redirects JSON file. The file can be either a plain redirects array or an object with a redirects array.

check-duplicate-redirects ./redirects.json

You can also use the subpath programmatically:

import { checkDuplicateRedirects } from '@mastra/lint-docs/check-duplicate-redirects'

const result = await checkDuplicateRedirects('./redirects.json')

if (!result.ok) {
	console.error(result.messages.join('\n'))
}

Check frontmatter

Use the CLI with a docs directory. It recursively checks *.mdx files for required frontmatter fields and validates package names.

check-frontmatter ./src/content

Skip paths with repeatable --skip flags. Paths are relative to the docs directory and can target exact files or directory prefixes.

check-frontmatter ./src/content --skip kitchen-sink/ --skip reference/index.mdx

You can also use the subpath programmatically:

import { checkFrontmatter } from '@mastra/lint-docs/check-frontmatter'

const result = await checkFrontmatter('./src/content', {
	skipPaths: ['kitchen-sink/', 'reference/index.mdx'],
})

if (!result.ok) {
	console.error(result.messages.join('\n'))
}

Oxfmt MDX

Oxfmt does not expose a custom MDX plugin API, so this package provides an oxfmt-mdx CLI that applies the repository's Oxfmt options to JSX expressions and fenced code blocks before serializing the MDX.

oxfmt-mdx --write ./src/content
oxfmt-mdx --check ./src/content

The CLI searches parent directories for .oxfmtrc.json. You can also use the formatter programmatically:

import { formatMdx } from '@mastra/lint-docs/oxfmt-mdx'

const formatted = await formatMdx(source, {
	semi: false,
	singleQuote: true,
})

Set formatCodeBlocks: false to disable fenced code-block formatting, or add oxfmt: false to an individual code fence's metadata.

Prettier MDX

The original Prettier plugin remains available for projects that still use Prettier:

{
	"plugins": ["@mastra/lint-docs/prettier-mdx"],
	"overrides": [
		{
			"files": ["*.mdx"],
			"options": {
				"parser": "mdx-custom"
			}
		}
	]
}

remark preset

import remarkPresetMastra from '@mastra/lint-docs/remark-preset'

const config = {
	plugins: [remarkPresetMastra],
}

export default config