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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@2030/commitlint-config-plus

v1.0.1

Published

ZiJun's commitlint config for work projects

Downloads

24

Readme

:sparkles:@2030/commitlint-config-plus

npm GitHub Workflow Status NPM GitHub top language npm bundle size npm

代码提交规则标准规范

:fire:风格说明

  • 标题不能为空且不得超过72个字符
  • Scope不能为空
  • 规范标准提交类型
  • 默认提交类型
    • 'feat' // 新增功能/特性
    • 'fix' // 修复BUG/问题
    • 'upd' // 更新某功能
    • 'docs' // 变更文档/注释
    • 'style' // 调整代码格式(不影响功能,空格/分号等格式修正)
    • 'types', // 类型声明或修改
    • 'refactor' // 重构代码(不包括修复BUG/新增功能)
    • 'perf' // 优化/性能提升
    • 'test' // 测试(用例)相关
    • 'workflow' // 构建流程/工具变更(修改打包配置等)
    • 'ci' // 持续集成
    • 'revert' // 回滚提交
    • 'merge' // 合并分支
    • 'chore' // 依赖更新/脚手架配置修改
    • 'wip' // 开发中
    • 'mod' // 不确定分类的修改
    • 'release' // 发布新版本

:bulb:使用说明

1. 安装

  • npm 安装:
    > npm i -D @commitlint/cli @2030/commitlint-config-plus
  • yarn 安装:
    > yarn add -D @commitlint/cli @2030/commitlint-config-plus
  • pnpm 安装:
    > pnpm add -D @commitlint/cli @2030/commitlint-config-plus

2. 项目根目录配置

  • .commitlintrc.json 配置:
    {
      "extends": ["@2030/commitlint-config-plus"]
    }
  • .commitlintrc.yml 配置:
    extends: "@2030/commitlint-config-plus"
  • .commitlintrc.js 配置:
    module.exports = {
      extends: ["@2030/commitlint-config-plus"]
    }

3. 添加 husky hook - commit-msg

Husky V8 代码示例:

# husky初始化
pnpm dlx husky-init
# 安装依赖,默认添加 pre-commit 钩子,可选择注释内容
pnpm install
  • 非window端添加 commit-msg 钩子
    npx husky add .husky/commit-msg 'npx --no -- commitlint --edit "$1"'
  • window端添加 commit-msg 钩子
    node node_modules/husky/lib/bin add .husky/commit-msg 'npx --no -- commitlint --edit "$1"'

:key:License

MIT License © 2022 ZiJun