From 6771987cc1e52464cff246f1fe888855e6ff8150 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sat, 31 Oct 2020 13:46:11 +0100 Subject: [PATCH] Use an underscore to mask intentionally unused parameters --- .../Ui/User/Profile/Menu/Item/Abstract.js | 3 +- .../files/js/WoltLabSuite/Core/Upload.js | 18 +++------- .../Ui/User/Profile/Menu/Item/Abstract.ts | 3 +- .../files/ts/WoltLabSuite/Core/Upload.ts | 34 +++++++------------ 4 files changed, 18 insertions(+), 40 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.js index c7b959a751..5e3be39f4c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.js @@ -76,8 +76,7 @@ define(["require", "exports", "tslib", "../../../../../Ajax"], function (require /** * Handles successful Ajax requests. */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _ajaxSuccess(data) { + _ajaxSuccess(_data) { // This should be an abstract method, but cannot be marked as such for backwards compatibility. throw new Error("Implement me!"); } diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Upload.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Upload.js index 8edf1c4a67..c83178089c 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Upload.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Upload.js @@ -136,19 +136,14 @@ define(["require", "exports", "tslib", "./Ajax/Request", "./Core", "./Dom/Change Listener_1.default.trigger(); return uploadId; } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _createFileTableRow(file) { + _createFileTableRow(_file) { // This should be an abstract method, but cannot be marked as such for backwards compatibility. throw new Error("Has to be implemented in subclass."); } /** * Handles a failed file upload. */ - _failure( - /* eslint-disable @typescript-eslint/no-unused-vars */ - uploadId, data, responseText, xhr, requestOptions - /* eslint-enable @typescript-eslint/no-unused-vars */ - ) { + _failure(_uploadId, _data, _responseText, _xhr, _requestOptions) { // This should be an abstract method, but cannot be marked as such for backwards compatibility. return true; } @@ -194,11 +189,7 @@ define(["require", "exports", "tslib", "./Ajax/Request", "./Core", "./Dom/Change /** * Handles a successful file upload. */ - _success( - /* eslint-disable @typescript-eslint/no-unused-vars */ - uploadId, data, responseText, xhr, requestOptions - /* eslint-enable @typescript-eslint/no-unused-vars */ - ) { + _success(_uploadId, _data, _responseText, _xhr, _requestOptions) { // This should be an abstract method, but cannot be marked as such for backwards compatibility. } _upload(event, file, blob) { @@ -255,8 +246,7 @@ define(["require", "exports", "tslib", "./Ajax/Request", "./Core", "./Dom/Change * * @since 5.2 */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars - validateUpload(files) { + validateUpload(_files) { // This should be an abstract method, but cannot be marked as such for backwards compatibility. return true; } diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.ts index 5794b55945..4a3b5bd846 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract.ts @@ -90,8 +90,7 @@ abstract class UiUserProfileMenuItemAbstract implements AjaxCallbackObject { /** * Handles successful Ajax requests. */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars - _ajaxSuccess(data: ResponseData): void { + _ajaxSuccess(_data: ResponseData): void { // This should be an abstract method, but cannot be marked as such for backwards compatibility. throw new Error("Implement me!"); diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Upload.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Upload.ts index b186f57dec..c61df61b0e 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Upload.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Upload.ts @@ -193,8 +193,7 @@ abstract class Upload { return uploadId; } - // eslint-disable-next-line @typescript-eslint/no-unused-vars - protected _createFileTableRow(file: File | FileLikeObject): HTMLTableRowElement { + protected _createFileTableRow(_file: File | FileLikeObject): HTMLTableRowElement { // This should be an abstract method, but cannot be marked as such for backwards compatibility. throw new Error("Has to be implemented in subclass."); @@ -204,15 +203,11 @@ abstract class Upload { * Handles a failed file upload. */ protected _failure( - /* eslint-disable @typescript-eslint/no-unused-vars */ - - uploadId: number, - data: ResponseData, - responseText: string, - xhr: XMLHttpRequest, - requestOptions: RequestOptions - - /* eslint-enable @typescript-eslint/no-unused-vars */ + _uploadId: number, + _data: ResponseData, + _responseText: string, + _xhr: XMLHttpRequest, + _requestOptions: RequestOptions ): boolean { // This should be an abstract method, but cannot be marked as such for backwards compatibility. @@ -267,15 +262,11 @@ abstract class Upload { * Handles a successful file upload. */ protected _success( - /* eslint-disable @typescript-eslint/no-unused-vars */ - - uploadId: number, - data: ResponseData, - responseText: string, - xhr: XMLHttpRequestEventTarget, - requestOptions: RequestOptions - - /* eslint-enable @typescript-eslint/no-unused-vars */ + _uploadId: number, + _data: ResponseData, + _responseText: string, + _xhr: XMLHttpRequestEventTarget, + _requestOptions: RequestOptions ): void { // This should be an abstract method, but cannot be marked as such for backwards compatibility. } @@ -342,8 +333,7 @@ abstract class Upload { * * @since 5.2 */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars - protected validateUpload(files: FileCollection): boolean { + protected validateUpload(_files: FileCollection): boolean { // This should be an abstract method, but cannot be marked as such for backwards compatibility. return true; -- 2.20.1