From 82ea7e6e6e4bc5014c22d7bd778c5bcd521d7bc5 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 21 Jan 2017 17:08:25 +0100 Subject: [PATCH] Enable the `no-unsafe-finally`/`no-octal`/`no-useless-call` ESLint rules http://eslint.org/docs/rules/no-unsafe-finally, there's just one violation which in this case can actually be ignored since there's nothing `return`ed there. http://eslint.org/docs/rules/no-octal, there're no violations in the code-base. http://eslint.org/docs/rules/no-useless-call, there's just one violation that needs to be fixed. --- .eslintrc | 3 +++ src/display/api.js | 2 +- web/pdf_print_service.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.eslintrc b/.eslintrc index 580f636e2..fd7d1b763 100644 --- a/.eslintrc +++ b/.eslintrc @@ -36,6 +36,7 @@ "no-sparse-arrays": "error", "no-unexpected-multiline": "error", "no-unreachable": "error", + "no-unsafe-finally": "error", "no-unsafe-negation": "error", "use-isnan": "error", "valid-typeof": ["error", { "requireStringLiterals": true, }], @@ -60,10 +61,12 @@ "no-new-wrappers": "error", "no-new": "error", "no-octal-escape": "error", + "no-octal": "error", "no-redeclare": "error", "no-self-assign": "error", "no-unused-expressions": "error", "no-unused-labels": "error", + "no-useless-call": "error", "no-useless-concat": "error", "wrap-iife": ["error", "any"], "yoda": ["error", "never", { "onlyEquality": true, }], diff --git a/src/display/api.js b/src/display/api.js index 9c0441a63..287c1e7cb 100644 --- a/src/display/api.js +++ b/src/display/api.js @@ -2108,7 +2108,7 @@ var InternalRenderTask = (function InternalRenderTaskClosure() { return; } if (this.task.onContinue) { - this.task.onContinue.call(this.task, this._scheduleNextBound); + this.task.onContinue(this._scheduleNextBound); } else { this._scheduleNext(); } diff --git a/web/pdf_print_service.js b/web/pdf_print_service.js index 4b078408e..402a4278d 100644 --- a/web/pdf_print_service.js +++ b/web/pdf_print_service.js @@ -237,7 +237,7 @@ if (OverlayManager.active === 'printServiceOverlay') { OverlayManager.close('printServiceOverlay'); } - return; + return; // eslint-disable-line no-unsafe-finally } var activeServiceOnEntry = activeService; activeService.renderPages().then(function () {