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

@be-link/commitlint-config

v1.0.3

Published

共比邻 commitlint 共享配置

Downloads

76

Readme

📝 @be-link/commitlint-config

团队 Commitlint 共享配置,基于 @commitlint/config-conventional

💡 设计理念

本包是一个纯配置包,专注于提供 commit 规则配置,不负责依赖版本管理。

职责定位:

  • ✅ 只提供 commitlint 规则配置
  • ✅ 基于业界标准扩展定制
  • ❌ 不管理依赖版本(使用 peerDependencies)

依赖管理由谁负责?
版本管理由 @be-link/be-link-husky 统一处理,它会根据 Node 版本自动安装匹配的依赖。

📦 安装

方式一:使用 @be-link/be-link-husky(推荐✨)

# 自动安装所有依赖并配置
pnpm install @be-link/be-link-husky -D

这种方式会:

  • ✅ 自动安装本配置包
  • ✅ 自动安装 @commitlint/cli 和 @commitlint/config-conventional
  • ✅ 根据 Node 版本选择合适的依赖版本
  • ✅ 自动创建配置文件

方式二:手动安装

# 需要手动安装所有 peer dependencies
pnpm install @be-link/commitlint-config @commitlint/cli @commitlint/config-conventional -D

然后在项目根目录创建 commitlint.config.js

module.exports = {
  extends: ['@be-link/commitlint-config'],
};

📋 规则说明

支持的 Commit 类型

| Type | 说明 | 示例 | | ---------- | --------- | -------------------------------- | | feat | 新功能 | feat(user): 添加用户登录功能 | | fix | 修复 Bug | fix(auth): 修复 token 过期问题 | | docs | 文档变更 | docs: 更新 README | | style | 代码格式 | style: 统一代码缩进 | | refactor | 重构 | refactor(api): 优化接口结构 | | perf | 性能优化 | perf: 优化列表渲染 | | test | 测试相关 | test: 添加用户模块测试 | | chore | 构建/工具 | chore: 升级依赖版本 |

Commit 消息格式

<type>(<scope>): <subject>

<body>

<footer>

完整示例

feat(user): 添加用户登录功能

实现了用户登录的基本流程,包括:
- 用户名密码验证
- Token 生成和存储
- 登录状态管理

Closes #123

简单示例

git commit -m "feat(user): 添加用户登录功能"
git commit -m "fix(cart): 修复购物车计算错误"
git commit -m "docs: 更新安装文档"

规则特性

与官方 @commitlint/config-conventional 的差异:

| 规则 | 官方配置 | 本配置 | 说明 | | ---------------------- | ----------------- | ------ | -------------- | | header-max-length | 100 | 200 | 支持更长的标题 | | body-max-line-length | 100 | 200 | 支持更长的正文 | | subject-case | 限制 | 禁用 | 允许中文 | | type-enum | 包含 build、ci 等 | 简化 | 只保留常用类型 |

🏗️ 架构设计

@be-link/be-link-husky (版本管理器)
  ↓ 自动安装
┌──────────────────────────────────────────┐
│ @commitlint/cli                          │ ← 校验工具
│ @commitlint/config-conventional          │ ← 官方标准配置
│ @be-link/commitlint-config (本包)        │ ← 团队定制规则
└──────────────────────────────────────────┘
       ↑ extends
     官方标准

依赖关系:

{
  "peerDependencies": {
    "@commitlint/cli": ">=17.0.0",
    "@commitlint/config-conventional": ">=17.0.0"
  }
}

本包通过 peerDependencies 声明依赖,但不自动安装。由 @be-link/be-link-husky 负责版本选择和安装。

🔧 自定义配置

如果需要在项目中进一步定制规则:

// commitlint.config.js
module.exports = {
  extends: ['@be-link/commitlint-config'],
  rules: {
    // 覆盖或新增规则
    'header-max-length': [2, 'always', 100],
    'scope-enum': [2, 'always', ['user', 'cart', 'order']],
  },
};

📚 更多信息

📄 License

MIT