All Projects → luoxue-victor → commitlint

luoxue-victor / commitlint

Licence: other
开箱即用的代码提交规范

Programming Languages

javascript
184084 projects - #8 most used programming language
Handlebars
879 projects

Projects that are alternatives of or similar to commitlint

Vue Cli4 Config
vue-cli4配置vue.config.js持续更新
Stars: ✭ 2,539 (+4878.43%)
Mutual labels:  vue-cli3
komit
An interactive prompt for conventional commit messages that doesn't get in your way. Designed to run as a git hook.
Stars: ✭ 29 (-43.14%)
Mutual labels:  commitlint
xiaomi market
Make a mobile's project of vueJs for xiaomi market
Stars: ✭ 23 (-54.9%)
Mutual labels:  vue-cli3
vite-vue3-starter
⭐ A Vite 2.x + Vue 3.x + TypeScript template starter
Stars: ✭ 384 (+652.94%)
Mutual labels:  commitlint
commit-formatter
A CLI tool to help you write git commit
Stars: ✭ 17 (-66.67%)
Mutual labels:  commitlint
elint
A easy way to lint your code
Stars: ✭ 38 (-25.49%)
Mutual labels:  commitlint
D2 Admin
An elegant dashboard
Stars: ✭ 11,012 (+21492.16%)
Mutual labels:  vue-cli3
fe-standard-config-seed
前端通用代码规范自动化接入
Stars: ✭ 18 (-64.71%)
Mutual labels:  commitlint
commitiquette
Plugin for Commitizen that uses commitLint configuration
Stars: ✭ 24 (-52.94%)
Mutual labels:  commitlint
awesome-react-app
Always the latest version of "create-react-app" with awesome configurations (lint, commit lint, husk, editor config, etc)
Stars: ✭ 44 (-13.73%)
Mutual labels:  commitlint
commitlint-config-cz
⚙️ commitlint sharable configuration, automatically converts/merges your cz-customizable (commitizen) config.
Stars: ✭ 23 (-54.9%)
Mutual labels:  commitlint
commitlint-plugin-function-rules
Commitlint plugin to define rules as functions.
Stars: ✭ 21 (-58.82%)
Mutual labels:  commitlint
nest-boilerplate
Nest.js boilerplate with CircleCI, Commitizen, Commitlint, Docker-Compose, ESLint, GitHub Actions, Husky, Lint-staged, OpenAPI, Prettier, PostGreSQL, Travis CI, TypeORM
Stars: ✭ 16 (-68.63%)
Mutual labels:  commitlint
inside-client
Human Resources Department Tool. https://ifactory-solutions.github.io/inside-client/
Stars: ✭ 42 (-17.65%)
Mutual labels:  commitlint
vue3-jd-h5
🔥 Based on vue3.0.0, vant3.0.0, vue-router v4.0.0-0, vuex^4.0.0-0, vue-cli3, mockjs, imitating Jingdong Taobao, mobile H5 e-commerce platform! 基于vue3.0.0 ,vant3.0.0,vue-router v4.0.0-0, vuex^4.0.0-0,vue-cli3,mockjs,仿京东淘宝的,移动端H5电商平台!
Stars: ✭ 660 (+1194.12%)
Mutual labels:  vue-cli3
Lin Cms Vue
🔆 Vue+ElementPlus构建的CMS开发框架
Stars: ✭ 2,341 (+4490.2%)
Mutual labels:  vue-cli3
node-backend-template
A template for NodeJS backend projects
Stars: ✭ 19 (-62.75%)
Mutual labels:  commitlint
glint
glint is a friendly tool for creating commits in the Conventional Commit style
Stars: ✭ 80 (+56.86%)
Mutual labels:  commitlint
nippon-color
copy nippon-color PWA build with vue-cli 3
Stars: ✭ 104 (+103.92%)
Mutual labels:  vue-cli3
bash-for-developers
🎓 Tutorial completo e em português para devs iniciantes de como usar o Bash e o Git.
Stars: ✭ 97 (+90.2%)
Mutual labels:  commitlint

Git commit 规范

结合 commitizen commitlint conventional-changelog-cli husky,进行封装,一键安装,开箱即用的 git commit 规范。

功能

  1. 自动检测 commit 是否规范,不规范不允许提交
  2. 自动提示 commit 填写格式。不怕忘记规范怎么写
  3. 集成 git add . && git commit 不需要在执行两个命令
  4. 自动生成 changelog

配置

  1. 如果您是 vue-cli3 的项目可以直接使用即可
vue add commitlint
  1. 如果您不是 vue-cli3 的项目
npm i vue-cli-plugin-commitlint commitizen commitlint conventional-changelog-cli husky -D
  • 在 package.json 中添加
{
  "scripts": {
    "log": "conventional-changelog --config ./node_modules/vue-cli-plugin-commitlint/lib/log -i CHANGELOG.md -s -r 0",
    "cz": "npm run log && git add . && git cz"
  },
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  },
  "config": {
    "commitizen": {
      "path": "./node_modules/vue-cli-plugin-commitlint/lib/cz"
    }
  }
}

增加 commitlint.config.js 文件

module.exports = {
  extends: ['./node_modules/vue-cli-plugin-commitlint/lib/lint']
};

使用

npm run cz  # git add . && git commit -m 'feat:(xxx): xxx'
npm run log # 生成 CHANGELOG
  1. 代码提交 npm run cz

commander

  1. 选择一个类型会自动询问

    1. (非必填)本次提交的改变所影响的范围
    2. (必填)写一个简短的变化描述
    3. (非必填)提供更详细的变更描述
    4. (非必填)是否存在不兼容变更?
    5. (非必填)此次变更是否影响某些打开的 issue

prompt

changelog 演示

changelog

规则

规范名 描述
docs 仅仅修改了文档,比如 README, CHANGELOG, CONTRIBUTE 等等
chore 改变构建流程、或者增加依赖库、工具等
feat 新增 feature
fix 修复 bug
merge 合并分之
perf 优化相关,比如提升性能、体验
refactor 代码重构,没有加新功能或者修复 bug
revert 回滚到上一个版本
style 仅仅修改了空格、格式缩进、都好等等,不改变代码逻辑
test 测试用例,包括单元测试、集成测试等
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].