Skip to content

relizy / CommitlintCustomRule

Type Alias: CommitlintCustomRule ​

CommitlintCustomRule = (commit, context) => CommitlintCustomRuleOutcome | Promise<CommitlintCustomRuleOutcome>

Defined in: src/types.ts:1451

A rule written as a function. Returns true when the commit is valid, an error message (or false) otherwise, or a commitlint-style [valid, message?] tuple so commitlint-plugin-function-rules rules can be copied as is.

Parameters ​

commit ​

CommitlintCommit

context ​

CommitlintCustomRuleContext

Returns ​

CommitlintCustomRuleOutcome | Promise<CommitlintCustomRuleOutcome>

Released under the MIT License.