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

@142vip/commit-linter

v0.0.1-alpha.4

Published

Git Commit 信息校验工具

Readme

@142vip/commit-linter

NPM version

Git Commit 信息校验工具(Conventional Commits)。运行依赖 @142vip/utils。

安装

# npm
npm install @142vip/commit-linter

# pnpm
pnpm add @142vip/commit-linter

Monorepo 推荐 fa commit(默认交互)与 fa commit --quiet -s './apps/*' -s './packages/*'(commit-msg 钩子);亦可直引本包 commitLinter。

功能

  • commitLinter 校验 Conventional Commits 格式
  • defineVipCommitLinterConfig + cosmiconfig(commit-linter.config.*)
  • 可配置 types / scopes 与 verify 自定义校验
  • printStandardCommitMessage 打印规范模板

配置

根目录 commit-linter.config.ts(或 .commit-linterrc 等,见 cosmiconfig):

import { defineVipCommitLinterConfig } from '@142vip/commit-linter'

export default defineVipCommitLinterConfig({
  scopeGlobs: ['./packages/*'],
  scopes: ['@142vip/utils', 'README', 'CHANGELOG'],
  verify: gitCommit => !gitCommit.subject.includes('WIP'),
})

scopeGlobs 只写在配置文件里,由 fa commit 扫描为 scopes;CLI -s 优先于配置中的 scopeGlobs。

直引 loadCommitLinterConfig() 仅走 cosmiconfig,不会合并 fairy-cli 内置默认;需要内置默认时用 fa commit 或从 @142vip/fairy-cli 引入 loadCommitLinterConfigForCli。

使用

import { commitLinter, loadCommitLinterConfig } from '@142vip/commit-linter'

// 钩子或脚本:待校验首行放在 commit 字段
commitLinter({ scopes: ['@142vip/utils'], commit: 'feat(utils): 新增工具函数' })

// 合并 cosmiconfig(勿把 scopeGlobs 传给 commitLinter)
const { scopeGlobs: _scan, ...options } = loadCommitLinterConfig()
commitLinter({ ...options, commit: 'docs(README): 更新说明' })

升级

# 依赖更新
pnpm upgrade @142vip/commit-linter

参考

证书

MIT

Copyright (c) 2022-present, @142vip 储凡

仅供学习参考,商业使用请保留作者版权信息,作者不保证也不承担任何软件的使用风险。