Enable the no-else-return ESLint rule

Using `else` after `return` is not necessary, and can often lead to unnecessarily cluttered code. By using the `no-else-return` rule in ESLint we can avoid this pattern, see http://eslint.org/docs/rules/no-else-return.
This commit is contained in:
Jonas Jenwald 2016-12-16 13:05:33 +01:00
parent 049d7fa277
commit 4046d67fde
19 changed files with 67 additions and 79 deletions

View file

@ -624,7 +624,7 @@ var PDFPageView = (function PDFPageViewClosure() {
onRenderContinue: function (cont) { },
cancel: function () { },
};
} else {
} else { // eslint-disable-line no-else-return
var cancelled = false;
var ensureNotCancelled = function () {
if (cancelled) {