Skip to content

Commit

Permalink
chore: add commitlint
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickshan committed Jul 4, 2024
1 parent 8c59c87 commit 235a6d3
Show file tree
Hide file tree
Showing 8 changed files with 2,158 additions and 258 deletions.
22 changes: 22 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"type-enum": [
2,
"always",
[
"feat",
"fix",
"docs",
"style",
"refactor",
"perf",
"test",
"chore",
"revert",
"build"
]
],
"subject-case": [0]
}
}
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
body: |
Please refer to [CHANGELOG.md](https://github.com/yorickshan/html2canvas-pro/blob/main/CHANGELOG.md) for details.
release_name: ${{ github.ref }}
draft: false
prerelease: ${{ contains(github.ref, '-rc.') || contains(github.ref, '-alpha.') }}
Expand Down
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run commitlint
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
11 changes: 11 additions & 0 deletions .versionrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"types": [
{ "type": "feat", "section": "Features" },
{ "type": "fix", "section": "Fixes" },
{ "type": "docs", "section": "Documentation" },
{ "type": "refactor", "section": "Refactor" },
{ "type": "perf", "section": "Performance" },
{ "type": "chore", "section": "Chore" },
{ "type": "test", "section": "Chore" }
]
}
Loading

0 comments on commit 235a6d3

Please sign in to comment.