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

@tker/check

v1.0.1

Published

项目代码质量检查工具包,提供循环依赖检测和代码格式检查功能。

Readme

@tker/check

项目代码质量检查工具包,提供循环依赖检测和代码格式检查功能。

安装

pnpm add -D @tker/check

使用方式

CLI 命令

安装后可通过 vsh 命令使用:

# 代码格式检查
vsh lint              # 检查代码格式问题
vsh lint --format     # 自动修复代码格式问题

# 循环依赖检测
vsh check-circular              # 检测整个项目的循环依赖
vsh check-circular --staged     # 只检查 Git 暂存区文件
vsh check-circular --verbose    # 显示详细信息
vsh check-circular --threshold <number>  # 设置循环依赖阈值,超过时退出码为 1
vsh check-circular --ignore-dirs <dirs>  # 忽略指定目录

作为依赖使用

import { defineCheckCircularCommand } from '@tker/check'
import { cac } from 'cac'

const cli = cac('my-cli')

// 注册循环依赖检测命令
defineCheckCircularCommand(cli)

cli.parse()

命令说明

lint

执行项目代码格式检查,支持以下工具:

  • ESLint - JavaScript/TypeScript 代码规范检查
  • Stylelint - CSS/SCSS 样式检查
  • Prettier - 代码格式化检查

| 选项 | 说明 | |------|------| | --format | 自动修复代码格式问题 |

check-circular

检测项目中的循环依赖,帮助发现潜在的代码架构问题。

| 选项 | 说明 | |------|------| | --staged | 只检查 Git 暂存区的文件 | | --verbose | 显示详细的检测信息 | | --threshold <number> | 循环依赖阈值,超过时进程退出码为 1 | | --ignore-dirs <dirs> | 忽略检测的目录,逗号分隔 |

API

defineCheckCircularCommand(cli)

注册循环依赖检测命令到 CLI 实例。

import { defineCheckCircularCommand } from '@tker/check'
import { cac } from 'cac'

const cli = cac('my-cli')
defineCheckCircularCommand(cli)

CheckCircularConfig

循环依赖检测配置类型:

interface CheckCircularConfig {
  staged?: boolean      // 是否只检查暂存区
  verbose?: boolean     // 是否显示详细信息
  threshold?: number    // 循环依赖阈值
  ignoreDirs?: string   // 忽略的目录
}

License

MIT