js: Fix a bunch of indentation issues found by eslint.

This is preparation for enabling an eslint indentation configuration.
90% of these changes are just fixes for indentation errors that have
snuck into the codebase over the years; the others are more
significant reformatting to make eslint happy (that are not otherwise
actually improvements).

The one area that we do not attempt to work on here is the
"switch/case" indentation.
This commit is contained in:
Tim Abbott
2018-05-06 12:43:17 -07:00
parent 4d0e64ee41
commit 7ab8a8e820
68 changed files with 377 additions and 349 deletions

View File

@@ -21,7 +21,7 @@ exports.message = function (response, status_box, cls, type, remove_after) {
// Note we use html() below, since we can rely on our callers escaping HTML
// via i18n.t when interpolating data.
status_box.removeClass(common.status_classes).addClass(cls)
.html(response).stop(true).fadeTo(0, 1);
.html(response).stop(true).fadeTo(0, 1);
if (remove_after) {
setTimeout(function () {
status_box.fadeTo(200, 0);
@@ -31,12 +31,12 @@ exports.message = function (response, status_box, cls, type, remove_after) {
};
function escape(html) {
return html
.toString()
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;');
return html
.toString()
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;')
.replace(/'/g, '&#39;');
}
exports.error = function (response, xhr, status_box, type) {