From 0b11ddbcfd6dd8c9e8ca9e859f2c010e1447d353 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 8 Apr 2016 16:22:28 -0700 Subject: [PATCH] [Build] Satisfy JSHint Restore globals lost during removal due to merge, remove unused variables and use threequals in new scripts. --- platform/commonUI/general/test/ui/TreeViewSpec.js | 3 ++- platform/core/src/capabilities/PersistenceCapability.js | 1 - platform/entanglement/test/ControlledPromise.js | 1 + platform/entanglement/test/DomainObjectFactory.js | 1 + platform/entanglement/test/services/MockCopyService.js | 1 + platform/entanglement/test/services/MockLinkService.js | 1 + platform/entanglement/test/services/MockMoveService.js | 1 + platform/features/conductor/test/TestTimeConductor.js | 1 + .../features/table/src/controllers/MCTTableController.js | 7 +++---- .../table/src/controllers/TelemetryTableController.js | 2 -- platform/framework/src/FrameworkLayer.js | 1 + platform/framework/src/Main.js | 1 + platform/search/src/services/GenericSearchWorker.js | 1 + platform/search/test/services/GenericSearchWorkerSpec.js | 1 + 14 files changed, 15 insertions(+), 8 deletions(-) diff --git a/platform/commonUI/general/test/ui/TreeViewSpec.js b/platform/commonUI/general/test/ui/TreeViewSpec.js index 7d28ae32a6..e8d114b27a 100644 --- a/platform/commonUI/general/test/ui/TreeViewSpec.js +++ b/platform/commonUI/general/test/ui/TreeViewSpec.js @@ -19,6 +19,7 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global define,describe,beforeEach,jasmine,it,expect*/ define([ '../../src/ui/TreeView', @@ -122,7 +123,7 @@ define([ function waitForCompositionCallback() { var calledBack = false; - testCapabilities.composition.invoke().then(function (c) { + testCapabilities.composition.invoke().then(function () { calledBack = true; }); waitsFor(function () { diff --git a/platform/core/src/capabilities/PersistenceCapability.js b/platform/core/src/capabilities/PersistenceCapability.js index a56e0bb1c9..bf8fbd9961 100644 --- a/platform/core/src/capabilities/PersistenceCapability.js +++ b/platform/core/src/capabilities/PersistenceCapability.js @@ -130,7 +130,6 @@ define( domainObject = this.domainObject, model = domainObject.getModel(), modified = model.modified, - cacheService = this.cacheService, persistenceService = this.persistenceService, persistenceFn = model.persisted !== undefined ? this.persistenceService.updateObject : diff --git a/platform/entanglement/test/ControlledPromise.js b/platform/entanglement/test/ControlledPromise.js index 2f1c99ed84..0b3fcd6cf6 100644 --- a/platform/entanglement/test/ControlledPromise.js +++ b/platform/entanglement/test/ControlledPromise.js @@ -19,6 +19,7 @@ * this source code distribution or the Licensing information page available * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global spyOn*/ define( function () { diff --git a/platform/entanglement/test/DomainObjectFactory.js b/platform/entanglement/test/DomainObjectFactory.js index e9ef03c021..4a11667084 100644 --- a/platform/entanglement/test/DomainObjectFactory.js +++ b/platform/entanglement/test/DomainObjectFactory.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global jasmine*/ define( function () { diff --git a/platform/entanglement/test/services/MockCopyService.js b/platform/entanglement/test/services/MockCopyService.js index 2ba49b53b9..cf986bec7e 100644 --- a/platform/entanglement/test/services/MockCopyService.js +++ b/platform/entanglement/test/services/MockCopyService.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global jasmine*/ define( function () { diff --git a/platform/entanglement/test/services/MockLinkService.js b/platform/entanglement/test/services/MockLinkService.js index 5c583783c8..5345efc86e 100644 --- a/platform/entanglement/test/services/MockLinkService.js +++ b/platform/entanglement/test/services/MockLinkService.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global jasmine*/ define( [ '../ControlledPromise' diff --git a/platform/entanglement/test/services/MockMoveService.js b/platform/entanglement/test/services/MockMoveService.js index 1eccad53c0..d5a290c03f 100644 --- a/platform/entanglement/test/services/MockMoveService.js +++ b/platform/entanglement/test/services/MockMoveService.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global jasmine*/ define( function () { diff --git a/platform/features/conductor/test/TestTimeConductor.js b/platform/features/conductor/test/TestTimeConductor.js index 2a0fe7a7a8..52ffb773d4 100644 --- a/platform/features/conductor/test/TestTimeConductor.js +++ b/platform/features/conductor/test/TestTimeConductor.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global spyOn*/ define( ["../src/TimeConductor"], function (TimeConductor) { diff --git a/platform/features/table/src/controllers/MCTTableController.js b/platform/features/table/src/controllers/MCTTableController.js index ace37bdfe6..34987fc15d 100644 --- a/platform/features/table/src/controllers/MCTTableController.js +++ b/platform/features/table/src/controllers/MCTTableController.js @@ -118,7 +118,7 @@ define( // Do a sequential search here. Only way of finding row is by // object equality, so array is in effect unsorted. indexInDisplayRows = this.$scope.displayRows.indexOf(row); - if (indexInDisplayRows != -1) { + if (indexInDisplayRows !== -1) { this.$scope.displayRows.splice(indexInDisplayRows, 1); this.setVisibleRows(); } @@ -160,7 +160,7 @@ define( if (this.$scope.displayRows.length < this.maxDisplayRows) { //Check whether need to resynchronize visible with display // rows (if data added) - if (this.$scope.visibleRows.length != + if (this.$scope.visibleRows.length !== this.$scope.displayRows.length){ start = 0; end = this.$scope.displayRows.length; @@ -247,8 +247,7 @@ define( * for individual rows. */ MCTTableController.prototype.setElementSizes = function () { - var self = this, - thead = this.element.find('thead'), + var thead = this.element.find('thead'), tbody = this.element.find('tbody'), firstRow = tbody.find('tr'), column = firstRow.find('td'), diff --git a/platform/features/table/src/controllers/TelemetryTableController.js b/platform/features/table/src/controllers/TelemetryTableController.js index 1954488a69..488f8dc171 100644 --- a/platform/features/table/src/controllers/TelemetryTableController.js +++ b/platform/features/table/src/controllers/TelemetryTableController.js @@ -108,8 +108,6 @@ define( only). */ TelemetryTableController.prototype.subscribe = function () { - var self = this; - if (this.handle) { this.handle.unsubscribe(); } diff --git a/platform/framework/src/FrameworkLayer.js b/platform/framework/src/FrameworkLayer.js index 765013adf8..1f8910fe15 100644 --- a/platform/framework/src/FrameworkLayer.js +++ b/platform/framework/src/FrameworkLayer.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global window,requirejs*/ define([ 'require', diff --git a/platform/framework/src/Main.js b/platform/framework/src/Main.js index e1feb8b861..c468e4dbea 100644 --- a/platform/framework/src/Main.js +++ b/platform/framework/src/Main.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global window,requirejs*/ /** * Implements the framework layer, which handles the loading of bundles diff --git a/platform/search/src/services/GenericSearchWorker.js b/platform/search/src/services/GenericSearchWorker.js index 4575ed1b55..a3cd34c2e2 100644 --- a/platform/search/src/services/GenericSearchWorker.js +++ b/platform/search/src/services/GenericSearchWorker.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global self*/ /** * Module defining GenericSearchWorker. Created by shale on 07/21/2015. diff --git a/platform/search/test/services/GenericSearchWorkerSpec.js b/platform/search/test/services/GenericSearchWorkerSpec.js index 22f0d35ac9..952d2a4d58 100644 --- a/platform/search/test/services/GenericSearchWorkerSpec.js +++ b/platform/search/test/services/GenericSearchWorkerSpec.js @@ -20,6 +20,7 @@ * at runtime from the About dialog for additional information. *****************************************************************************/ +/*global require*/ /** * SearchSpec. Created by shale on 07/31/2015.