GUI: Added ESLint to gulp tasks. ONOS-6521
Commented out gulp tasks making this change uneffective
Fixed an error in the build script

Change-Id: I4f4f9762aa1a66304aa74b3ab208095b9c1d4515
diff --git a/web/gui/src/main/webapp/app/fw/util/ee.js b/web/gui/src/main/webapp/app/fw/util/ee.js
index ef89f9d..6b0f7ce 100644
--- a/web/gui/src/main/webapp/app/fw/util/ee.js
+++ b/web/gui/src/main/webapp/app/fw/util/ee.js
@@ -39,7 +39,7 @@
         'fmfv',
         'hwdoc',
         'acxefcsdgt',
-        'pmmn'
+        'pmmn',
         // Add more beans...
     ];
 
@@ -56,7 +56,7 @@
             i;
 
         for (i = 0; i<n; i+=2)
-            w.push(fcc(Number(d.slice(i, i+2))));
+            { w.push(fcc(Number(d.slice(i, i+2)))); }
 
         return fs.eecode(h, w.join(''));
     }
@@ -98,7 +98,7 @@
 
             return {
                 genMap: genMap,
-                cluck: cluck
-            }
+                cluck: cluck,
+            };
         }]);
 }());
diff --git a/web/gui/src/main/webapp/app/fw/util/fn.js b/web/gui/src/main/webapp/app/fw/util/fn.js
index e204afc..2a9129a 100644
--- a/web/gui/src/main/webapp/app/fw/util/fn.js
+++ b/web/gui/src/main/webapp/app/fw/util/fn.js
@@ -31,7 +31,7 @@
         cca = String.prototype.charCodeAt;
 
     function _parseDebugFlags(dbgstr) {
-        var bits = dbgstr ? dbgstr.split(",") : [];
+        var bits = dbgstr ? dbgstr.split(',') : [];
         bits.forEach(function (key) {
             debugFlags[key] = true;
         });
@@ -114,7 +114,7 @@
             ow = offW || 0;
         return {
             height: $window.innerHeight - oh,
-            width: $window.innerWidth - ow
+            width: $window.innerWidth - ow,
         };
     }
 
@@ -129,10 +129,10 @@
     function isChrome() {
         var isChromium = $window.chrome,
             vendorName = $window.navigator.vendor,
-            isOpera = $window.navigator.userAgent.indexOf("OPR") > -1;
+            isOpera = $window.navigator.userAgent.indexOf('OPR') > -1;
         return (isChromium !== null &&
         isChromium !== undefined &&
-        vendorName === "Google Inc." &&
+        vendorName === 'Google Inc.' &&
         isOpera == false);
     }
 
@@ -247,7 +247,7 @@
         return {
             o: w,
             d: o.join(''),
-            e: fcc.apply(o, o)
+            e: fcc.apply(o, o),
         };
     }
 
@@ -301,7 +301,7 @@
                 np = c.p[q];
                 x = 1;
             }
-            return { p: np, s: c.s }
+            return { p: np, s: c.s };
         }
 
         function probe(c) {
@@ -309,12 +309,12 @@
                 k = Object.keys(c.p).length,
                 np = c.p[q];
 
-            t.push({ q:q, k:k, p:c.p });
+            t.push({ q: q, k: k, p: c.p });
             if (!np) {
                 t = [];
                 return { s: [] };
             }
-            return { p: np, s: c.s }
+            return { p: np, s: c.s };
         }
 
         function insert() {
@@ -382,7 +382,7 @@
 
     var hasOwn = {}.hasOwnProperty;
 
-    function classNames () {
+    function classNames() {
         var classes = [];
 
         for (var i = 0; i < arguments.length; i++) {
@@ -453,7 +453,7 @@
         while ((match = matcher.exec(html)) !== null) {
             matches.push({
                 full: match[0],
-                name: match[1]
+                name: match[1],
                 // NOTE: ignoring attributes {match[2].split(' ')} for now
             });
         }
@@ -527,7 +527,7 @@
                 trieLookup: trieLookup,
                 classNames: classNames,
                 extend: extend,
-                sanitize: sanitize
+                sanitize: sanitize,
             };
     }]);
 
diff --git a/web/gui/src/main/webapp/app/fw/util/keys.js b/web/gui/src/main/webapp/app/fw/util/keys.js
index 3c9e660..45ba410 100644
--- a/web/gui/src/main/webapp/app/fw/util/keys.js
+++ b/web/gui/src/main/webapp/app/fw/util/keys.js
@@ -21,7 +21,7 @@
     'use strict';
 
     // references to injected services
-    var $log, $timeout, fs, ts, ns, ee, qhs, ls;
+    var $log, fs, ts, ns, ee, qhs, ls;
 
     // internal state
     var enabled = true,
