Make everything @typescript-eslint/no-empty-function clean
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 30 Oct 2020 11:28:58 +0000 (12:28 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 30 Oct 2020 11:33:41 +0000 (12:33 +0100)
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Confirmation.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Page/JumpTo.js
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Screen.js
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Confirmation.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Page/JumpTo.ts
wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/Screen.ts

index e5ffacd24b448f5f6676c7279694e3a4f39ed5a4..1687354e598a8e8525c76534a2b2e3db60511a17 100644 (file)
@@ -55,7 +55,9 @@ define(["require", "exports", "tslib", "../Core", "../Language", "./Dialog"], fu
             }
             else {
                 if (typeof options.cancel !== "function") {
-                    options.cancel = () => { };
+                    options.cancel = () => {
+                        // Do nothing
+                    };
                 }
                 this.callbackCancel = options.cancel;
                 this.callbackConfirm = options.confirm;
index caf1061cfd1e107882f04c73aa8fa7a4857fa045..2875cc4bec08f77e32b40af64fdf0aba9ecb9b2c 100644 (file)
@@ -23,12 +23,14 @@ define(["require", "exports", "tslib", "../../Language", "../Dialog"], function
             if (!callback) {
                 const redirectUrl = element.dataset.link;
                 if (redirectUrl) {
-                    callback = function (pageNo) {
-                        window.location.href = redirectUrl.replace(/pageNo=%d/, "pageNo=" + pageNo);
+                    callback = (pageNo) => {
+                        window.location.href = redirectUrl.replace(/pageNo=%d/, `pageNo=${pageNo}`);
                     };
                 }
                 else {
-                    callback = function () { };
+                    callback = () => {
+                        // Do nothing.
+                    };
                 }
             }
             else if (typeof callback !== "function") {
index 00ac334de005838b7cba0893f150f0d4e87ffa06..e1ebf600b8ffa5630a182d45a4340e0604fa4168 100644 (file)
@@ -164,7 +164,9 @@ define(["require", "exports", "tslib", "../Core", "../Environment"], function (r
     /**
      * @deprecated 5.4 - This method is a noop.
      */
-    function setDialogContainer(_container) { }
+    function setDialogContainer(_container) {
+        // Do nothing.
+    }
     exports.setDialogContainer = setDialogContainer;
     function _getQueryObject(query) {
         if (typeof query !== "string" || query.trim() === "") {
index 6db16091f459cc468edfa5bfdc7288a5124c07d8..6bb30e04a4e188b5efea626d490c1787db784d52 100644 (file)
@@ -72,7 +72,9 @@ class UiConfirmation implements DialogCallbackObject {
       };
     } else {
       if (typeof options.cancel !== "function") {
-        options.cancel = () => {};
+        options.cancel = () => {
+          // Do nothing
+        };
       }
 
       this.callbackCancel = options.cancel;
index 797a24d070f38939c1d0be0ad100014ad10296c3..bb6d31a8206d92c6623e2e288aba521063a07d40 100644 (file)
@@ -25,11 +25,13 @@ class UiPageJumpTo implements DialogCallbackObject {
     if (!callback) {
       const redirectUrl = element.dataset.link;
       if (redirectUrl) {
-        callback = function (pageNo) {
-          window.location.href = redirectUrl.replace(/pageNo=%d/, "pageNo=" + pageNo);
+        callback = (pageNo) => {
+          window.location.href = redirectUrl.replace(/pageNo=%d/, `pageNo=${pageNo}`);
         };
       } else {
-        callback = function () {};
+        callback = () => {
+          // Do nothing.
+        };
       }
     } else if (typeof callback !== "function") {
       throw new TypeError("Expected a valid function for parameter 'callback'.");
index ea076172b51cacb386d04ef997da5089bdb88c2b..098815ece7e6ce4cd02299e4fc5dbe4215db5cbf 100644 (file)
@@ -180,7 +180,9 @@ export function pageOverlayIsActive(): boolean {
 /**
  * @deprecated 5.4 - This method is a noop.
  */
-export function setDialogContainer(_container: Element): void {}
+export function setDialogContainer(_container: Element): void {
+  // Do nothing.
+}
 
 function _getQueryObject(query: string): MediaQueryData {
   if (typeof (query as any) !== "string" || query.trim() === "") {