@icebreakers/commitlint-config 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,82 +1,50 @@
1
- import { RuleConfigSeverity, RuleConfigCondition, TargetCaseType, UserConfig, UserPromptConfig } from '@commitlint/types';
2
- export { RuleConfigCondition, RuleConfigSeverity, TargetCaseType } from '@commitlint/types';
1
+ import { RulesConfig, RuleConfigCondition, RuleConfigSeverity, TargetCaseType, UserPromptConfig, UserConfig } from '@commitlint/types';
2
+ export { UserConfig as CommitlintUserConfig, RuleConfigSeverity } from '@commitlint/types';
3
3
 
4
4
  interface CommitTypeDefinition {
5
5
  value: string;
6
- title: string;
7
- description: string;
6
+ title?: string;
7
+ description?: string;
8
8
  emoji?: string;
9
9
  }
10
- interface TypeRuleOptions {
11
- /**
12
- * Replace the default set of commit types.
13
- */
14
- values?: string | string[];
15
- /**
16
- * Extend the existing commit types without replacing them.
17
- */
18
- add?: string | string[];
19
- /**
20
- * Provide metadata for commit types, primarily used by the prompt.
21
- */
10
+ interface CommitTypesOptions {
11
+ add?: string[];
22
12
  definitions?: CommitTypeDefinition[];
23
- severity?: RuleConfigSeverity;
24
13
  condition?: RuleConfigCondition;
14
+ severity?: RuleConfigSeverity;
25
15
  }
26
- interface ScopeRuleOptions {
27
- values?: string | string[];
28
- add?: string | string[];
29
- case?: TargetCaseType | TargetCaseType[];
30
- /**
31
- * Require scopes on every commit message. Equivalent to disallowing empty scopes.
32
- */
16
+ interface CommitScopeOptions {
17
+ values?: string[];
33
18
  required?: boolean;
34
- /**
35
- * Explicitly allow empty scopes. Takes precedence over `required` when set.
36
- */
37
- allowEmpty?: boolean;
19
+ case?: TargetCaseType | TargetCaseType[];
38
20
  severity?: RuleConfigSeverity;
39
- caseSeverity?: RuleConfigSeverity;
40
21
  }
41
- interface SubjectRuleOptions {
22
+ interface CommitSubjectOptions {
42
23
  forbidden?: TargetCaseType | TargetCaseType[];
24
+ caseCondition?: RuleConfigCondition;
43
25
  caseSeverity?: RuleConfigSeverity;
44
- /**
45
- * Control the trailing character check. Set to `false` to disable the rule entirely.
46
- */
47
- fullStop?: string | false;
48
- fullStopSeverity?: RuleConfigSeverity;
49
26
  allowEmpty?: boolean;
50
- emptySeverity?: RuleConfigSeverity;
27
+ allowEmptySeverity?: RuleConfigSeverity;
28
+ fullStop?: boolean;
29
+ fullStopSeverity?: RuleConfigSeverity;
30
+ fullStopCharacter?: string;
51
31
  }
52
- interface HeaderRuleOptions {
32
+ interface CommitHeaderOptions {
53
33
  maxLength?: number;
34
+ condition?: RuleConfigCondition;
54
35
  severity?: RuleConfigSeverity;
55
36
  }
56
37
  interface IcebreakerCommitlintOptions {
57
- extends?: string | string[];
58
- types?: TypeRuleOptions | string[];
59
- scopes?: ScopeRuleOptions | string[];
60
- subject?: SubjectRuleOptions;
61
- header?: HeaderRuleOptions;
62
- rules?: UserConfig['rules'];
63
- parserPreset?: UserConfig['parserPreset'];
64
- formatter?: UserConfig['formatter'];
65
- ignores?: UserConfig['ignores'];
66
- defaultIgnores?: UserConfig['defaultIgnores'];
67
- plugins?: UserConfig['plugins'];
68
- helpUrl?: UserConfig['helpUrl'];
38
+ extends?: string[];
39
+ rules?: Partial<RulesConfig>;
40
+ types?: CommitTypesOptions;
41
+ scopes?: CommitScopeOptions;
42
+ subject?: CommitSubjectOptions;
43
+ header?: CommitHeaderOptions;
69
44
  prompt?: UserPromptConfig;
70
45
  }
71
46
 
72
47
  declare function createIcebreakerCommitlintConfig(options?: IcebreakerCommitlintOptions): UserConfig;
73
-
74
- declare const DEFAULT_SUBJECT_FORBIDDEN_CASES: TargetCaseType[];
75
- declare const DEFAULT_COMMIT_TYPES: CommitTypeDefinition[];
76
- declare const DEFAULT_TYPES: string[];
77
- declare const DEFAULT_EXTENDS: string[];
78
-
79
- declare function createCommitlintConfig(options?: IcebreakerCommitlintOptions): UserConfig;
80
48
  declare function icebreaker(options?: IcebreakerCommitlintOptions): UserConfig;
81
49
 
82
- export { type CommitTypeDefinition, DEFAULT_COMMIT_TYPES, DEFAULT_EXTENDS, DEFAULT_SUBJECT_FORBIDDEN_CASES, DEFAULT_TYPES, type HeaderRuleOptions, type IcebreakerCommitlintOptions, type ScopeRuleOptions, type SubjectRuleOptions, type TypeRuleOptions, createCommitlintConfig, createIcebreakerCommitlintConfig, icebreaker };
50
+ export { type CommitHeaderOptions, type CommitScopeOptions, type CommitSubjectOptions, type CommitTypeDefinition, type CommitTypesOptions, type IcebreakerCommitlintOptions, createIcebreakerCommitlintConfig, icebreaker };
package/dist/index.d.ts CHANGED
@@ -1,82 +1,50 @@
1
- import { RuleConfigSeverity, RuleConfigCondition, TargetCaseType, UserConfig, UserPromptConfig } from '@commitlint/types';
2
- export { RuleConfigCondition, RuleConfigSeverity, TargetCaseType } from '@commitlint/types';
1
+ import { RulesConfig, RuleConfigCondition, RuleConfigSeverity, TargetCaseType, UserPromptConfig, UserConfig } from '@commitlint/types';
2
+ export { UserConfig as CommitlintUserConfig, RuleConfigSeverity } from '@commitlint/types';
3
3
 
4
4
  interface CommitTypeDefinition {
5
5
  value: string;
6
- title: string;
7
- description: string;
6
+ title?: string;
7
+ description?: string;
8
8
  emoji?: string;
9
9
  }
10
- interface TypeRuleOptions {
11
- /**
12
- * Replace the default set of commit types.
13
- */
14
- values?: string | string[];
15
- /**
16
- * Extend the existing commit types without replacing them.
17
- */
18
- add?: string | string[];
19
- /**
20
- * Provide metadata for commit types, primarily used by the prompt.
21
- */
10
+ interface CommitTypesOptions {
11
+ add?: string[];
22
12
  definitions?: CommitTypeDefinition[];
23
- severity?: RuleConfigSeverity;
24
13
  condition?: RuleConfigCondition;
14
+ severity?: RuleConfigSeverity;
25
15
  }
26
- interface ScopeRuleOptions {
27
- values?: string | string[];
28
- add?: string | string[];
29
- case?: TargetCaseType | TargetCaseType[];
30
- /**
31
- * Require scopes on every commit message. Equivalent to disallowing empty scopes.
32
- */
16
+ interface CommitScopeOptions {
17
+ values?: string[];
33
18
  required?: boolean;
34
- /**
35
- * Explicitly allow empty scopes. Takes precedence over `required` when set.
36
- */
37
- allowEmpty?: boolean;
19
+ case?: TargetCaseType | TargetCaseType[];
38
20
  severity?: RuleConfigSeverity;
39
- caseSeverity?: RuleConfigSeverity;
40
21
  }
41
- interface SubjectRuleOptions {
22
+ interface CommitSubjectOptions {
42
23
  forbidden?: TargetCaseType | TargetCaseType[];
24
+ caseCondition?: RuleConfigCondition;
43
25
  caseSeverity?: RuleConfigSeverity;
44
- /**
45
- * Control the trailing character check. Set to `false` to disable the rule entirely.
46
- */
47
- fullStop?: string | false;
48
- fullStopSeverity?: RuleConfigSeverity;
49
26
  allowEmpty?: boolean;
50
- emptySeverity?: RuleConfigSeverity;
27
+ allowEmptySeverity?: RuleConfigSeverity;
28
+ fullStop?: boolean;
29
+ fullStopSeverity?: RuleConfigSeverity;
30
+ fullStopCharacter?: string;
51
31
  }
52
- interface HeaderRuleOptions {
32
+ interface CommitHeaderOptions {
53
33
  maxLength?: number;
34
+ condition?: RuleConfigCondition;
54
35
  severity?: RuleConfigSeverity;
55
36
  }
56
37
  interface IcebreakerCommitlintOptions {
57
- extends?: string | string[];
58
- types?: TypeRuleOptions | string[];
59
- scopes?: ScopeRuleOptions | string[];
60
- subject?: SubjectRuleOptions;
61
- header?: HeaderRuleOptions;
62
- rules?: UserConfig['rules'];
63
- parserPreset?: UserConfig['parserPreset'];
64
- formatter?: UserConfig['formatter'];
65
- ignores?: UserConfig['ignores'];
66
- defaultIgnores?: UserConfig['defaultIgnores'];
67
- plugins?: UserConfig['plugins'];
68
- helpUrl?: UserConfig['helpUrl'];
38
+ extends?: string[];
39
+ rules?: Partial<RulesConfig>;
40
+ types?: CommitTypesOptions;
41
+ scopes?: CommitScopeOptions;
42
+ subject?: CommitSubjectOptions;
43
+ header?: CommitHeaderOptions;
69
44
  prompt?: UserPromptConfig;
70
45
  }
71
46
 
72
47
  declare function createIcebreakerCommitlintConfig(options?: IcebreakerCommitlintOptions): UserConfig;
73
-
74
- declare const DEFAULT_SUBJECT_FORBIDDEN_CASES: TargetCaseType[];
75
- declare const DEFAULT_COMMIT_TYPES: CommitTypeDefinition[];
76
- declare const DEFAULT_TYPES: string[];
77
- declare const DEFAULT_EXTENDS: string[];
78
-
79
- declare function createCommitlintConfig(options?: IcebreakerCommitlintOptions): UserConfig;
80
48
  declare function icebreaker(options?: IcebreakerCommitlintOptions): UserConfig;
81
49
 
82
- export { type CommitTypeDefinition, DEFAULT_COMMIT_TYPES, DEFAULT_EXTENDS, DEFAULT_SUBJECT_FORBIDDEN_CASES, DEFAULT_TYPES, type HeaderRuleOptions, type IcebreakerCommitlintOptions, type ScopeRuleOptions, type SubjectRuleOptions, type TypeRuleOptions, createCommitlintConfig, createIcebreakerCommitlintConfig, icebreaker };
50
+ export { type CommitHeaderOptions, type CommitScopeOptions, type CommitSubjectOptions, type CommitTypeDefinition, type CommitTypesOptions, type IcebreakerCommitlintOptions, createIcebreakerCommitlintConfig, icebreaker };