@@ -32,7 +32,7 @@
             dialogKeys: {},
             viewKeys: {},
             viewFn: null,
-            viewGestures: []
+            viewGestures: [],
         },
         seq = {},
         matching = false,
@@ -96,7 +96,7 @@
 
     var textFieldDoesNotBlock = {
         enter: 1,
-        esc: 1
+        esc: 1,
     };
 
     function textFieldInput() {
@@ -134,7 +134,7 @@
             vk = kh.viewKeys[key],
             kl = fs.isF(kh.viewKeys._keyListener),
             vcb = fs.isF(vk) || (fs.isA(vk) && fs.isF(vk[0])) || fs.isF(kh.viewFn),
-            token = 'keyev';    // indicate this was a key-pressed event
+            token = 'keyev'; // indicate this was a key-pressed event
 
         event.stopPropagation();
 
@@ -185,7 +185,7 @@
                 backSlash: [quickHelp, qhlion_show_hide],
                 slash: [quickHelp, qhlion_show_hide],
                 esc: [escapeKey, qhlion_hint_esc],
-                T: [toggleTheme, qhlion_hint_t]
+                T: [toggleTheme, qhlion_hint_t],
             },
             globalFormat: ['backSlash', 'slash', 'esc', 'T'],
 
@@ -194,8 +194,8 @@
             maskedKeys: {
                 slash: 1,
                 backSlash: 1,
-                T: 1
-            }
+                T: 1,
+            },
         });
     }
 
@@ -244,7 +244,7 @@
     }
 
     function unexParam(fname, x) {
-        $log.warn(fname, ": unexpected parameter-- ", x);
+        $log.warn(fname, ': unexpected parameter-- ', x);
     }
 
     function setKeyBindings(keyArg) {
@@ -273,7 +273,7 @@
             globalKeys: gkeys,
             maskedKeys: masked,
             viewKeys: vkeys,
-            viewFunction: vfn
+            viewFunction: vfn,
         };
     }
 
@@ -318,12 +318,11 @@
 
     angular.module('onosUtil')
     .factory('KeyService',
-        ['$log', '$timeout', 'FnService', 'ThemeService', 'NavService',
+        ['$log', 'FnService', 'ThemeService', 'NavService',
             'EeService', 'LionService',
 
-        function (_$log_, _$timeout_, _fs_, _ts_, _ns_, _ee_, _ls_) {
+        function (_$log_, _fs_, _ts_, _ns_, _ee_, _ls_) {
             $log = _$log_;
-            $timeout = _$timeout_;
             fs = _fs_;
             ts = _ts_;
             ns = _ns_;
@@ -372,7 +371,7 @@
                 enableGlobalKeys: function (b) {
                     globalEnabled = b;
                 },
-                checkNotGlobal: checkNotGlobal
+                checkNotGlobal: checkNotGlobal,
             };
     }]);
 
diff --git a/web/gui/src/main/webapp/app/fw/util/lion.js b/web/gui/src/main/webapp/app/fw/util/lion.js
index a8bb7c8..387c95b 100644
--- a/web/gui/src/main/webapp/app/fw/util/lion.js
+++ b/web/gui/src/main/webapp/app/fw/util/lion.js
@@ -22,11 +22,11 @@
     'use strict';
 
     // injected services
-    var $log, fs, wss;
+    var $log, wss;
 
     // private state
     var handlers = {
-            uberlion: uberlion
+            uberlion: uberlion,
         },
         ubercache = {};
 
@@ -65,16 +65,15 @@
     }
 
     angular.module('onosUtil')
-        .factory('LionService', ['$log', 'FnService', 'WebSocketService',
+        .factory('LionService', ['$log', 'WebSocketService',
 
-        function (_$log_, _fs_, _wss_) {
+        function (_$log_, _wss_) {
             $log = _$log_;
-            fs = _fs_;
             wss = _wss_;
 
             return {
                 init: init,
-                bundle: bundle
+                bundle: bundle,
             };
         }]);
 }());
diff --git a/web/gui/src/main/webapp/app/fw/util/prefs.js b/web/gui/src/main/webapp/app/fw/util/prefs.js
index 08bc6f6..fe4201d 100644
--- a/web/gui/src/main/webapp/app/fw/util/prefs.js
+++ b/web/gui/src/main/webapp/app/fw/util/prefs.js
@@ -21,10 +21,10 @@
     'use strict';
 
     // injected refs
-    var $log, fs, wss;
+    var fs, wss;
 
     // internal state
-    var cache = {}, 
+    var cache = {},
         listeners = [];
 
     // returns the preference settings for the specified key
@@ -98,26 +98,25 @@
     }
 
     function removeListener(listener) {
-        listeners = listeners.filter(function(obj) { return obj === listener; });
+        listeners = listeners.filter(function (obj) { return obj === listener; });
     }
 
     angular.module('onosUtil')
