Skip to content

@142vip.commit linter.接口.VipCommitLinterConfig

mmdapl edited this page Nov 19, 2026 · 1 revision

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

接口: VipCommitLinterConfig

定义于: commit-linter/src/config.ts:10

配置文件形态:commitLinter 字段 + Monorepo 扫描 glob(仅 fa commit 使用)。

theme_extends

属性

commit?

optional commit?: string

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

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

继承自

CommitLinterOptions.commit


scopeGlobs?

optional scopeGlobs?: string[]

定义于: commit-linter/src/config.ts:15

Monorepo 包路径 glob;由 fairy-cli 扫描 npm 包名并写入运行时 scopes。 不传入 commitLinter。


scopes?

optional scopes?: string[]

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

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

继承自

CommitLinterOptions.scopes


types?

optional types?: string[]

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

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

继承自

CommitLinterOptions.types


verify?

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

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

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

参数

gitCommit

GitCommitLinter

返回

boolean | void

继承自

CommitLinterOptions.verify

Clone this wiki locally