commitlint-plugin-spend
Version:
A commitlint plugin that requires the GitLab /spend or /spend_time directive in commit messages
14 lines (13 loc) • 544 B
TypeScript
import { type TimeUnit } from '../TimeUnit/TimeUnit';
/**
* The maximum value for each time unit.
*/
export declare const maxValueByTimeUnit: Record<TimeUnit, number>;
export type TimeValue = `${number}${TimeUnit}`;
/**
* The regular expression pattern for validating time values.
* It matches number time unit pairs like "2d", "3h", "30m", etc.
* Can optionally start with a negative sign for negative time values.
*/
export declare const timeValuePattern: RegExp;
export declare function isTimeValue(value: string): value is TimeValue;