diff options
| author | Vincent LE GOFF <g_n_s@hotmail.fr> | 2019-04-24 13:41:23 +0200 |
|---|---|---|
| committer | Ryan Dahl <ry@tinyclouds.org> | 2019-04-24 07:41:22 -0400 |
| commit | dcd01dd02530df0e799eb4227087680ffeb80d74 (patch) | |
| tree | 8cc1dec75dd17c326fea6d7fe471b7e7a31032f7 /testing/pretty.ts | |
| parent | e1f7a60bb326f8299f339635c0738d28431afa0a (diff) | |
Eslint fixes (denoland/deno_std#356)
Make warnings fail
Original: https://github.com/denoland/deno_std/commit/4543b563a9a01c8c168aafcbfd9d4634effba7fc
Diffstat (limited to 'testing/pretty.ts')
| -rw-r--r-- | testing/pretty.ts | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/testing/pretty.ts b/testing/pretty.ts index f4794f889..b2ab79d70 100644 --- a/testing/pretty.ts +++ b/testing/pretty.ts @@ -18,9 +18,9 @@ function createStr(v: unknown): string { function createColor(diffType: DiffType): (s: string) => string { switch (diffType) { case DiffType.added: - return (s: string) => green(bold(s)); + return (s: string): string => green(bold(s)); case DiffType.removed: - return (s: string) => red(bold(s)); + return (s: string): string => red(bold(s)); default: return white; } @@ -46,10 +46,12 @@ function buildMessage(diffResult: ReadonlyArray<DiffResult<string>>): string[] { ); messages.push(""); messages.push(""); - diffResult.forEach((result: DiffResult<string>) => { - const c = createColor(result.type); - messages.push(c(`${createSign(result.type)}${result.value}`)); - }); + diffResult.forEach( + (result: DiffResult<string>): void => { + const c = createColor(result.type); + messages.push(c(`${createSign(result.type)}${result.value}`)); + } + ); messages.push(""); return messages; |
