GUI: Added ESLint to gulp tasks
GUI: Linted files
Fixed an error in the build script

JIRA-TASKS: ONOS-6522, ONOS-6521

Change-Id: Ie72abfe6cbe21c8946f219be6193344b67ec6dd1
diff --git a/web/gui/src/main/webapp/app/fw/layer/dialog.js b/web/gui/src/main/webapp/app/fw/layer/dialog.js
index 70f1082..9e9b1f8 100644
--- a/web/gui/src/main/webapp/app/fw/layer/dialog.js
+++ b/web/gui/src/main/webapp/app/fw/layer/dialog.js
@@ -23,12 +23,12 @@
     'use strict';
 
     // injected refs
-    var $log, $window, fs, ps, bns, ks;
+    var $log, fs, ps, ks;
 
     // configuration
     var defaultSettings = {
             width: 300,
-            edge: 'left'
+            edge: 'left',
         };
 
     // internal state
@@ -92,7 +92,7 @@
             appendHeader: hAppend,
             appendBody: bAppend,
             appendFooter: fAppend,
-            destroy: destroy
+            destroy: destroy,
         };
     }
 
@@ -141,7 +141,7 @@
     function _addOk(cb, text, chained) {
         return addButton(cb, text || 'OK', 'enter', chained);
     }
-    
+
     function addOk(cb, text) {
         return _addOk(cb, text, false);
     }
@@ -178,7 +178,7 @@
             addCancel: addCancel,
             bindKeys: function () {
                 ks.dialogKeys(keyBindings);
-            }
+            },
         };
         return dApi;
     }
@@ -207,25 +207,21 @@
 
     angular.module('onosLayer')
     .factory('DialogService',
-        ['$log', '$window', 'FnService', 'PanelService', 'ButtonService',
-            'KeyService',
+        ['$log', 'FnService', 'PanelService', 'KeyService',
 
-        // TODO: for now, $window is not used, but we should provide an option
-            // to center the dialog on the window.
+        // TODO: use $window to provide an option to center the 
+        // dialog on the window.
 
-        function (_$log_, _$window_, _fs_, _ps_, _bns_, _ks_) {
+        function (_$log_, _fs_, _ps_, _ks_) {
             $log = _$log_;
-            $window = _$window_;
             fs = _fs_;
             ps = _ps_;
-            bns = _bns_;
             ks = _ks_;
 
             return {
                 openDialog: openDialog,
                 closeDialog: closeDialog,
-                createDiv: createDiv
+                createDiv: createDiv,
             };
         }]);
-
 }());
diff --git a/web/gui/src/main/webapp/app/fw/layer/flash.js b/web/gui/src/main/webapp/app/fw/layer/flash.js
index b3fa1f8..cbb072f 100644
--- a/web/gui/src/main/webapp/app/fw/layer/flash.js
+++ b/web/gui/src/main/webapp/app/fw/layer/flash.js
@@ -24,12 +24,12 @@
     'use strict';
 
     // injected references
-    var $log, $timeout;
+    var $timeout;
 
     // configuration
     var defaultSettings = {
             fade: 200,
-            showFor: 1200
+            showFor: 1200,
         },
         w = '100%',
         h = 200,
@@ -70,7 +70,7 @@
             svg = flashDiv.append('svg').attr({
                 width: w,
                 height: h,
-                viewBox: vbox
+                viewBox: vbox,
             });
         }
 
@@ -93,7 +93,7 @@
             .append('g')
             .attr({
                 class: 'flashItem',
-                opacity: 0
+                opacity: 0,
             })
             .transition()
             .duration(settings.fade)
@@ -151,9 +151,8 @@
     }
 
     angular.module('onosLayer')
-        .factory('FlashService', ['$log', '$timeout',
-        function (_$log_, _$timeout_) {
-            $log = _$log_;
+        .factory('FlashService', ['$timeout',
+        function (_$timeout_) {
             $timeout = _$timeout_;
 
             function initFlash(opts) {
@@ -166,7 +165,7 @@
                 initFlash: initFlash,
                 flash: flash,
                 enable: enable,
-                tempDiv: tempDiv
+                tempDiv: tempDiv,
             };
         }]);
 
diff --git a/web/gui/src/main/webapp/app/fw/layer/loading.js b/web/gui/src/main/webapp/app/fw/layer/loading.js
index 3c8fd24..699cb39 100644
--- a/web/gui/src/main/webapp/app/fw/layer/loading.js
+++ b/web/gui/src/main/webapp/app/fw/layer/loading.js
@@ -23,7 +23,7 @@
     'use strict';
 
     // injected references
-    var $log, $timeout, ts, fs;
+    var $timeout, ts, fs;
 
     // constants
     var id = 'loading-anim',
@@ -122,10 +122,9 @@
 
     angular.module('onosLayer')
         .factory('LoadingService',
-        ['$log', '$timeout', 'ThemeService', 'FnService', 'WebSocketService',
+        ['$timeout', 'ThemeService', 'FnService', 'WebSocketService',
 
-            function (_$log_, _$timeout_, _ts_, _fs_, wss) {
-            $log = _$log_;
+            function (_$timeout_, _ts_, _fs_, wss) {
             $timeout = _$timeout_;
             ts = _ts_;
             fs = _fs_;
@@ -135,10 +134,10 @@
             var self = {
                 start: start,
                 stop: stop,
-                waiting: waiting
+                waiting: waiting,
             };
             wss._setLoadingDelegate(self);
             return self;
         }]);
 
-}());
\ No newline at end of file
+}());
diff --git a/web/gui/src/main/webapp/app/fw/layer/panel.js b/web/gui/src/main/webapp/app/fw/layer/panel.js
index f2b6bf0..3c4cfb9 100644
--- a/web/gui/src/main/webapp/app/fw/layer/panel.js
+++ b/web/gui/src/main/webapp/app/fw/layer/panel.js
@@ -28,7 +28,7 @@
         margin: 20,
         hideMargin: 20,
         xtnTime: 750,
-        fade: true
+        fade: true,
     };
 
     var panels,
