Improve some JavaScript issues reported by eslint

This commit is contained in:
Martchus 2021-02-13 17:14:49 +01:00
parent f040418bdd
commit 4efbbde335
10 changed files with 16 additions and 15 deletions

View File

@ -498,7 +498,7 @@ function renderBuildActionDetailsTable(buildActionDetails)
},
resultData: function(value, row) {
switch(value.index) {
case 3: // update info
case 3: { // update info
const formElement = document.createElement('form');
formElement.className = 'update-info-form';
formElement.appendChild(renderTableFromJsonObject({
@ -534,6 +534,7 @@ function renderBuildActionDetailsTable(buildActionDetails)
};
formElement.appendChild(addSelectedInput);
return formElement;
}
case 4: // build preparation info
return renderTableFromJsonObject({
data: value.data,
@ -547,7 +548,7 @@ function renderBuildActionDetailsTable(buildActionDetails)
},
},
});
case 7: // reporitory problems
case 7: { // reporitory problems
const container = document.createElement('div');
container.className = 'repo-problems';
for (const [database, problems] of Object.entries(value.data)) {
@ -578,6 +579,7 @@ function renderBuildActionDetailsTable(buildActionDetails)
container.appendChild(table);
}
return container;
}
default:
return renderStandardTableCell(value.data);
}
@ -821,7 +823,6 @@ function renderOrphanPackage(value, obj, level, row)
package.version,
row.sourceDbs,
);
return document.createTextNode();
}, function(package1, package2) {
return package1.name.localeCompare(package2.name);
});

View File

@ -217,7 +217,7 @@ function renderTextPossiblyElidingTheEnd(value)
element.appendChild(elipses);
element.onclick = function () {
element.removeChild(element.lastChild);
(expaned = !expaned) ? element.appendChild(remainingText) : element.appendChild(elipses);
((expaned = !expaned)) ? element.appendChild(remainingText) : element.appendChild(elipses);
};
return element;
}

View File

@ -75,7 +75,7 @@ function alterFormSelection(form, command)
break;
}
});
};
}
}
function getProperty(object, property, fallback)