@avi2dg/checks

中文文档
0.73.0发布于 2026/11/08MITTypeScriptES Module构建来源已验证近 30 天下载 8818

Deterministic checks shared across a set of TypeScript repositories

原始使用文档
文档目录4 节
  1. Before you begin
  2. Install
  3. Find the page you need
  4. Related topics

checks

@avi2dg/checks turns each rule a reviewer would otherwise have to remember into a program that runs on every pull request. One command, checks-lint, judges a TypeScript repository's code, tests, commits, CI wiring and docs, and each failure names the file or line to fix. Every Bun repository it holds moves to a new rule by upgrading one package, rather than by copying configs between repositories.

Before you begin

  • A git repository, whose history the range gates read.
  • Bun, at the version the kit's .bun-version pins.

Install

To hold a repository to the kit:

  1. Add the kit:

    bun add -d @avi2dg/checks
    
  2. Pin the Bun version the kit runs on:

    cp node_modules/@avi2dg/checks/.bun-version .bun-version
    
  3. Run the gates:

    bunx checks-lint
    

Each gate that fails names the file it needs, and Set up a repository writes every one. A repository the kit holds ends with checks-lint: <count> gate(s) pass.

Find the page you need

ToRead
write every file the gates ask forSet up a repository
move to a newer releaseUpgrade the kit
turn on the CSS checksTurn on the CSS families
picture one block at each screen size and approve its picturesTest the screens of one block
look up a gate or a binThe bins
look up a shared configNative settings
find a file the package shipsThe shipped files
learn why the kit is shaped this wayWhy it is shaped this way

版本与发布记录

@avi2dg/checks 共发布 91 个版本,首次发布于 2026/09/23;过去 12 个月发布了 91 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.73.0latest2026/11/08今天
0.72.02026/11/08今天
0.71.02026/11/07今天
0.70.02026/11/07今天
0.69.02026/11/07今天
0.68.22026/11/071 天前

关于 @avi2dg/checks 的常见问题

@avi2dg/checks 是什么?

Deterministic checks shared across a set of TypeScript repositories

如何安装 @avi2dg/checks?

在项目目录运行 npm install @avi2dg/checks,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:jscpd(5.3.2)、effect(4.0.0)、oxlint(1.83.0)、@swc/core(1.16.2)、typescript(7.0.2)、@effect/tsgo(0.45.0)、oxlint-tsgolint(7.0.2002)、dependency-cruiser(18.4.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 checks-copy、checks-docs、checks-lint、checks-test、checks-flake、checks-setup、checks-vendor、checks-browser、checks-pr-text、checks-secrets、checks-css-size、checks-mutation,可以用 npx checks-copy 直接运行。

@avi2dg/checks 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@avi2dg/checks 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@avi2dg/checks 可以商用吗?

@avi2dg/checks 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@avi2dg/checks 的下载量有多少?

根据 npm 官方下载统计,@avi2dg/checks 在 2026/10/07 – 2026/11/05 这 30 天内被下载 8,818 次,日均约 294 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@avi2dg/checks 还在维护吗?

最新版本 0.73.0 发布于 2026/11/08(今天);至今共发布 91 个版本,其中过去 12 个月发布了 91 个;首次发布于 2026/09/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。