|
1 |
| -import functionRule, { FunctionRule } from './function-rule'; |
2 |
| -import { Rule } from '@commitlint/types'; |
| 1 | +import { Plugin, Rule } from '@commitlint/types'; |
| 2 | +import functionRule from './function-rule'; |
3 | 3 |
|
4 |
| -type Rules = Record<string, Rule<FunctionRule>>; |
5 |
| - |
6 |
| -const rules: Rules = { |
7 |
| - 'function-rules/body-case': functionRule, |
8 |
| - 'function-rules/body-empty': functionRule, |
9 |
| - 'function-rules/body-leading-blank': functionRule, |
10 |
| - 'function-rules/body-max-length': functionRule, |
11 |
| - 'function-rules/body-max-line-length': functionRule, |
12 |
| - 'function-rules/body-min-length': functionRule, |
13 |
| - 'function-rules/footer-empty': functionRule, |
14 |
| - 'function-rules/footer-leading-blank': functionRule, |
15 |
| - 'function-rules/footer-max-length': functionRule, |
16 |
| - 'function-rules/footer-max-line-length': functionRule, |
17 |
| - 'function-rules/footer-min-length': functionRule, |
18 |
| - 'function-rules/header-case': functionRule, |
19 |
| - 'function-rules/header-full-stop': functionRule, |
20 |
| - 'function-rules/header-max-length': functionRule, |
21 |
| - 'function-rules/header-min-length': functionRule, |
22 |
| - 'function-rules/references-empty': functionRule, |
23 |
| - 'function-rules/scope-case': functionRule, |
24 |
| - 'function-rules/scope-empty': functionRule, |
25 |
| - 'function-rules/scope-enum': functionRule, |
26 |
| - 'function-rules/scope-max-length': functionRule, |
27 |
| - 'function-rules/scope-min-length': functionRule, |
28 |
| - 'function-rules/signed-off-by': functionRule, |
29 |
| - 'function-rules/subject-case': functionRule, |
30 |
| - 'function-rules/subject-empty': functionRule, |
31 |
| - 'function-rules/subject-full-stop': functionRule, |
32 |
| - 'function-rules/subject-max-length': functionRule, |
33 |
| - 'function-rules/subject-min-length': functionRule, |
34 |
| - 'function-rules/type-case': functionRule, |
35 |
| - 'function-rules/type-empty': functionRule, |
36 |
| - 'function-rules/type-enum': functionRule, |
37 |
| - 'function-rules/type-max-length': functionRule, |
38 |
| - 'function-rules/type-min-length': functionRule, |
| 4 | +const rules: Plugin['rules'] = { |
| 5 | + 'function-rules/body-case': functionRule as Rule<unknown>, |
| 6 | + 'function-rules/body-empty': functionRule as Rule<unknown>, |
| 7 | + 'function-rules/body-leading-blank': functionRule as Rule<unknown>, |
| 8 | + 'function-rules/body-max-length': functionRule as Rule<unknown>, |
| 9 | + 'function-rules/body-max-line-length': functionRule as Rule<unknown>, |
| 10 | + 'function-rules/body-min-length': functionRule as Rule<unknown>, |
| 11 | + 'function-rules/footer-empty': functionRule as Rule<unknown>, |
| 12 | + 'function-rules/footer-leading-blank': functionRule as Rule<unknown>, |
| 13 | + 'function-rules/footer-max-length': functionRule as Rule<unknown>, |
| 14 | + 'function-rules/footer-max-line-length': functionRule as Rule<unknown>, |
| 15 | + 'function-rules/footer-min-length': functionRule as Rule<unknown>, |
| 16 | + 'function-rules/header-case': functionRule as Rule<unknown>, |
| 17 | + 'function-rules/header-full-stop': functionRule as Rule<unknown>, |
| 18 | + 'function-rules/header-max-length': functionRule as Rule<unknown>, |
| 19 | + 'function-rules/header-min-length': functionRule as Rule<unknown>, |
| 20 | + 'function-rules/references-empty': functionRule as Rule<unknown>, |
| 21 | + 'function-rules/scope-case': functionRule as Rule<unknown>, |
| 22 | + 'function-rules/scope-empty': functionRule as Rule<unknown>, |
| 23 | + 'function-rules/scope-enum': functionRule as Rule<unknown>, |
| 24 | + 'function-rules/scope-max-length': functionRule as Rule<unknown>, |
| 25 | + 'function-rules/scope-min-length': functionRule as Rule<unknown>, |
| 26 | + 'function-rules/signed-off-by': functionRule as Rule<unknown>, |
| 27 | + 'function-rules/subject-case': functionRule as Rule<unknown>, |
| 28 | + 'function-rules/subject-empty': functionRule as Rule<unknown>, |
| 29 | + 'function-rules/subject-full-stop': functionRule as Rule<unknown>, |
| 30 | + 'function-rules/subject-max-length': functionRule as Rule<unknown>, |
| 31 | + 'function-rules/subject-min-length': functionRule as Rule<unknown>, |
| 32 | + 'function-rules/type-case': functionRule as Rule<unknown>, |
| 33 | + 'function-rules/type-empty': functionRule as Rule<unknown>, |
| 34 | + 'function-rules/type-enum': functionRule as Rule<unknown>, |
| 35 | + 'function-rules/type-max-length': functionRule as Rule<unknown>, |
| 36 | + 'function-rules/type-min-length': functionRule as Rule<unknown>, |
39 | 37 | };
|
40 | 38 |
|
41 | 39 | export default rules;
|
42 |
| -export { Rules }; |
0 commit comments