@@ -71,7 +71,7 @@
                 id: id,
                 settings: settings,
                 on: false,
-                el: null
+                el: null,
             },
             api = {
                 show: showPanel,
@@ -84,7 +84,7 @@
                 bbox: panelBBox,
                 isVisible: panelIsVisible,
                 classed: classed,
-                el: panelEl
+                el: panelEl,
             };
 
         p.el = panelLayer.append('div')
@@ -215,7 +215,7 @@
             return {
                 init: init,
                 createPanel: createPanel,
-                destroyPanel: destroyPanel
+                destroyPanel: destroyPanel,
             };
         }]);
 }());
diff --git a/web/gui/src/main/webapp/app/fw/layer/quickhelp.js b/web/gui/src/main/webapp/app/fw/layer/quickhelp.js
index 5ef4369..9755e53 100644
--- a/web/gui/src/main/webapp/app/fw/layer/quickhelp.js
+++ b/web/gui/src/main/webapp/app/fw/layer/quickhelp.js
@@ -27,7 +27,7 @@
 
     // configuration
     var defaultSettings = {
-            fade: 500
+            fade: 500,
         },
         w = '100%',
         h = '80%',
@@ -56,12 +56,12 @@
         leftArrow: 'L-arrow',
         upArrow: 'U-arrow',
         rightArrow: 'R-arrow',
-        downArrow: 'D-arrow'
+        downArrow: 'D-arrow',
     };
 
     // list of needed bindings to use in aggregateData
     var neededBindings = [
-        'globalKeys', 'globalFormat', 'viewKeys', 'viewGestures'
+        'globalKeys', 'globalFormat', 'viewKeys', 'viewGestures',
     ];
 
     // ===========================================
@@ -88,7 +88,7 @@
                 aggKey = el.append('g').attr('visibility', 'hidden'),
                 gcol = el.append('g').attr({
                     'class': cls,
-                    transform: sus.translate(xCount, 0)
+                    transform: sus.translate(xCount, 0),
                 });
 
             c.forEach(function (j) {
@@ -101,12 +101,12 @@
                     gcol.append('text').text(k)
                         .attr({
                             'class': 'key',
-                            y: oy
+                            y: oy,
                         });
                     gcol.append('text').text(v)
                         .attr({
                             'class': 'desc',
-                            y: oy
+                            y: oy,
                         });
                 }
 
@@ -140,7 +140,7 @@
         var entering = rows.enter()
             .append('g')
             .attr({
-                'class': 'qhrow'
+                'class': 'qhrow',
             });
 
         entering.each(function (r, i) {
@@ -169,7 +169,7 @@
         rect.attr({
             width: paneW,
             height: paneH,
-            transform: sus.translate(-paneW/2-pad, 0)
+            transform: sus.translate(-paneW/2-pad, 0),
         });
 
     }
@@ -279,7 +279,7 @@
         pane = svg.append('g')
             .attr({
                 class: 'help',
-                opacity: 0
+                opacity: 0,
             });
 
         rect = pane.append('rect')
@@ -290,7 +290,7 @@
             .attr({
                 class: 'title',
                 dy: '1.2em',
-                transform: sus.translate(-pad,0)
+                transform: sus.translate(-pad, 0),
             });
 
         items = pane.append('g');
@@ -316,7 +316,7 @@
             .attr({
                 width: w,
                 height: h,
-                viewBox: vbox
+                viewBox: vbox,
             });
     }
 
@@ -338,7 +338,7 @@
                 'needed bindings for help panel not provided:',
                 neededBindings
             );
-            return false
+            return false;
         }
         return true;
     }
@@ -387,7 +387,7 @@
             return {
                 initQuickHelp: initQuickHelp,
                 showQuickHelp: showQuickHelp,
-                hideQuickHelp: hideQuickHelp
+                hideQuickHelp: hideQuickHelp,
             };
         }]);
 
diff --git a/web/gui/src/main/webapp/app/fw/layer/veil.js b/web/gui/src/main/webapp/app/fw/layer/veil.js
index c7f5a29..1a8d9c4 100644
--- a/web/gui/src/main/webapp/app/fw/layer/veil.js
+++ b/web/gui/src/main/webapp/app/fw/layer/veil.js
@@ -41,7 +41,7 @@
 
         svg = veil.select('svg').attr({
             width: ww,
-            height: wh
+            height: wh,
         }).style('opacity', 0.2);
 
         gs.addGlyph(svg, 'bird', birdDim, false, [birdCenter, shrink/2]);
@@ -71,7 +71,7 @@
     function lostServer(ctrlName, msg) {
         if ($route.current.$$route.controller === ctrlName) {
             $log.debug('VEIL-service: ', ctrlName);
-            show(msg)
+            show(msg);
         } else {
             $log.debug('VEIL-service: IGNORING ', ctrlName);
         }
@@ -92,7 +92,7 @@
                 init: init,
                 show: show,
                 hide: hide,
-                lostServer: lostServer
+                lostServer: lostServer,
             };
             wss._setVeilDelegate(self);
             return self;