Enabled eslint:no-shadow
Rule enabled, discovered issues resolved. Change-Id: I037bb430d69ea5a50a9127278a1eba698868bf25
This commit is contained in:
parent
de7007e606
commit
61922d78cd
@ -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],
|
||||||
|
@ -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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -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 () {
|
||||||
|
@ -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 () {
|
||||||
|
Loading…
Reference in New Issue
Block a user