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

@startdt/commitlint-config

v2.8.0

Published

Commitlint 可共享配置

Readme

@startdt/commitlint-config dependencies

open source npm version node version npm peer dependency version npm download npm license

如何使用

npm i @commitlint/cli @startdt/commitlint-config --save-dev

提示:如果你已经全局安装了 Commitizen 依赖,则可以通过命令行快速创建遵循约定的提交。请参看:使用 CLI 规范提交信息

使用配置文件:

// .commitlintrc.js
module.exports = {
    extends: '@startdt/commitlint-config',
    formatter: '@startdt/commitlint-config/format',
    rules: {
        // 自定义规则
    },
};

或者项目属性:

// package.json
"commitlint": {
    "extends": "@startdt/commitlint-config",
    "formatter": "@startdt/commitlint-config/format",
    "rules": {}
}

最后,在 package.json 中添加 commit-msg 钩子:

"gitHooks": {
    "commit-msg": "commitlint -e"
},

执行 git commit 时,自动校验 commit message 是否符合提交约定,并给出相应的提示。

CLI 命令行工具

如果你已经全局安装了 Commitizen 依赖,则可以通过命令行快速创建遵循约定的提交。

package.json 中配置 commitizen 选项:

// package.json
"config": {
    "commitizen": {
        "path": "./node_modules/@startdt/commitlint-config"
    }
},

使用 git cz 替代 git commit 提交代码,即可通过交互式 CLI 快速创建遵循约定的提交。

如果你还没有安装 git cz 相关的依赖,我们提供了内置的 CLI 工具,可以在项目中使用 npm script 的方式调用:

// package.json
{
    "scripts": {
        "commit": "git-commit"
    }
}

执行 npm run commit 提交代码,即可通过交互式 CLI 快速创建遵循约定的提交。

提交指南

git commit 时提交信息遵循以下格式:

<type 类型>[optional scope 可选的作用域]: <description 描述>

[optional body 可选的正文]

[optional footer 可选的脚注]

Header

type【必填】

用于说明 commit 的类型,只允许使用下面列举的标识:

  • init: 初次提交代码
  • feat:新增功能特性
  • fix: 修复已知问题
  • style: 统一代码风格
  • chore: 更新非核心代码
  • build: 添加或更新构建
  • test: 添加或改进测试
  • docs: 添加或更新文档
  • lang: 国际化与本地化
  • revert: 撤销之前的提交
  • refactor: 重构现有代码
  • example:更新示例代码
  • release: 发布版本标签

scope【可选】

用于说明 commit 影响的范围,比如数据层、控制层、视图层等,视项目不同而不同。

如果你的修改影响了不止一个 scope,你可以使用 * 代替。

subject【必填】

subject 是 commit 目的的简短描述(默认最大长度不超过 72 个字符)。

注意事项:

  • 以动词开头,使用第一人称现在时,比如 change,而不是 changed 或 changes
  • 英文统一使用小写体
  • 结尾不加句号(.

Body【可选】

Body 部分是对本次 commit 的详细描述,默认可选。

注意事项:

  • 较长内容无需手动换行
  • 本次提交含有 非兼容性 更新时,必填填写详细说明
  • 应该说明代码变更的动机,以及与之前行为的对比

Footer【可选】

Footer 部分只用于以下两种情况:

  • 非兼容性更新

    如果当前代码与上一个版本不兼容,则 Footer 部分以 BREAKING CHANGE 开头,后面是对变动的描述、以及变动理由和迁移方法。

  • 关闭 issue

    如果当前 commit 针对某个 issue ,那么可以在 Footer 部分关闭这个 issue 。