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/format.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/format.ts')
| -rw-r--r-- | testing/format.ts | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/testing/format.ts b/testing/format.ts index 9a8b02ac6..8ed066eb0 100644 --- a/testing/format.ts +++ b/testing/format.ts @@ -358,11 +358,13 @@ const getKeysOfEnumerableProperties = (object: {}): Array<string | symbol> => { const keys: Array<string | symbol> = Object.keys(object).sort(); if (Object.getOwnPropertySymbols) { - Object.getOwnPropertySymbols(object).forEach(symbol => { - if (Object.getOwnPropertyDescriptor(object, symbol)!.enumerable) { - keys.push(symbol); + Object.getOwnPropertySymbols(object).forEach( + (symbol): void => { + if (Object.getOwnPropertyDescriptor(object, symbol)!.enumerable) { + keys.push(symbol); + } } - }); + ); } return keys; @@ -524,7 +526,7 @@ const getConfig = (options: Options): Config => ({ // eslint-disable-next-line @typescript-eslint/no-explicit-any export function format(val: any, options: Optional<Options> = {}): string { const opts = Object.keys(DEFAULT_OPTIONS).reduce( - (acc: Options, k: keyof Options) => { + (acc: Options, k: keyof Options): unknown => { const opt = options[k]; if (typeof opt === "undefined") { return { ...acc, [k]: DEFAULT_OPTIONS[k] }; |
