From 51ec5d0fa9a24d0af9a49f6ec1edc245ea6046fa Mon Sep 17 00:00:00 2001 From: evandrocoan Date: Wed, 22 Apr 2020 23:10:21 -0300 Subject: [PATCH] Set .prettierrc printWidth to 88 because the default is too short --- qt/ts/.prettierrc | 1 + qt/ts/src/editor.ts | 5 +---- qt/ts/src/reviewer.ts | 6 ++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/qt/ts/.prettierrc b/qt/ts/.prettierrc index c23b64108..ef6f4ce45 100644 --- a/qt/ts/.prettierrc +++ b/qt/ts/.prettierrc @@ -1,5 +1,6 @@ { "trailingComma": "es5", + "printWidth": 88, "tabWidth": 4, "semi": true } diff --git a/qt/ts/src/editor.ts b/qt/ts/src/editor.ts index ab373fd38..121e6f980 100644 --- a/qt/ts/src/editor.ts +++ b/qt/ts/src/editor.ts @@ -274,10 +274,7 @@ function enableButtons() { // disable the buttons if a field is not currently focused function maybeDisableButtons() { - if ( - !document.activeElement || - document.activeElement.className !== "field" - ) { + if (!document.activeElement || document.activeElement.className !== "field") { disableButtons(); } else { enableButtons(); diff --git a/qt/ts/src/reviewer.ts b/qt/ts/src/reviewer.ts index 3cf2bc41d..257c6e853 100644 --- a/qt/ts/src/reviewer.ts +++ b/qt/ts/src/reviewer.ts @@ -41,10 +41,8 @@ function _updateQA(html, fadeTime, onupdate, onshown) { } catch (err) { qa.html( ( - `Invalid HTML on card: ${String(err).substring( - 0, - 2000 - )}\n` + String(err.stack).substring(0, 2000) + `Invalid HTML on card: ${String(err).substring(0, 2000)}\n` + + String(err.stack).substring(0, 2000) ).replace(/\n/g, "
") ); }