[07/12] zeppelin git commit: [ZEPPELIN-3245] checkstyle/eslintrc for zeppelin-web (JavaScript)

2018-02-22 Thread prabhjyotsingh
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ed517a20/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.test.js
--
diff --git 
a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.test.js 
b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.test.js
index 94230de..38d5480 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.test.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.test.js
@@ -1,53 +1,53 @@
-describe('Controller: ParagraphCtrl', function () {
-  beforeEach(angular.mock.module('zeppelinWebApp'))
+describe('Controller: ParagraphCtrl', function() {
+  beforeEach(angular.mock.module('zeppelinWebApp'));
 
-  let scope
-  let websocketMsgSrvMock = {}
+  let scope;
+  let websocketMsgSrvMock = {};
   let paragraphMock = {
 config: {},
 settings: {
-  forms: {}
-}
-  }
+  forms: {},
+},
+  };
   let route = {
 current: {
   pathParams: {
-noteId: 'noteId'
-  }
-}
-  }
+noteId: 'noteId',
+  },
+},
+  };
 
-  beforeEach(inject(function ($controller, $rootScope) {
-scope = $rootScope.$new()
-$rootScope.notebookScope = $rootScope.$new(true, $rootScope)
+  beforeEach(inject(function($controller, $rootScope) {
+scope = $rootScope.$new();
+$rootScope.notebookScope = $rootScope.$new(true, $rootScope);
 
 $controller('ParagraphCtrl', {
   $scope: scope,
   websocketMsgSrv: websocketMsgSrvMock,
   $element: {},
-  $route: route
-})
+  $route: route,
+});
 
-scope.init(paragraphMock)
-  }))
+scope.init(paragraphMock);
+  }));
 
   let functions = ['isRunning', 'getIframeDimensions', 'cancelParagraph', 
'runParagraph', 'saveParagraph',
 'moveUp', 'moveDown', 'insertNew', 'removeParagraph', 'toggleEditor', 
'closeEditor', 'openEditor',
 'closeTable', 'openTable', 'showTitle', 'hideTitle', 'setTitle', 
'showLineNumbers', 'hideLineNumbers',
 'changeColWidth', 'columnWidthClass', 'toggleOutput',
-'aceChanged', 'aceLoaded', 'getEditorValue', 'getProgress', 
'getExecutionTime', 'isResultOutdated']
-
-  functions.forEach(function (fn) {
-it('check for scope functions to be defined : ' + fn, function () {
-  expect(scope[fn]).toBeDefined()
-})
-  })
-
-  it('should have this array of values for "colWidthOption"', function () {
-expect(scope.colWidthOption).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
12])
-  })
-
-  it('should set default value of "paragraphFocused" as false', function () {
-expect(scope.paragraphFocused).toEqual(false)
-  })
-})
+'aceChanged', 'aceLoaded', 'getEditorValue', 'getProgress', 
'getExecutionTime', 'isResultOutdated'];
+
+  functions.forEach(function(fn) {
+it('check for scope functions to be defined : ' + fn, function() {
+  expect(scope[fn]).toBeDefined();
+});
+  });
+
+  it('should have this array of values for "colWidthOption"', function() {
+expect(scope.colWidthOption).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
12]);
+  });
+
+  it('should set default value of "paragraphFocused" as false', function() {
+expect(scope.paragraphFocused).toEqual(false);
+  });
+});

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ed517a20/zeppelin-web/src/app/notebook/paragraph/paragraph.status.js
--
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.status.js 
b/zeppelin-web/src/app/notebook/paragraph/paragraph.status.js
index f839eee..bd70de3 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.status.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.status.js
@@ -19,12 +19,16 @@ export const ParagraphStatus = {
   FINISHED: 'FINISHED',
   ABORT: 'ABORT',
   ERROR: 'ERROR',
-}
+};
 
