From d9dff92feff472a62b3dec15c7298088c2d49bec Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Tue, 8 Aug 2017 14:39:31 +0100 Subject: [PATCH] MDL-59761 eslint: Auto-fix some minor lint warnings --- admin/tool/lp/amd/src/planactions.js | 2 +- blocks/myoverview/amd/src/event_list.js | 2 +- course/amd/src/actions.js | 3 ++- lib/amd/src/templates.js | 4 ++-- .../output/popup/amd/src/notification_area_control_area.js | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/admin/tool/lp/amd/src/planactions.js b/admin/tool/lp/amd/src/planactions.js index be39396e356..44a335d25d6 100644 --- a/admin/tool/lp/amd/src/planactions.js +++ b/admin/tool/lp/amd/src/planactions.js @@ -229,7 +229,7 @@ define(['jquery', notification.confirm( strings[0], // Confirm. strings[1], // Reopen plan X? - strings[2], // reopen. + strings[2], // Reopen. strings[3], // Cancel. function() { self._doReopenPlan(planData); diff --git a/blocks/myoverview/amd/src/event_list.js b/blocks/myoverview/amd/src/event_list.js index 5d1d42d5846..9d96fc5cb7b 100644 --- a/blocks/myoverview/amd/src/event_list.js +++ b/blocks/myoverview/amd/src/event_list.js @@ -369,7 +369,7 @@ define(['jquery', 'core/notification', 'core/templates', // Render the events. return render(root, calendarEvents).then(function(renderCount) { if (renderCount < calendarEvents.length) { - // if the number of events that was rendered is less than + // If the number of events that was rendered is less than // the number we sent for rendering we can assume that there // are no groups to add them in. Since the ordering of the // events is guaranteed it means that any future requests will diff --git a/course/amd/src/actions.js b/course/amd/src/actions.js index d7e7b8456f0..9a2a3c7820a 100644 --- a/course/amd/src/actions.js +++ b/course/amd/src/actions.js @@ -206,7 +206,8 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/str' */ var findNextFocusable = function(mainElement) { var tabables = $("a:visible"); - var isInside = false, foundElement = null; + var isInside = false; + var foundElement = null; tabables.each(function() { if ($.contains(mainElement[0], this)) { isInside = true; diff --git a/lib/amd/src/templates.js b/lib/amd/src/templates.js index 8dae59674c2..27adb6adff6 100644 --- a/lib/amd/src/templates.js +++ b/lib/amd/src/templates.js @@ -438,7 +438,7 @@ define(['core/mustache', treated += content.substring(0, index); content = content.substr(index); strIndex = ''; - walker = 4; // 4 is the length of '[[_s'. + walker = 4; // 4 is the length of '[[_s'. // Walk the characters to manually extract the index of the string from the placeholder. char = content.substr(walker, 1); @@ -455,7 +455,7 @@ define(['core/mustache', strFinal = ''; } treated += strFinal; - content = content.substr(6 + strIndex.length); // 6 is the length of the placeholder without the index: '[[_s]]'. + content = content.substr(6 + strIndex.length); // 6 is the length of the placeholder without the index: '[[_s]]'. // Find the next placeholder. index = content.search(pattern); diff --git a/message/output/popup/amd/src/notification_area_control_area.js b/message/output/popup/amd/src/notification_area_control_area.js index 0d806441f44..27f7568c217 100644 --- a/message/output/popup/amd/src/notification_area_control_area.js +++ b/message/output/popup/amd/src/notification_area_control_area.js @@ -249,7 +249,7 @@ define(['jquery', 'core/templates', 'core/notification', 'core/custom_interactio // If the element isn't in the view window. if (relativeTop > container.innerHeight()) { var height = notificationElement.outerHeight(); - // offset enough to make sure the notification will be in view. + // Offset enough to make sure the notification will be in view. height = height * 4; var scrollTo = position.top - height; container.scrollTop(scrollTo);