From 7f630b287afddd4fa340a7b3f27e53c35a06e0c3 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Wed, 29 Nov 2023 12:16:20 +0100 Subject: [PATCH] MOBILE-3947 eslint: Unban Function type --- .eslintrc.js | 1 + src/core/features/siteplugins/services/siteplugins-helper.ts | 2 -- src/core/services/file.ts | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 260d9cef7..6007c251e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -47,6 +47,7 @@ const appConfig = { Object: { message: 'Use {} instead.', }, + Function: false, }, }, ], diff --git a/src/core/features/siteplugins/services/siteplugins-helper.ts b/src/core/features/siteplugins/services/siteplugins-helper.ts index 0307eb25a..ab0aa6b2e 100644 --- a/src/core/features/siteplugins/services/siteplugins-helper.ts +++ b/src/core/features/siteplugins/services/siteplugins-helper.ts @@ -613,7 +613,6 @@ export class CoreSitePluginsHelperProvider { for (const property of handlerProperties) { if (property !== 'constructor' && typeof handler[property] === 'function' && typeof jsResult[property] === 'function') { - // eslint-disable-next-line @typescript-eslint/ban-types handler[property] = ( jsResult[property]).bind(handler); } } @@ -837,7 +836,6 @@ export class CoreSitePluginsHelperProvider { for (const property of handlerProperties) { if (property !== 'constructor' && typeof handler[property] === 'function' && typeof jsResult[property] === 'function') { - // eslint-disable-next-line @typescript-eslint/ban-types handler[property] = ( jsResult[property]).bind(handler); } } diff --git a/src/core/services/file.ts b/src/core/services/file.ts index 0fccddc04..4a5e6659b 100644 --- a/src/core/services/file.ts +++ b/src/core/services/file.ts @@ -933,7 +933,6 @@ export class CoreFileProvider { // If destFolder is not set, use same location as ZIP file. We need to use absolute paths (including basePath). destFolder = this.addBasePathIfNeeded(destFolder || CoreMimetypeUtils.removeExtension(path)); - // eslint-disable-next-line @typescript-eslint/ban-types const result = await Zip.unzip(fileEntry.toURL(), destFolder, onProgress as unknown as Function); if (result == -1) {