UNPKG

commitlint-plugin-spend

Version:

A commitlint plugin that requires the GitLab /spend or /spend_time directive in commit messages

20 lines (19 loc) 566 B
import type { SyncRule } from '@commitlint/types'; /** * Validate the spend command in the commit message. * * @example * // Valid commit message body * const commitMessage = { * body: "/spend 1mo 2w 3d 4h 5m 2018-08-26" * }; * // or * const commitMessage = { * body: "/spend_time -1h 30m" * }; * * @param parsed The parsed commit message. * @param when The condition under which the rule applies. * @returns A tuple indicating whether the validation passed and an error message if it failed. */ export declare const validateCommitMsg: SyncRule;