-    .factory('PrefsService', ['$log', 'FnService', 'WebSocketService',
-        function (_$log_, _fs_, _wss_) {
-            $log = _$log_;
+    .factory('PrefsService', ['FnService', 'WebSocketService',
+        function (_fs_, _wss_) {
             fs = _fs_;
             wss = _wss_;
 
             try {
                 cache = angular.isDefined(userPrefs) ? userPrefs : {};
             }
-            catch(e){
+            catch (e) {
                 // browser throws error for non-existing globals
-                cache = {}
+                cache = {};
             }
 
             wss.bindHandlers({
-                updatePrefs: updatePrefs
+                updatePrefs: updatePrefs,
             });
 
             return {
@@ -126,7 +125,7 @@
                 setPrefs: setPrefs,
                 mergePrefs: mergePrefs,
                 addListener: addListener,
-                removeListener: removeListener
+                removeListener: removeListener,
             };
         }]);
 
diff --git a/web/gui/src/main/webapp/app/fw/util/random.js b/web/gui/src/main/webapp/app/fw/util/random.js
index 4c773dc..04063d0 100644
--- a/web/gui/src/main/webapp/app/fw/util/random.js
+++ b/web/gui/src/main/webapp/app/fw/util/random.js
@@ -20,8 +20,6 @@
 (function () {
     'use strict';
 
-    var $log, fs;
-
     var halfRoot2 = 0.7071;
 
     // given some value, s, returns an integer between -s/2 and s/2
@@ -39,13 +37,10 @@
     angular.module('onosUtil')
         .factory('RandomService', ['$log', 'FnService',
 
-        function (_$log_, _fs_) {
-            $log = _$log_;
-            fs = _fs_;
-
+        function () {
             return {
                 spread: spread,
-                randDim: randDim
+                randDim: randDim,
             };
         }]);
 }());
diff --git a/web/gui/src/main/webapp/app/fw/util/theme.js b/web/gui/src/main/webapp/app/fw/util/theme.js
index 66e1c41..db03701 100644
--- a/web/gui/src/main/webapp/app/fw/util/theme.js
+++ b/web/gui/src/main/webapp/app/fw/util/theme.js
@@ -21,7 +21,7 @@
     'use strict';
 
     // injected refs
-    var $log, fs, ps;
+    var $log, ps;
 
     // configuration
     var themes = ['light', 'dark'],
@@ -36,33 +36,33 @@
         gray1: {
             fill: {
                 light: '#eeeeee',
-                dark: '#222222'
+                dark: '#222222',
             },
             stroke: {
                 light: '#cccccc',
-                dark: '#333333'
-            }
+                dark: '#333333',
+            },
         },
         gold1: {
             fill: {
                 light: '#eeddaa',
-                dark: '#544714'
+                dark: '#544714',
             },
             stroke: {
                 light: '#ffddaa',
-                dark: '#645724'
-            }
+                dark: '#645724',
+            },
         },
         blue1: {
             fill: {
                 light: '#a2b9ee',
-                dark: '#273059'
+                dark: '#273059',
             },
             stroke: {
                 light: '#92a9de',
-                dark: '#273a63'
-            }
-        }
+                dark: '#273a63',
+            },
+        },
     };
 
     function init() {
@@ -109,8 +109,8 @@
             m = 'Theme-Change-(' + w + '): ' + t;
         $log.debug(m);
 
-        listeners.forEach(function (lsnr) { 
-            lsnr({event: 'themeChange', value: t}); 
+        listeners.forEach(function (lsnr) {
+            lsnr({ event: 'themeChange', value: t });
         });
     }
 
@@ -119,7 +119,7 @@
     }
 
     function removeListener(lsnr) {
-        listeners = listeners.filter(function(obj) { return obj !== lsnr; });
+        listeners = listeners.filter(function (obj) { return obj !== lsnr; });
     }
 
     // color = logical color name
@@ -133,10 +133,9 @@
     }
 
     angular.module('onosUtil')
-        .factory('ThemeService', ['$log', 'FnService', 'PrefsService',
-        function (_$log_, _fs_, _ps_) {
+        .factory('ThemeService', ['$log', 'PrefsService',
+        function (_$log_, _ps_) {
             $log = _$log_;
-            fs = _fs_;
             ps = _ps_;
 
             ps.addListener(applyTheme);
@@ -153,7 +152,7 @@
                 toggleTheme: toggleTheme,
                 addListener: addListener,
                 removeListener: removeListener,
-                spriteColor: spriteColor
+                spriteColor: spriteColor,
             };
     }]);