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

dsh-markdown-lint

v0.2.0

Published

Markdown linter for DeepSeek Harness: heading hierarchy, list indentation, and relative-link existence checks, with auto-fix for repairable issues.

Readme

dsh-markdown-lint

Markdown 检查插件(v0.1.0):三类规则检查 + 可修复项自动修复。代码块内容全程跳过(围栏内 #、链接都不误报)。

安装

npm install dsh-markdown-lint

工具

lint_markdown

| 参数 | 类型 | 说明 | |------|------|------| | text / file | string | 源内容二选一(file 须在工作目录内) |

三类规则:

| 规则 | 内容 | 可自动修复 | |------|------|-----------| | heading-hierarchy | 标题跳级(H1→H3);多个 H1(文件级) | 跳级可,多 H1 不可 | | list-indent | 列表缩进用 Tab;嵌套步长不一致(≥2 次出现的宽度中取最小为标准) | 可 | | link-exists | 相对链接(./x.md、../a.md、sub/x.md)目标文件不存在;file 模式以文件所在目录解析,text 模式以 cwd 解析 | 不可 |

http(s)/mailto/锚点链接不做联网检查。输出每条问题带行号、规则名与可修复标注。

fix_markdown

| 参数 | 类型 | 说明 | |------|------|------| | text / file | string | 源内容二选一 | | write | boolean | file 模式下 true 直接覆盖写回文件(默认 false 仅预览) |

自动修复内容:跳级标题降级补齐、Tab 缩进转 4 空格、嵌套步长统一。修复后残余的不可修复问题(多 H1、死链)会提示用 lint_markdown 查看。

安全与限制

  • 文件路径必须在工作目录内;输入上限 1MB
  • write=true 直接覆盖文件,建议先预览(默认行为)
  • 相对链接检查只验证存在性,不验证指向内容正确性
  • 零 npm 依赖

测试

npm test

覆盖三类规则的命中与不误报、代码块跳过、file/text 两种解析基准、修复写回、路径越界拒绝等 28 项断言。

版本历史

0.2.0(2026-09-13)

  • lint_markdown 新增 check_http_links 参数:http(s) 链接联网检查可用性(HEAD 优先、405 回退 GET、超时 5 秒、单次最多 20 个)

Roadmap(v0.3 候选)

  • 多 H1 自动降级为 H2(可配置)
  • 表格格式检查(列数不一致/缺分隔行)
  • 自定义规则集(按需启停规则)