-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- 添加 .versionrc 配置自定义更新记录格式 - 添加 commitlint.config.mjs 规范提交信息格式 - 调整 package.json 版本号,移动到0.0.8分支 - 增加 pnpm-lock.yaml 依赖锁定文件 - 新增 README 配置文档表格说明 - 添加 .husky 目录配置Git钩子进行提交信息和代码规范校验
- Loading branch information
1 parent
f728680
commit f9bd1e2
Showing
9 changed files
with
6,035 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
module.exports = { | ||
types: [ | ||
{ | ||
value: ":zap: feat", | ||
name: "feat: 新功能", | ||
}, | ||
{ | ||
value: ":zap: fix", | ||
name: "fix: 修复bug", | ||
}, | ||
{ | ||
value: ":zap: init", | ||
name: "init: 初始化", | ||
}, | ||
{ | ||
value: ":zap: :pencil2: docs", | ||
name: "docs: 文档变更", | ||
}, | ||
{ | ||
value: ":zap: style", | ||
name: "style: 代码的样式美化", | ||
}, | ||
{ | ||
value: ":zap: refactor", | ||
name: "refactor: 重构", | ||
}, | ||
{ | ||
value: ":zap: perf", | ||
name: "perf: 性能优化", | ||
}, | ||
{ | ||
value: ":zap: test", | ||
name: "test: 测试", | ||
}, | ||
{ | ||
value: ":zap: revert", | ||
name: "revert: 回退", | ||
}, | ||
{ | ||
value: ":zap: build", | ||
name: "build: 打包", | ||
}, | ||
{ | ||
value: ":zap: chore", | ||
name: "chore: 构建/工程依赖/工具", | ||
}, | ||
{ | ||
value: ":zap: ci", | ||
name: "ci: CI related changes", | ||
}, | ||
], | ||
messages: { | ||
type: "请选择提交类型(必填)", | ||
customScope: "请输入文件修改范围(可选)", | ||
subject: "请简要描述提交(必填)", | ||
body: "请输入详细描述(可选)", | ||
breaking: "列出任何BREAKING CHANGES(可选)", | ||
footer: "请输入要关闭的issue(可选)", | ||
confirmCommit: "确定提交此说明吗?", | ||
}, | ||
allowCustomScopes: true, | ||
allowBreakingChanges: ["feat", "fix"], // 当提交类型为feat、fix时才有破坏性修改选项 | ||
subjectLimit: 72, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
echo "\033[33m ------------------- 正在校验提交信息格式 -------------------- \033[0m" | ||
npx --no-install commitlint --edit ${1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
echo "\033[33m ------------------- 正在执行eslint校验 -------------------- \033[0m" | ||
npx --no-install lint-staged | ||
|
||
pnpm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{ | ||
"header": "# 更新记录 \n\n", | ||
"types": [ | ||
{ | ||
"type": "feat", | ||
"section": "✨ Features | 新功能" | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "🐛 Bug Fixes | Bug 修复" | ||
}, | ||
{ | ||
"type": "init", | ||
"section": "🎉 Init | 初始化" | ||
}, | ||
{ | ||
"type": "docs", | ||
"section": "📝 Documentation | 文档" | ||
}, | ||
{ | ||
"type": "style", | ||
"section": "💄 Styles | 风格", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "refactor", | ||
"section": "♻️ Code Refactoring | 代码重构" | ||
}, | ||
{ | ||
"type": "perf", | ||
"section": "⚡ Performance Improvements | 性能优化" | ||
}, | ||
{ | ||
"type": "test", | ||
"section": "✅ Tests | 测试" | ||
}, | ||
{ | ||
"type": "revert", | ||
"section": "⏪ Revert | 回退", | ||
"hidden": true | ||
}, | ||
{ | ||
"type": "build", | ||
"section": "📦 Build System | 打包构建" | ||
}, | ||
{ | ||
"type": "chore", | ||
"section": "🚀 Chore | 部署相关" | ||
}, | ||
{ | ||
"type": "ci", | ||
"section": "👷 Continuous Integration | CI/CD 配置" | ||
} | ||
], | ||
"skip": { | ||
"bump": false, | ||
"changelog": false, | ||
"commit": false, | ||
"tag": false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export default { | ||
extends: ["gitmoji"], | ||
rules: { | ||
"header-max-length": [2, "always", 108], | ||
"type-empty": [2, "never"], | ||
"type-enum": [ | ||
2, | ||
"always", | ||
[ | ||
"✨ feat", | ||
"🐛 fix", | ||
"🎉 init", | ||
"📚 docs", | ||
"🎨 style", | ||
"♻️ refactor", | ||
"⚡ perf", | ||
"✅ test", | ||
"⏪ revert", | ||
"🔧 chore", | ||
"🔨 build", | ||
"⚙️ ci", | ||
], | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.