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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@shined/doctor

v0.1.3

Published

[![npm version](https://badge.fury.io/js/@shined/doctor.svg)](https://badge.fury.io/js/@shined/doctor) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Readme

Doctor Engine

npm version License: MIT

基于 Rust 和 Node.js 构建的高性能代码质量检查工具。

English | 简体中文

特性

  • 🚀 高性能:使用 Rust 构建,确保最大速度和效率
  • 🔍 全面分析:支持多种编程语言和框架
  • 并行处理:利用多线程进行更快的代码扫描

安装

npm install @shined/doctor
# 或者
yarn add @shined/doctor
# 或者
pnpm add @shined/doctor

快速开始

import { Standards } from "@shined/doctor";

// 初始化 Standards 检查器
const standards = Standards.create(process.cwd());

// 运行所有验证
const results = await standards.validateAll();

配置

在项目根目录创建 .sfconfig/spec.json 文件:

{
  "globals": {
    "yourGlobalVar": "writable"
  },
  "ignore": ["**/node_modules/**", "**/dist/**", "**/build/**", "**/target/**"]
}

工具还会检查以下配置文件:

  • .npmrc - NPM 注册表配置
  • .node-version - Node.js 版本规范
  • package.json - 包配置

命令行使用

# 全局安装
npm install -g @shined/doctor

# 在当前目录运行分析
npx @shined/doctor

# 显示详细输出
npx @shined/doctor --verbose

# 指定工作目录
npx @shined/doctor --cwd /path/to/project

# 显示帮助信息
npx @shined/doctor --help

命令将会:

  • 检查项目健康状况
  • 显示发现的错误数量
  • 显示执行时间
  • 如果发现错误则以代码 1 退出

API 参考

Standards 类

代码质量验证的主类。

静态方法

  • create(cwd: string): Standards - 创建新的 Standards 实例

实例方法

  • validateNpmrc(): Promise<Array<Messages>> - 验证 npmrc 配置
  • validateNodeVersion(): Promise<Array<Messages>> - 验证 Node.js 版本
  • validatePackageJson(): Promise<Array<Messages>> - 验证 package.json
  • validateLint(): Promise<Array<Messages>> - 运行代码检查验证
  • validateAll(): Promise<Array<Messages>> - 运行所有验证

工具函数

代码统计

function cloc(paths: string[], opts?: { ignore?: string[] }): LanguageStats[];

调试函数

function initializeLogger(level?: LogLevel): void;
function unSafeInnerLint(
  globArgs: GlobArgs,
  category: NaPiCategory
): Promise<Diagnostic[]>;

贡献

欢迎贡献!请查看我们的贡献指南了解详情。

许可证

MIT © [Your Name]

支持

  • 文档:[链接到文档]
  • 问题:[GitHub Issues]
  • Discord:[Discord 频道]

致谢

基于以下技术构建: