Skip to content

@142vip.commit linter.接口.CommitLinterOptions

mmdapl edited this page Nov 19, 2026 · 1 revision

API 参考 / @142vip/commit-linter / CommitLinterOptions

接口: CommitLinterOptions

定义于: commit-linter/src/commit.interface.ts:94

commitLinter 入参:白名单、待校验首行与自定义 verify。

theme_extended_by

属性

commit?

optional commit?: string

定义于: commit-linter/src/commit.interface.ts:103

待校验 commit 首行。 省略时读取当前仓库 .git/COMMIT_EDITMSG 首行(commit-msg 钩子场景)。


scopes?

optional scopes?: string[]

定义于: commit-linter/src/commit.interface.ts:98

允许的 scope;与内置默认 scope 合并去重


types?

optional types?: string[]

定义于: commit-linter/src/commit.interface.ts:96

允许的 type;与内置默认 type 合并去重


verify?

optional verify?: (gitCommit) => boolean | void

定义于: commit-linter/src/commit.interface.ts:108

额外校验(在格式与白名单通过后执行)。 返回 false 或抛错视为不通过(进程 exit 1)。

参数

gitCommit

GitCommitLinter

返回

boolean | void

Clone this wiki locally