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

@jpeakai/mermaidjs-lint

v0.16.0

Published

Deterministic lint gates and verified fixers for Mermaid diagrams in markdown

Readme

mermaidjs-lint

| Docs | Rules | Changelog | npm |

| Package Index | Published Version | Downloads | Node | CI | Docs | License | |---|---|---|---|---|---|---| | npm | npm | npm Downloads | Node | CI | Docs | License |

I hate walls of text. I do love a good diagram though. mermaidjs is brilliant for separating the semantic structure of a diagram from the pixel pushing.

AI Agents love this separation too. And yet AI Agents kind of suck at diagrams though. So here is a linting and autofixer engine built on top of:

Lint your docs with one command

# bunx
bunx @jpeakai/mermaidjs-lint docs/
bunx @jpeakai/mermaidjs-lint --fix docs/

# npx
npx -y @jpeakai/mermaidjs-lint docs/
npx -y @jpeakai/mermaidjs-lint --fix docs/
docs/architecture.md:6 contrast-text-below-aa classDef warn: text 1.43:1 < 4.5 (#ffffff on #ffd400)
docs/login.md:3-7 parse-diagram-unparseable sequenceDiagram did not parse (parser: mermaid-core) (its line numbers count within the diagram, not the file): Parse error on line 3: Expecting 'TXT', got 'NEWLINE'
docs/pipeline.md:3-41 complexity-node-count-acceptable-exceeded 37 nodes > 35 acceptable threshold
3 finding(s) in 3 file(s)

The run exits 1 while any finding remains, so it works as a CI gate.

Fix unreadable label text and unclosed fences

Add --fix to apply the fixes that pass verification:

-  classDef warn fill:#ffd400,color:#ffffff
+  classDef warn fill:#ffd400,color:#000000

A fix is kept only if the markdown around the diagrams is unchanged and each diagram reparses with the same node ids, subgraphs and counts. Edge endpoints, edge labels and node text are not compared, so review the diff.

Four tenets

  • Always readable in light mode or dark mode. Declared fills, label colours and borders are scored as the host draws them, on nodes, erDiagram rows, edge labels and sequence diagrams, in both themes.
  • It actually renders a valid diagram. Every diagram parses with the mermaid parsers this package ships, and every mermaid fence is closed.
  • Visual Complexity stays readable. Node count and visual complexity are scored against a density preset, so an oversized diagram is flagged to be split.
  • Make your own rules. A plugin adds rules of your own, which run through the same config, fix engine and verification as the built-ins.

Go further in the docs site

Runs on Bun or Node

It needs Bun, or Node >=20. The package installs mermaid 11.17.2 to parse diagrams, and your host may draw with another version.

Contribute

CONTRIBUTING.md covers setup. Licensed under MIT.