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

check-lint

v0.1.7

Published

前端规约配套的扫描工具包

Readme

check-lint 是《前端规约》的配套工具,可以为工程一键接入规约、一键扫描和修复规约问题,保障工程的编码规范和代码质量。

背景

为了《前端规约》的落地,我们引入多个开源工具和规则包来实现不同的规约,包括:

| 规约 | 工具 | 规则包 | | -------- | -------- | -------- | 《JavaScript 编码规约》 《TypeScript 编码规约》 《React 编码规约》 《Vue 编码规约》 | ESLint | eslint-config-sendinfo |

可以看到这些工具和规则包比较零散,工程的接入和后续升级都需要一定成本。

check-lint 屏蔽收敛了这些依赖和配置细节,提供简单的 CLI 和 Node.js API,让工程能够一键接入、一键扫描、一键修复、一键升级,并为工程配置 git commit 卡点,降低工程实施规约的成本。

CLI 使用

安装

在终端执行:

npm install check-lint -g

安装完成后,可执行 check-lint -h 以验证安装成功

功能

check-lint init:一键接入

在工程根目录执行 check-lint init,即可将工程一键接入规约体系,为工程安装开发阶段进行规约问题检查所需的依赖和配置,具体会做以下事情:

  • 安装各种依赖
  • 写入各种配置文件(到工程根目录):包括 .eslintrc.js、.eslintignore、.prettierrc.js、.editorconfig 等;此外还会写入一个 check-lint.config.js 文件,包含 check-lint 工具的一些配置,如启用的功能、黑名单等
  • 配置 git commit 卡点:使用 husky + lint-staged 设置代码提交卡点,在 git commit 时会运行 check-lint scan,若有规约问题则阻止提交