From 449169e9e085093d3c1d39a1ea189bcb25c73cfa Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Tue, 4 Feb 2020 16:35:38 +0100 Subject: [PATCH] Revert "eslint --fix: 'expression ? true : false' => '!!expression'" This reverts commit c0759980cccbac53945e7bf58a6b0e25b93f63d8 and also disables linting for the cases involved. --- app/assets/javascripts/controllers/notes/note_utils.js | 3 ++- app/assets/javascripts/directives/views/componentView.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/controllers/notes/note_utils.js b/app/assets/javascripts/controllers/notes/note_utils.js index 2e4a62662..e4459eb9e 100644 --- a/app/assets/javascripts/controllers/notes/note_utils.js +++ b/app/assets/javascripts/controllers/notes/note_utils.js @@ -102,7 +102,8 @@ function stringIsUuid(text) { const matches = text.match( /\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b/ ); - return !!matches; + // eslint-disable-next-line no-unneeded-ternary + return matches ? true : false; } export function sortNotes({ diff --git a/app/assets/javascripts/directives/views/componentView.js b/app/assets/javascripts/directives/views/componentView.js index 811122a55..88a460e75 100644 --- a/app/assets/javascripts/directives/views/componentView.js +++ b/app/assets/javascripts/directives/views/componentView.js @@ -193,7 +193,8 @@ class ComponentViewCtrl { const avoidFlickerTimeout = 7; this.$timeout(() => { this.loading = false; - this.issueLoading = !!desktopError; + // eslint-disable-next-line no-unneeded-ternary + this.issueLoading = desktopError ? true : false; this.onLoad && this.onLoad(this.component); }, avoidFlickerTimeout); }