API 参考
    正在准备搜索索引...

    接口 FairyCommitConfig

    fairy.config → commit:fa commit 的默认参数。 命令行显式传入的同名参数优先;Commander 未传入时的内置默认值不会挡住这里。 types / scopes / scopeGlobs / verify 仍是校验规则:写了其中任一字段就不再读 commit-linter.config。 单包仓库(无 pnpm-workspace.yaml)一般只需 quiet 等命令参数,不必配置 scopeGlobs。

    interface FairyCommitConfig {
        config?: string;
        dryRun?: boolean;
        message?: string;
        push?: boolean;
        quiet?: boolean;
        scope?: string[];
        scopeGlobs?: string[];
        scopes?: string[];
        types?: string[];
        verify?: (gitCommit: GitCommitLinter) => boolean | void;
        vip?: boolean;
    }

    层级

    索引
    config?: string

    -f,--config:commit-linter 配置文件。有此字段时优先于本对象里的校验字段

    dryRun?: boolean

    --dry-run

    message?: string

    -m,--message

    push?: boolean

    -p,--push

    quiet?: boolean

    -q,--quiet

    scope?: string[]

    -s,--scope,可多条;有值时优先于 scopeGlobs

    scopeGlobs?: string[]

    Monorepo 包路径 glob;由 fairy-cli 在存在 pnpm-workspace.yaml 时扫描 npm 包名并写入运行时 scopes。 不传入 commitLinter。单包仓库可省略。

    scopes?: string[]

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

    types?: string[]

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

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

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

    vip?: boolean

    --vip