Skip to content

Commit 63123de

Browse files
armano2marionebl
authored andcommitted
chore(cli): add missing type
1 parent 93f1e63 commit 63123de

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

@commitlint/cli/src/cli.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import resolveFrom from 'resolve-from';
77
import resolveGlobal from 'resolve-global';
88
import yargs from 'yargs';
99

10-
import {CliFlags} from './types';
10+
import {CliFlags, Seed} from './types';
1111
import {
1212
LintOptions,
1313
LintOutcome,
@@ -292,7 +292,7 @@ function getEditValue(flags: CliFlags) {
292292
return true;
293293
}
294294
if (typeof edit === 'boolean') {
295-
return false;
295+
return edit;
296296
}
297297
// The recommended method to specify -e with husky was `commitlint -e $HUSKY_GIT_PARAMS`
298298
// This does not work properly with win32 systems, where env variable declarations
@@ -320,12 +320,7 @@ function getEditValue(flags: CliFlags) {
320320
return edit;
321321
}
322322

323-
function getSeed(
324-
seed: CliFlags
325-
): {
326-
extends?: string[];
327-
parserPreset?: string;
328-
} {
323+
function getSeed(seed: CliFlags): Seed {
329324
const n = (seed.extends || []).filter(
330325
(i): i is string => typeof i === 'string'
331326
);

@commitlint/cli/src/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,8 @@ export interface CliFlags {
1717
_: string[];
1818
$0: string;
1919
}
20+
21+
export interface Seed {
22+
extends?: string[];
23+
parserPreset?: string;
24+
}

0 commit comments

Comments
 (0)