@@ -12,7 +12,7 @@ export interface UserConfig extends CommitlintUserConfig {
1212}
1313
1414export type Config = Omit < Partial < typeof defaultConfig > , "scopes" > & {
15- scopes : TypesOption [ ] ;
15+ scopes : ScopesType ;
1616 disableScopeLowerCase ?: boolean ;
1717 disableSubjectLowerCase ?: boolean ;
1818 maxHeaderWidth ?: number ;
@@ -66,12 +66,14 @@ export type Answers = {
6666 confirmCommit ?: string ;
6767} ;
6868
69+ export type ScopesType = string [ ] | Array < { name : string ; value ?: string } > ;
70+
6971export interface CommitizenType {
7072 registerPrompt : ( type : string , plugin : unknown ) => void ;
7173 prompt : ( qs : QuestionsType ) => Promise < Answers > ;
7274}
7375
74- interface Option {
76+ export interface Option {
7577 /**
7678 * @description : show prompt name
7779 */
@@ -111,13 +113,13 @@ export interface CommitizenGitOptions {
111113 /**
112114 * @description : Provides a select of prompt to select module scopes
113115 */
114- scopes ?: Array < { name : string } > ;
116+ scopes ?: ScopesType ;
115117
116118 /**
117119 * @description : Provides an overriding select of prompt to select module scopes under specific typs
118120 * @example : [test] => provide select e2eTest unitTest
119121 */
120- scopeOverrides ?: { [ type : string ] : Array < { name : string } > } ;
122+ scopeOverrides ?: { [ type : string ] : ScopesType } ;
121123
122124 /**
123125 * @description : Whether to not selectable skipping when appearing or customizing when selecting scopes
@@ -222,7 +224,7 @@ export const defaultConfig = Object.freeze({
222224 { value : "revert" , name : "revert: Reverts a previous commit" , emoji : ":rewind:" }
223225 ] ,
224226 useEmoji : false ,
225- scopes : [ { name : 'READEME' } , { name : 'theme' } , { name : 'module' } , { name : 'plugin' } ] ,
227+ scopes : [ ] ,
226228 allowCustomScopes : true ,
227229 allowBreakingChanges : [ 'feat' , 'fix' ] ,
228230 upperCaseSubject : false ,
0 commit comments