API 参考 / @142vip/commit-linter / CommitLinterOptions
接口: CommitLinterOptions
定义于: commit-linter/src/commit.interface.ts:94
commitLinter 入参:白名单、待校验首行与自定义 verify。
theme_extended_by
属性
commit?
optionalcommit?:string
定义于: commit-linter/src/commit.interface.ts:103
待校验 commit 首行。 省略时读取当前仓库 .git/COMMIT_EDITMSG 首行(commit-msg 钩子场景)。
scopes?
optionalscopes?:string[]
定义于: commit-linter/src/commit.interface.ts:98
允许的 scope;与内置默认 scope 合并去重
types?
optionaltypes?:string[]
定义于: commit-linter/src/commit.interface.ts:96
允许的 type;与内置默认 type 合并去重
verify?
optionalverify?: (gitCommit) =>boolean|void
定义于: commit-linter/src/commit.interface.ts:108
额外校验(在格式与白名单通过后执行)。 返回 false 或抛错视为不通过(进程 exit 1)。
参数
gitCommit
返回
boolean | void