You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by co...@apache.org on 2016/07/21 09:34:54 UTC
zeppelin git commit: [Zeppelin-1089] Replace JsHint with Eslint
Repository: zeppelin
Updated Branches:
refs/heads/master 28b478d95 -> 911b4175e
[Zeppelin-1089] Replace JsHint with Eslint
### What is this PR for?
This PR replace JsHint with Eslint, the original configuration was ported from jsHint using [Polyjuice](https://www.npmjs.com/package/polyjuice), then the settings were tuned to match exactly.
For this PR, the goal is not to add new rules, but only to replace the system with the same rules.
### What type of PR is it?
Improvement
### Todos
* [x] - Remove .jshintrc
### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1089
### How should this be tested?
You can simply build the code.
You can try to add an unused variable in the js code to see an error.
### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No
Author: Damien CORNEAU <co...@gmail.com>
Closes #1204 from corneadoug/ZEPPELIN-1089 and squashes the following commits:
6cf1e2a [Damien CORNEAU] fix $ is missing error
e71389d [Damien CORNEAU] remove jshint remnants
e1b389f [Damien CORNEAU] remove .jsintrc
0364ad4 [Damien CORNEAU] Fix eslint for tests
7b1da05 [Damien CORNEAU] Replace JsHint by Eslint
Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/911b4175
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/911b4175
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/911b4175
Branch: refs/heads/master
Commit: 911b4175e451fcbc429df91cd22c2a09f18a5952
Parents: 28b478d
Author: Damien CORNEAU <co...@gmail.com>
Authored: Wed Jul 20 15:00:12 2016 +0900
Committer: Damien CORNEAU <co...@gmail.com>
Committed: Thu Jul 21 18:34:39 2016 +0900
----------------------------------------------------------------------
zeppelin-web/.eslintrc | 36 +++++++++++++++++++
zeppelin-web/.jshintrc | 38 --------------------
zeppelin-web/CONTRIBUTING.md | 6 ++--
zeppelin-web/Gruntfile.js | 18 ++++------
zeppelin-web/package.json | 5 ++-
zeppelin-web/pom.xml | 2 +-
.../src/app/credential/credential.controller.js | 1 -
.../app/interpreter/interpreter.controller.js | 1 -
.../src/app/interpreter/interpreter.filter.js | 1 -
.../src/app/jobmanager/jobmanager.controller.js | 1 -
.../src/app/jobmanager/jobs/job.controller.js | 1 -
.../src/app/notebook/notebook.controller.js | 10 +++---
.../notebook/paragraph/paragraph.controller.js | 24 +++++--------
.../src/app/search/result-list.controller.js | 1 -
.../src/components/saveAs/saveAs.service.js | 4 +--
zeppelin-web/src/index.html | 2 +-
zeppelin-web/test/karma.conf.js | 2 +-
zeppelin-web/test/spec/controllers/main.js | 3 +-
zeppelin-web/test/spec/controllers/notebook.js | 3 +-
zeppelin-web/test/spec/controllers/paragraph.js | 3 +-
20 files changed, 68 insertions(+), 94 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/.eslintrc
----------------------------------------------------------------------
diff --git a/zeppelin-web/.eslintrc b/zeppelin-web/.eslintrc
new file mode 100644
index 0000000..3113073
--- /dev/null
+++ b/zeppelin-web/.eslintrc
@@ -0,0 +1,36 @@
+{
+ "env": {
+ "browser": true,
+ "jasmine": true,
+ "node": true
+ },
+ "globals": {
+ "angular": false,
+ "_": false,
+ "jQuery": false,
+ "hljs": false,
+ "confirm": false,
+ "alert": false,
+ "nv": false,
+ "ace": false,
+ "d3": false,
+ "BootstrapDialog": false,
+ "Handsontable": false,
+ "moment": false
+ },
+ "rules": {
+ "no-bitwise": 2,
+ "camelcase": 2,
+ "curly": 2,
+ "eqeqeq": 2,
+ "wrap-iife": [2, "any"],
+ "no-use-before-define": 0,
+ "new-cap": 2,
+ "no-caller": 2,
+ "quotes": [2, "single"],
+ "no-shadow": 0,
+ "no-undef": 2,
+ "no-unused-vars": [2, { "vars": "local", "args": "none" }],
+ "strict": [2, "global"]
+ }
+}
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/.jshintrc
----------------------------------------------------------------------
diff --git a/zeppelin-web/.jshintrc b/zeppelin-web/.jshintrc
deleted file mode 100644
index 5cfaedd..0000000
--- a/zeppelin-web/.jshintrc
+++ /dev/null
@@ -1,38 +0,0 @@
-{
- "node": true,
- "browser": true,
- "esnext": true,
- "bitwise": true,
- "camelcase": true,
- "curly": true,
- "eqeqeq": true,
- "immed": true,
- "indent": 2,
- "latedef": true,
- "newcap": true,
- "noarg": true,
- "quotmark": "single",
- "shadow": "inner",
- "regexp": true,
- "undef": true,
- "unused": "vars",
- "strict": true,
- "trailing": true,
- "smarttabs": true,
- "jasmine": true,
- "predef": [ "inject" ],
- "globals": {
- "angular": false,
- "_": false,
- "jQuery": false,
- "hljs": false,
- "confirm": false,
- "alert": false,
- "nv": false,
- "ace": false,
- "d3": false,
- "BootstrapDialog": false,
- "Handsontable": false,
- "moment": false
- }
-}
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/CONTRIBUTING.md
----------------------------------------------------------------------
diff --git a/zeppelin-web/CONTRIBUTING.md b/zeppelin-web/CONTRIBUTING.md
index 67bd89f..e9a4312 100644
--- a/zeppelin-web/CONTRIBUTING.md
+++ b/zeppelin-web/CONTRIBUTING.md
@@ -11,7 +11,7 @@ This will launch a Zeppelin WebApplication on port **9000** that will update on
Zeppelin WebApplication is using **AngularJS** as main Framework, and **Grunt** and **Bower** as helpers.
-So you might want to get familiar with it.
+So you might want to get familiar with it.
[Here is a good start](http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/)
(There is obviously plenty more ressources to learn)
@@ -21,7 +21,7 @@ So you might want to get familiar with it.
* We use a 2 spaces indentation
* We use single quotes
-But don't worry, JSHint will make you remember it for the most part.
+But don't worry, Eslint and Jscs will make you remember it for the most part.
We try not to have **JQuery except in directives**, If you want to include a library,
please search for its **angularJS** directive first.
@@ -119,7 +119,7 @@ The file index.html will automatically update with the new bower_component
<br/>
-**Example**: `./bower install angular-nvd3`
+**Example**: `./bower install angular-nvd3`
You should find that line in the index.html file
```
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/Gruntfile.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/Gruntfile.js b/zeppelin-web/Gruntfile.js
index 720baa9..63abc33 100644
--- a/zeppelin-web/Gruntfile.js
+++ b/zeppelin-web/Gruntfile.js
@@ -127,7 +127,7 @@ module.exports = function(grunt) {
'<%= yeoman.app %>/app/**/*.js',
'<%= yeoman.app %>/components/**/*.js'
],
- tasks: ['newer:jshint:all', 'newer:jscs:all'],
+ tasks: ['newer:eslint:all', 'newer:jscs:all'],
options: {
livereload: '<%= connect.options.livereload %>'
}
@@ -140,7 +140,7 @@ module.exports = function(grunt) {
},
jsTest: {
files: ['test/spec/{,*/}*.js'],
- tasks: ['newer:jshint:test', 'newer:jscs:test', 'karma']
+ tasks: ['newer:eslint:test', 'newer:jscs:test', 'karma']
},
styles: {
files: [
@@ -234,13 +234,7 @@ module.exports = function(grunt) {
}
},
- // Make sure code styles are up to par and there are no obvious mistakes
- jshint: {
- options: {
- jshintrc: '.jshintrc',
- reporterOutput: '',
- reporter: require('jshint-stylish')
- },
+ eslint: {
all: {
src: [
'Gruntfile.js',
@@ -250,7 +244,9 @@ module.exports = function(grunt) {
},
test: {
options: {
- jshintrc: 'test/.jshintrc'
+ rules: {
+ 'no-undef': 0
+ }
},
src: ['test/spec/{,*/}*.js']
}
@@ -524,7 +520,7 @@ module.exports = function(grunt) {
grunt.registerTask('build', [
'jscs',
- 'jshint:all',
+ 'eslint',
'htmlhint',
'clean:dist',
'wiredep',
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/package.json
----------------------------------------------------------------------
diff --git a/zeppelin-web/package.json b/zeppelin-web/package.json
index 8bfa0ef..a8e035a 100644
--- a/zeppelin-web/package.json
+++ b/zeppelin-web/package.json
@@ -18,12 +18,13 @@
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-cssmin": "^0.9.0",
"grunt-contrib-htmlmin": "^0.3.0",
- "grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-watch": "^0.6.1",
+ "grunt-eslint": "^18.1.0",
"grunt-filerev": "^0.2.1",
"grunt-goog-webfont-dl": "^0.1.2",
"grunt-htmlhint": "^0.9.13",
+ "grunt-jscs": "^2.1.0",
"grunt-karma": "~0.8.3",
"grunt-newer": "^0.7.0",
"grunt-ng-annotate": "^0.10.0",
@@ -31,8 +32,6 @@
"grunt-svgmin": "^0.4.0",
"grunt-usemin": "^2.1.1",
"grunt-wiredep": "~2.0.0",
- "grunt-jscs": "^2.1.0",
- "jshint-stylish": "^0.2.0",
"karma": "~0.12.23",
"karma-coverage": "^0.5.1",
"karma-jasmine": "~0.1.5",
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/pom.xml
----------------------------------------------------------------------
diff --git a/zeppelin-web/pom.xml b/zeppelin-web/pom.xml
index 5b331c6..8e7f7cd 100644
--- a/zeppelin-web/pom.xml
+++ b/zeppelin-web/pom.xml
@@ -60,7 +60,7 @@
<exclude>.bowerrc</exclude>
<exclude>.editorconfig</exclude>
<exclude>.jscsrc</exclude>
- <exclude>.jshintrc</exclude>
+ <exclude>.eslintrc</exclude>
<exclude>.tmp/**</exclude>
<exclude>**/.settings/*</exclude>
<exclude>**/.classpath</exclude>
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/src/app/credential/credential.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/credential/credential.controller.js b/zeppelin-web/src/app/credential/credential.controller.js
index 58c1c8b..b831805 100644
--- a/zeppelin-web/src/app/credential/credential.controller.js
+++ b/zeppelin-web/src/app/credential/credential.controller.js
@@ -1,4 +1,3 @@
-/* jshint loopfunc: true */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/src/app/interpreter/interpreter.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/interpreter/interpreter.controller.js b/zeppelin-web/src/app/interpreter/interpreter.controller.js
index 17e5fcd..937e31a 100644
--- a/zeppelin-web/src/app/interpreter/interpreter.controller.js
+++ b/zeppelin-web/src/app/interpreter/interpreter.controller.js
@@ -1,4 +1,3 @@
-/* jshint loopfunc: true */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/src/app/interpreter/interpreter.filter.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/interpreter/interpreter.filter.js b/zeppelin-web/src/app/interpreter/interpreter.filter.js
index 8da32af..e225c95 100644
--- a/zeppelin-web/src/app/interpreter/interpreter.filter.js
+++ b/zeppelin-web/src/app/interpreter/interpreter.filter.js
@@ -1,4 +1,3 @@
-/* jshint loopfunc: true */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/src/app/jobmanager/jobmanager.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/jobmanager/jobmanager.controller.js b/zeppelin-web/src/app/jobmanager/jobmanager.controller.js
index 8102293..81696b5 100644
--- a/zeppelin-web/src/app/jobmanager/jobmanager.controller.js
+++ b/zeppelin-web/src/app/jobmanager/jobmanager.controller.js
@@ -1,4 +1,3 @@
-/*jshint loopfunc: true, unused:false */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/src/app/jobmanager/jobs/job.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/jobmanager/jobs/job.controller.js b/zeppelin-web/src/app/jobmanager/jobs/job.controller.js
index 331d8e0..cbbf986 100644
--- a/zeppelin-web/src/app/jobmanager/jobs/job.controller.js
+++ b/zeppelin-web/src/app/jobmanager/jobs/job.controller.js
@@ -1,4 +1,3 @@
-/*jshint loopfunc: true, unused:false */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/src/app/notebook/notebook.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/notebook.controller.js b/zeppelin-web/src/app/notebook/notebook.controller.js
index 4727650..81b9c32 100644
--- a/zeppelin-web/src/app/notebook/notebook.controller.js
+++ b/zeppelin-web/src/app/notebook/notebook.controller.js
@@ -1,5 +1,3 @@
-/* jshint loopfunc: true */
-/* global $: false */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +15,7 @@
angular.module('zeppelinWebApp').controller('NotebookCtrl', function($scope, $route, $routeParams, $location,
$rootScope, $http, websocketMsgSrv,
- baseUrlSrv, $timeout, SaveAsService) {
+ baseUrlSrv, $timeout, saveAsService) {
$scope.note = null;
$scope.showEditor = false;
$scope.editorToggled = false;
@@ -77,12 +75,12 @@ angular.module('zeppelinWebApp').controller('NotebookCtrl', function($scope, $ro
setTimeout(
function() {
var routeParams = currentRoute.params;
- var $id = $('#' + routeParams.paragraph + '_container');
+ var $id = angular.element('#' + routeParams.paragraph + '_container');
if ($id.length > 0) {
// adjust for navbar
var top = $id.offset().top - 103;
- $('html, body').scrollTo({top: top, left: 0});
+ angular.element('html, body').scrollTo({top: top, left: 0});
}
// force notebook reload on user change
@@ -142,7 +140,7 @@ angular.module('zeppelinWebApp').controller('NotebookCtrl', function($scope, $ro
//Export notebook
$scope.exportNotebook = function() {
var jsonContent = JSON.stringify($scope.note);
- SaveAsService.SaveAs(jsonContent, $scope.note.name, 'json');
+ saveAsService.saveAs(jsonContent, $scope.note.name, 'json');
};
//Clone note
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
index fcf609e..1d672e7 100644
--- a/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
+++ b/zeppelin-web/src/app/notebook/paragraph/paragraph.controller.js
@@ -1,4 +1,3 @@
-/*jshint loopfunc: true, unused:false */
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +16,7 @@
angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $rootScope, $route, $window,
$routeParams, $location, $timeout, $compile,
$http, websocketMsgSrv, baseUrlSrv, ngToast,
- SaveAsService) {
+ saveAsService) {
var ANGULAR_FUNCTION_OBJECT_NAME_PREFIX = '_Z_ANGULAR_FUNC_';
$scope.parentNote = null;
$scope.paragraph = null;
@@ -774,10 +773,6 @@ angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r
bodyEl.scrollTo(scrollTargetPos, {axis: 'y', interrupt: true, duration: 100});
};
- var setEditorHeight = function(id, height) {
- angular.element('#' + id).height(height.toString() + 'px');
- };
-
$scope.getEditorValue = function() {
return $scope.editor.getValue();
};
@@ -1101,12 +1096,12 @@ angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r
} catch (ignoreErr) {
}
- var chartEl = d3.select('#p' + $scope.paragraph.id + '_' + type + ' svg')
- .attr('height', $scope.paragraph.config.graph.height)
- .datum(d3g)
- .transition()
- .duration(animationDuration)
- .call($scope.chart[type]);
+ d3.select('#p' + $scope.paragraph.id + '_' + type + ' svg')
+ .attr('height', $scope.paragraph.config.graph.height)
+ .datum(d3g)
+ .transition()
+ .duration(animationDuration)
+ .call($scope.chart[type]);
d3.select('#p' + $scope.paragraph.id + '_' + type + ' svg').style.height = height + 'px';
nv.utils.windowResize($scope.chart[type].update);
};
@@ -1313,7 +1308,6 @@ angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r
for (var i = 0; i < data.rows.length; i++) {
var row = data.rows[i];
- var newRow = {};
var s = schema;
var p = rows;
@@ -1845,7 +1839,6 @@ angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r
};
$scope.exportToDSV = function(delimiter) {
- var data = $scope.paragraph.result;
var dsv = '';
for (var titleIndex in $scope.paragraph.result.columnNames) {
dsv += $scope.paragraph.result.columnNames[titleIndex].name + delimiter;
@@ -1865,7 +1858,7 @@ angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r
} else if (delimiter === ',') {
extension = 'csv';
}
- SaveAsService.SaveAs(dsv, 'data', extension);
+ saveAsService.saveAs(dsv, 'data', extension);
};
// Helium ---------------------------------------------
@@ -1877,7 +1870,6 @@ angular.module('zeppelinWebApp').controller('ParagraphCtrl', function($scope, $r
$scope.suggestion = {};
$scope.switchApp = function(appId) {
- var app = _.find($scope.apps, {id: appId});
var config = $scope.paragraph.config;
var settings = $scope.paragraph.settings;
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/src/app/search/result-list.controller.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/app/search/result-list.controller.js b/zeppelin-web/src/app/search/result-list.controller.js
index 807f4dc..cc07a99 100644
--- a/zeppelin-web/src/app/search/result-list.controller.js
+++ b/zeppelin-web/src/app/search/result-list.controller.js
@@ -1,4 +1,3 @@
-/* jshint loopfunc: true */
/*
* Licensed under the Apache License, Version 2.0 (the 'License');
* you may not use this file except in compliance with the License.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/src/components/saveAs/saveAs.service.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/components/saveAs/saveAs.service.js b/zeppelin-web/src/components/saveAs/saveAs.service.js
index 8164edb..83f25e7 100644
--- a/zeppelin-web/src/components/saveAs/saveAs.service.js
+++ b/zeppelin-web/src/components/saveAs/saveAs.service.js
@@ -13,9 +13,9 @@
*/
'use strict';
-angular.module('zeppelinWebApp').service('SaveAsService', function(browserDetectService) {
+angular.module('zeppelinWebApp').service('saveAsService', function(browserDetectService) {
- this.SaveAs = function(content, filename, extension) {
+ this.saveAs = function(content, filename, extension) {
var BOM = '\uFEFF';
if (browserDetectService.detectIE()) {
angular.element('body').append('<iframe id="SaveAsId" style="display: none"></iframe>');
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/src/index.html
----------------------------------------------------------------------
diff --git a/zeppelin-web/src/index.html b/zeppelin-web/src/index.html
index e599ff7..9fe9489 100644
--- a/zeppelin-web/src/index.html
+++ b/zeppelin-web/src/index.html
@@ -135,7 +135,7 @@ limitations under the License.
<script src="bower_components/angular-xeditable/dist/js/xeditable.js"></script>
<script src="bower_components/highlightjs/highlight.pack.js"></script>
<script src="bower_components/lodash/lodash.js"></script>
- <script src="bower_components/angular-filter/dist/angular-filter.min.js"></script>
+ <script src="bower_components/angular-filter/dist/angular-filter.js"></script>
<script src="bower_components/ngtoast/dist/ngToast.js"></script>
<script src="bower_components/ng-focus-if/focusIf.js"></script>
<script src="bower_components/bootstrap3-dialog/dist/js/bootstrap-dialog.min.js"></script>
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/test/karma.conf.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/test/karma.conf.js b/zeppelin-web/test/karma.conf.js
index 28434ef..778f0f1 100644
--- a/zeppelin-web/test/karma.conf.js
+++ b/zeppelin-web/test/karma.conf.js
@@ -55,7 +55,7 @@ module.exports = function(config) {
'bower_components/angular-xeditable/dist/js/xeditable.js',
'bower_components/highlightjs/highlight.pack.js',
'bower_components/lodash/lodash.js',
- 'bower_components/angular-filter/dist/angular-filter.min.js',
+ 'bower_components/angular-filter/dist/angular-filter.js',
'bower_components/ngtoast/dist/ngToast.js',
'bower_components/ng-focus-if/focusIf.js',
'bower_components/bootstrap3-dialog/dist/js/bootstrap-dialog.min.js',
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/test/spec/controllers/main.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/test/spec/controllers/main.js b/zeppelin-web/test/spec/controllers/main.js
index 7daa613..b211b83 100644
--- a/zeppelin-web/test/spec/controllers/main.js
+++ b/zeppelin-web/test/spec/controllers/main.js
@@ -3,14 +3,13 @@
describe('Controller: MainCtrl', function() {
beforeEach(module('zeppelinWebApp'));
- var MainCtrl;
var scope;
var rootScope;
beforeEach(inject(function($controller, $rootScope) {
rootScope = $rootScope;
scope = $rootScope.$new();
- MainCtrl = $controller('MainCtrl', {
+ $controller('MainCtrl', {
$scope: scope
});
}));
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/test/spec/controllers/notebook.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/test/spec/controllers/notebook.js b/zeppelin-web/test/spec/controllers/notebook.js
index 317a905..77ddfff 100644
--- a/zeppelin-web/test/spec/controllers/notebook.js
+++ b/zeppelin-web/test/spec/controllers/notebook.js
@@ -3,7 +3,6 @@
describe('Controller: NotebookCtrl', function() {
beforeEach(module('zeppelinWebApp'));
- var NotebookCtrl;
var scope;
var websocketMsgSrvMock = {
@@ -24,7 +23,7 @@ describe('Controller: NotebookCtrl', function() {
beforeEach(inject(function($controller, $rootScope) {
scope = $rootScope.$new();
- NotebookCtrl = $controller('NotebookCtrl', {
+ $controller('NotebookCtrl', {
$scope: scope,
websocketMsgSrv: websocketMsgSrvMock,
baseUrlSrv: baseUrlSrvMock
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/911b4175/zeppelin-web/test/spec/controllers/paragraph.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/test/spec/controllers/paragraph.js b/zeppelin-web/test/spec/controllers/paragraph.js
index 31f8dc7..bb483f4 100644
--- a/zeppelin-web/test/spec/controllers/paragraph.js
+++ b/zeppelin-web/test/spec/controllers/paragraph.js
@@ -4,7 +4,6 @@ describe('Controller: ParagraphCtrl', function() {
beforeEach(module('zeppelinWebApp'));
- var ParagraphCtrl;
var scope;
var websocketMsgSrvMock = {};
var paragraphMock = {
@@ -22,7 +21,7 @@ describe('Controller: ParagraphCtrl', function() {
scope = $rootScope.$new();
$rootScope.notebookScope = $rootScope.$new(true, $rootScope);
- ParagraphCtrl = $controller('ParagraphCtrl', {
+ $controller('ParagraphCtrl', {
$scope: scope,
websocketMsgSrv: websocketMsgSrvMock,
$element: {},