-export function isParagraphRunning (paragraph) {
-  if (!paragraph) { return false }
-  const status = paragraph.status
-  if (!status) { return false }
+export function isParagraphRunning(paragraph) {
+  if (!paragraph) {
+return false;
+  }
+  const status = paragraph.status;
+  if (!status) {
+return false;
+  }
 
-  return status === ParagraphStatus.PENDING || status === 
ParagraphStatus.RUNNING
+  return status === ParagraphStatus.PENDING || status === 
ParagraphStatus.RUNNING;
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ed517a20/zeppelin-web/src/app/notebook/paragraph/resizable.directive.js
--
diff --git a/zeppelin-web/src/app/notebook/paragraph/resizable.directive.js 
b/zeppelin-web/src/app/notebook/paragraph/resizable.directive.js
index 2893cd5..874f9d8 100644
--- a/zeppelin-web/src/app/notebook/paragraph/resizable.directive.js
+++ b/zeppelin-web/src/app/notebook/paragraph/resizable.directive.js
@@ -12,58 +12,58 @@
  * limitations under the License.
  */
 
-angular.module('zeppelinWebApp').directive('res

[07/12] zeppelin git commit: [ZEPPELIN-3245] checkstyle/eslintrc for zeppelin-web (JavaScript)

2018-02-22 Thread prabhjyotsingh
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ea2c9447/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.test.js
--
diff --git 
a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.test.js 
b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.test.js
index 94230de..38d5480 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.test.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.test.js
@@ -1,53 +1,53 @@
-describe('Controller: ParagraphCtrl', function () {
-  beforeEach(angular.mock.module('zeppelinWebApp'))
+describe('Controller: ParagraphCtrl', function() {
+  beforeEach(angular.mock.module('zeppelinWebApp'));
 
-  let scope
-  let websocketMsgSrvMock = {}
+  let scope;
+  let websocketMsgSrvMock = {};
   let paragraphMock = {
 config: {},
 settings: {
-  forms: {}
-}
-  }
+  forms: {},
+},
+  };
   let route = {
 current: {
   pathParams: {
-noteId: 'noteId'
-  }
-}
-  }
+noteId: 'noteId',
+  },
+},
+  };
 
-  beforeEach(inject(function ($controller, $rootScope) {
-scope = $rootScope.$new()
-$rootScope.notebookScope = $rootScope.$new(true, $rootScope)
+  beforeEach(inject(function($controller, $rootScope) {
+scope = $rootScope.$new();
+$rootScope.notebookScope = $rootScope.$new(true, $rootScope);
 
 $controller('ParagraphCtrl', {
   $scope: scope,
   websocketMsgSrv: websocketMsgSrvMock,
   $element: {},
-  $route: route
-})
+  $route: route,
+});
 
-scope.init(paragraphMock)
-  }))
+scope.init(paragraphMock);
+  }));
 
   let functions = ['isRunning', 'getIframeDimensions', 'cancelParagraph', 
'runParagraph', 'saveParagraph',
 'moveUp', 'moveDown', 'insertNew', 'removeParagraph', 'toggleEditor', 
'closeEditor', 'openEditor',
 'closeTable', 'openTable', 'showTitle', 'hideTitle', 'setTitle', 
'showLineNumbers', 'hideLineNumbers',
 'changeColWidth', 'columnWidthClass', 'toggleOutput',
-'aceChanged', 'aceLoaded', 'getEditorValue', 'getProgress', 
'getExecutionTime', 'isResultOutdated']
-
-  functions.forEach(function (fn) {
-it('check for scope functions to be defined : ' + fn, function () {
-  expect(scope[fn]).toBeDefined()
-})
-  })
-
-  it('should have this array of values for "colWidthOption"', function () {
-expect(scope.colWidthOption).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
12])
-  })
-
-  it('should set default value of "paragraphFocused" as false', function () {
-expect(scope.paragraphFocused).toEqual(false)
-  })
-})
+'aceChanged', 'aceLoaded', 'getEditorValue', 'getProgress', 
'getExecutionTime', 'isResultOutdated'];
+
+  functions.forEach(function(fn) {
+it('check for scope functions to be defined : ' + fn, function() {
+  expect(scope[fn]).toBeDefined();
+});
+  });
+
+  it('should have this array of values for "colWidthOption"', function() {
+expect(scope.colWidthOption).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 
12]);
+  });
+
+  it('should set default value of "paragraphFocused" as false', function() {
+expect(scope.paragraphFocused).toEqual(false);
+  });
+});

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ea2c9447/zeppelin-web/src/app/notebook/paragraph/paragraph.status.js
--
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.status.js 
b/zeppelin-web/src/app/notebook/paragraph/paragraph.status.js
index f839eee..bd70de3 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.status.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.status.js
@@ -19,12 +19,16 @@ export const ParagraphStatus = {
   FINISHED: 'FINISHED',
   ABORT: 'ABORT',
   ERROR: 'ERROR',
-}
+};
 
-export function isParagraphRunning (paragraph) {
-  if (!paragraph) { return false }
-  const status = paragraph.status
-  if (!status) { return false }
+export function isParagraphRunning(paragraph) {
+  if (!paragraph) {
+return false;
+  }
+  const status = paragraph.status;
+  if (!status) {
+return false;
+  }
 
-  return status === ParagraphStatus.PENDING || status === 
ParagraphStatus.RUNNING
+  return status === ParagraphStatus.PENDING || status === 
ParagraphStatus.RUNNING;
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/ea2c9447/zeppelin-web/src/app/notebook/paragraph/resizable.directive.js
--
diff --git a/zeppelin-web/src/app/notebook/paragraph/resizable.directive.js 
b/zeppelin-web/src/app/notebook/paragraph/resizable.directive.js
index 2893cd5..874f9d8 100644
--- a/zeppelin-web/src/app/notebook/paragraph/resizable.directive.js
+++ b/zeppelin-web/src/app/notebook/paragraph/resizable.directive.js
@@ -12,58 +12,58 @@
  * limitations under the License.
  */
 
-angular.module('zeppelinWebApp').directive('res