From b822356c03aafcc61a9359b6a582dd794a4f926c Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 20 Sep 2019 14:23:41 +0200 Subject: [PATCH] Enable a couple of `return` related ESLint rules Please find additional details at: - https://eslint.org/docs/rules/no-return-await - https://eslint.org/docs/rules/no-useless-return --- .eslintrc | 2 ++ web/pdf_print_service.js | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 9f7a7b450..f7c52f09d 100644 --- a/.eslintrc +++ b/.eslintrc @@ -87,6 +87,7 @@ "no-octal-escape": "error", "no-octal": "error", "no-redeclare": "error", + "no-return-await": "error", "no-self-assign": "error", "no-self-compare": "error", "no-throw-literal": "error", @@ -95,6 +96,7 @@ "no-useless-call": "error", "no-useless-catch": "error", "no-useless-concat": "error", + "no-useless-return": "error", "prefer-promise-reject-errors": "error", "wrap-iife": ["error", "any"], "yoda": ["error", "never", { diff --git a/web/pdf_print_service.js b/web/pdf_print_service.js index 7b0e51285..d6b9758d9 100644 --- a/web/pdf_print_service.js +++ b/web/pdf_print_service.js @@ -292,7 +292,6 @@ window.addEventListener('keydown', function(event) { } else { event.stopPropagation(); } - return; } }, true); if (hasAttachEvent) {