From 4246081c510db0a925293aab2da78962a6ab8cc0 Mon Sep 17 00:00:00 2001 From: Armano Date: Tue, 11 Feb 2020 02:17:49 +0100 Subject: [PATCH] chore: rollback some unnecessary changes --- @commitlint/cli/src/cli.ts | 12 ++++++------ @commitlint/cli/src/types.ts | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/@commitlint/cli/src/cli.ts b/@commitlint/cli/src/cli.ts index c55824e728..0aafc804de 100644 --- a/@commitlint/cli/src/cli.ts +++ b/@commitlint/cli/src/cli.ts @@ -57,7 +57,7 @@ const cli = yargs description: 'array of shareable configurations to extend', type: 'array' }, - helpUrl: { + 'help-url': { alias: 'H', type: 'string', description: 'helpurl in error message' @@ -73,7 +73,7 @@ const cli = yargs description: 'output format of the results', type: 'string' }, - parserPreset: { + 'parser-preset': { alias: 'p', description: 'configuration preset to use for conventional-commits-parser', @@ -232,8 +232,8 @@ async function main(options: CliFlags) { const output = format(report, { color: flags.color, verbose: flags.verbose, - helpUrl: flags.helpUrl - ? flags.helpUrl.trim() + helpUrl: flags['help-url'] + ? flags['help-url'].trim() : 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint' }); @@ -323,8 +323,8 @@ function getSeed(flags: CliFlags): Seed { (i): i is string => typeof i === 'string' ); return n.length > 0 - ? {extends: n, parserPreset: flags.parserPreset} - : {parserPreset: flags.parserPreset}; + ? {extends: n, parserPreset: flags['parser-preset']} + : {parserPreset: flags['parser-preset']}; } function selectParserOpts(parserPreset: ParserPreset) { diff --git a/@commitlint/cli/src/types.ts b/@commitlint/cli/src/types.ts index 538d6bb1a2..67dcc606a1 100644 --- a/@commitlint/cli/src/types.ts +++ b/@commitlint/cli/src/types.ts @@ -6,10 +6,10 @@ export interface CliFlags { env?: string; extends?: (string | number)[]; help?: boolean; - helpUrl?: string; + 'help-url'?: string; from?: string; format?: string; - parserPreset?: string; + 'parser-preset'?: string; quiet: boolean; to?: string; version?: boolean;