From ebc46fb96e2eb82c9ed01ded8c0edfda31fe974a Mon Sep 17 00:00:00 2001 From: Resi Respati Date: Wed, 1 Aug 2018 11:49:15 +0700 Subject: [PATCH] apply prettier formatting --- .prettierrc | 2 +- src/utils/ErrorMapper.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.prettierrc b/.prettierrc index 64bfb29..226b3a8 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,5 +3,5 @@ "tabWidth": 2, "printWidth": 120, "singleQuote": false, - "trailingComma": "es5" + "trailingComma": "none" } diff --git a/src/utils/ErrorMapper.ts b/src/utils/ErrorMapper.ts index 9d93c76..9702213 100644 --- a/src/utils/ErrorMapper.ts +++ b/src/utils/ErrorMapper.ts @@ -1,5 +1,5 @@ // tslint:disable:no-conditional-assignment -import {SourceMapConsumer} from "source-map"; +import { SourceMapConsumer } from "source-map"; export class ErrorMapper { // Cache consumer @@ -26,7 +26,7 @@ export class ErrorMapper { * @returns {string} The source-mapped stack trace */ public static sourceMappedStackTrace(error: Error | string): string { - const stack: string = error instanceof Error ? error.stack as string : error; + const stack: string = error instanceof Error ? (error.stack as string) : error; if (this.cache.hasOwnProperty(stack)) { return this.cache[stack]; } @@ -35,7 +35,7 @@ export class ErrorMapper { let match: RegExpExecArray | null; let outStack = error.toString(); - while (match = re.exec(stack)) { + while ((match = re.exec(stack))) { if (match[2] === "main") { const pos = this.consumer.originalPositionFor({ column: parseInt(match[4], 10),