From f897f7484c914300942f2e4fdcca36b8389598cb Mon Sep 17 00:00:00 2001 From: MrTimscampi Date: Sun, 17 May 2020 18:17:47 +0200 Subject: [PATCH] Force spacing around operators --- .eslintrc.js | 3 ++- src/components/indicators/indicators.js | 2 +- src/components/remotecontrol/remotecontrol.js | 2 +- src/components/scrollManager.js | 6 +++--- src/controllers/itemdetailpage.js | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 4a3fec9448..8b9a7dea13 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -42,7 +42,8 @@ module.exports = { 'one-var': ["error", "never"], 'quotes': ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": false }], 'semi': ["error"], - 'space-before-blocks': ["error"] + 'space-before-blocks': ["error"], + "space-infix-ops": "error" }, overrides: [ { diff --git a/src/components/indicators/indicators.js b/src/components/indicators/indicators.js index 7bc8ddd4ec..604f480f1d 100644 --- a/src/components/indicators/indicators.js +++ b/src/components/indicators/indicators.js @@ -148,7 +148,7 @@ export function getTypeIndicator(item) { }; const icon = iconT[item.Type]; - return icon ? '
' : ''; + return icon ? '
' : ''; } export function getMissingIndicator(item) { diff --git a/src/components/remotecontrol/remotecontrol.js b/src/components/remotecontrol/remotecontrol.js index a4f25a774c..089915a834 100644 --- a/src/components/remotecontrol/remotecontrol.js +++ b/src/components/remotecontrol/remotecontrol.js @@ -140,7 +140,7 @@ define(['browser', 'datetime', 'backdrop', 'libraryBrowser', 'listView', 'imageL } if (item.SeriesName != null) { var seriesName = item.SeriesName; - if (item.SeriesId !=null) { + if (item.SeriesId != null) { context.querySelector('.nowPlayingSerie').innerHTML = '${seriesName}`; } else { context.querySelector('.nowPlayingSerie').innerHTML = seriesName; diff --git a/src/components/scrollManager.js b/src/components/scrollManager.js index f7bd41ff8b..3b01cf1ad1 100644 --- a/src/components/scrollManager.js +++ b/src/components/scrollManager.js @@ -92,7 +92,7 @@ import layoutManager from 'layoutManager'; * @return {number} Eased value in range [0, 1]. */ function ease(t) { - return t*(2 - t); // easeOutQuad === ease-out + return t * (2 - t); // easeOutQuad === ease-out } /** @@ -402,8 +402,8 @@ import layoutManager from 'layoutManager'; k = ease(k); - const x = ox + dx*k; - const y = oy + dy*k; + const x = ox + dx * k; + const y = oy + dy * k; builtinScroll(xScroller, x, yScroller, y, false); diff --git a/src/controllers/itemdetailpage.js b/src/controllers/itemdetailpage.js index 45342208ea..d9eab0ac4d 100644 --- a/src/controllers/itemdetailpage.js +++ b/src/controllers/itemdetailpage.js @@ -803,9 +803,9 @@ define(['loading', 'appRouter', 'layoutManager', 'connectionManager', 'userSetti } if (editable && url === undefined) { - html += ""; + html += ""; } else if (!editable && url === undefined) { - html += "