Enabled eslint:no-shadow

Rule enabled, discovered issues resolved.

Change-Id: I037bb430d69ea5a50a9127278a1eba698868bf25
This commit is contained in:
Michael Krotscheck 2015-03-04 16:08:01 -08:00
parent de7007e606
commit 61922d78cd
4 changed files with 13 additions and 14 deletions

View File

@ -53,7 +53,6 @@
// Rules to be processed. // Rules to be processed.
"no-use-before-define": 0, "no-use-before-define": 0,
"space-infix-ops": 0, "space-infix-ops": 0,
"no-shadow": 0,
// Stylistic // Stylistic
"indent": [2, 4], "indent": [2, 4],

View File

@ -118,7 +118,7 @@ angular.module('sb.admin').controller('ProjectGroupEditController',
idsToDelete.forEach(function (id) { idsToDelete.forEach(function (id) {
// Get a deferred promise... // Get a deferred promise...
var deferred = $q.defer(); var removeProjectDeferred = $q.defer();
// Construct the item. // Construct the item.
var item = new ProjectGroupItem({ var item = new ProjectGroupItem({
@ -128,23 +128,23 @@ angular.module('sb.admin').controller('ProjectGroupEditController',
// Delete the item. // Delete the item.
item.$delete(function (result) { item.$delete(function (result) {
deferred.resolve(result); removeProjectDeferred.resolve(result);
}, },
function (error) { function (error) {
deferred.reject(error); removeProjectDeferred.reject(error);
} }
); );
promises.push(deferred.promise); promises.push(removeProjectDeferred.promise);
}); });
// Intersect current vs. loaded to get a list of project // Intersect current vs. loaded to get a list of project
// reference to delete. // reference to add.
var idsToAdd = ArrayUtil.difference(desiredIds, loadedIds); var idsToAdd = ArrayUtil.difference(desiredIds, loadedIds);
idsToAdd.forEach(function (id) { idsToAdd.forEach(function (id) {
// Get a deferred promise... // Get a deferred promise...
var deferred = $q.defer(); var addProjectDeferred = $q.defer();
// Construct the item. // Construct the item.
var item = new ProjectGroupItem({ var item = new ProjectGroupItem({
@ -154,14 +154,14 @@ angular.module('sb.admin').controller('ProjectGroupEditController',
// Delete the item. // Delete the item.
item.$create(function (result) { item.$create(function (result) {
deferred.resolve(result); addProjectDeferred.resolve(result);
}, },
function (error) { function (error) {
deferred.reject(error); addProjectDeferred.reject(error);
} }
); );
promises.push(deferred.promise); promises.push(addProjectDeferred.promise);
}); });

View File

@ -20,8 +20,8 @@ describe('sb.services', function () {
var module; var module;
var dependencies = []; var dependencies = [];
var hasModule = function (module) { var hasModule = function (moduleName) {
return dependencies.indexOf(module) >= 0; return dependencies.indexOf(moduleName) >= 0;
}; };
beforeEach(function () { beforeEach(function () {

View File

@ -20,8 +20,8 @@ describe('sb.services', function () {
var module; var module;
var dependencies = []; var dependencies = [];
var hasModule = function (module) { var hasModule = function (moduleName) {
return dependencies.indexOf(module) >= 0; return dependencies.indexOf(moduleName) >= 0;
}; };
beforeEach(function () { beforeEach(function () {