1 | import { RuleConfigSeverity } from '@commitlint/types';
|
2 | import type { QualifiedRules } from '@commitlint/types';
|
3 | import type { RuleEntry } from './types';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export declare function getRuleName(id: string): string;
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export declare function getRulePrefix(id: string): string | null;
|
16 |
|
17 |
|
18 |
|
19 | export declare function getHasName(name: string): <T extends RuleEntry>(rule: RuleEntry) => rule is Exclude<T, [string, undefined]>;
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 | export declare function ruleIsActive<T extends RuleEntry>(rule: T): rule is Exclude<T, [string, Readonly<[RuleConfigSeverity.Disabled]>]>;
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | export declare function ruleIsApplicable(rule: RuleEntry): rule is [string, Readonly<[RuleConfigSeverity, 'always']>] | [string, Readonly<[RuleConfigSeverity, 'always', unknown]>];
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 | export declare function ruleIsNotApplicable(rule: RuleEntry): rule is [string, Readonly<[RuleConfigSeverity, 'never']>] | [string, Readonly<[RuleConfigSeverity, 'never', unknown]>];
|
38 | export declare function enumRuleIsActive(rule: RuleEntry): rule is [
|
39 | string,
|
40 | Readonly<[
|
41 | RuleConfigSeverity.Warning | RuleConfigSeverity.Error,
|
42 | 'always',
|
43 | string[]
|
44 | ]>
|
45 | ];
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | export declare function getRules(prefix: string, rules: QualifiedRules): RuleEntry[];
|
53 | export declare function getMaxLength(rule?: RuleEntry): number;
|
54 |
|
\ | No newline at end of file |