Skip to content

Commit

Permalink
feat(commitLint): add merge and wip type (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
BeADre committed Mar 22, 2024
1 parent 517cf8d commit 026a51e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
.idea
4 changes: 3 additions & 1 deletion src/commitLint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import fse from 'fs-extra'
const { readFileSync } = fse

export const COMMIT_MESSAGE_RE =
/^(revert|fix|feat|docs|perf|test|types|style|build|chore|release|refactor)(\(.+\))?!?: (.|\n)+/
/^(revert|fix|feat|docs|perf|test|types|style|build|chore|release|refactor|merge|wip)(\(.+\))?!?: (.|\n)+/

const ERROR_MESSAGE = 'Commit message invalid.'
const WARNING_MESSAGE = `\
Expand Down Expand Up @@ -35,6 +35,8 @@ Allowed types:
- release
- refactor
- revert
- merge
- wip
Commit message reference: https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y
参考阮一峰Commit message编写指南: https://www.ruanyifeng.com/blog/2016/01/commit_message_change_log.html`
Expand Down

0 comments on commit 026a51e

Please sign in to comment.