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.
"no-use-before-define": 0,
"space-infix-ops": 0,
"no-shadow": 0,
// Stylistic
"indent": [2, 4],

View File

@ -118,7 +118,7 @@ angular.module('sb.admin').controller('ProjectGroupEditController',
idsToDelete.forEach(function (id) {
// Get a deferred promise...
var deferred = $q.defer();
var removeProjectDeferred = $q.defer();
// Construct the item.
var item = new ProjectGroupItem({
@ -128,23 +128,23 @@ angular.module('sb.admin').controller('ProjectGroupEditController',
// Delete the item.
item.$delete(function (result) {
deferred.resolve(result);
removeProjectDeferred.resolve(result);
},
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
// reference to delete.
// reference to add.
var idsToAdd = ArrayUtil.difference(desiredIds, loadedIds);
idsToAdd.forEach(function (id) {
// Get a deferred promise...
var deferred = $q.defer();
var addProjectDeferred = $q.defer();
// Construct the item.
var item = new ProjectGroupItem({
@ -154,14 +154,14 @@ angular.module('sb.admin').controller('ProjectGroupEditController',
// Delete the item.
item.$create(function (result) {
deferred.resolve(result);
addProjectDeferred.resolve(result);
},
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 dependencies = [];
var hasModule = function (module) {
return dependencies.indexOf(module) >= 0;
var hasModule = function (moduleName) {
return dependencies.indexOf(moduleName) >= 0;
};
beforeEach(function () {

View File

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