@@ -17,7 +17,7 @@ export function parseGlobalOptions(
17
17
globalOptionDefinitions : GlobalOptionDefinitions ,
18
18
) : ArgumentDescriptor [ ] {
19
19
return [ ...globalOptionDefinitions ] . map ( ( [ , { option } ] ) => ( {
20
- name : formatOptionName ( option . name ) ,
20
+ name : toCommandLineOption ( option . name ) ,
21
21
description : option . description ,
22
22
} ) ) ;
23
23
}
@@ -64,7 +64,7 @@ export function parseOptions(task: Task): {
64
64
65
65
for ( const [ optionName , option ] of task . options ) {
66
66
options . push ( {
67
- name : formatOptionName ( optionName ) ,
67
+ name : toCommandLineOption ( optionName ) ,
68
68
description : option . description ,
69
69
type : option . type ,
70
70
} ) ;
@@ -81,8 +81,8 @@ export function parseOptions(task: Task): {
81
81
return { options, positionalArguments } ;
82
82
}
83
83
84
- export function formatOptionName ( str : string ) : string {
85
- return `--${ camelToKebabCase ( str ) } ` ;
84
+ export function toCommandLineOption ( optionName : string ) : string {
85
+ return `--${ camelToKebabCase ( optionName ) } ` ;
86
86
}
87
87
88
88
export function getLongestNameLength ( tasks : Array < { name : string } > ) : number {
0 commit comments