MOBILE-3947 eslint: Unban Function type

main
Noel De Martin 2023-11-29 12:16:20 +01:00
parent bb2e08d0fc
commit 7f630b287a
3 changed files with 1 additions and 3 deletions

View File

@ -47,6 +47,7 @@ const appConfig = {
Object: { Object: {
message: 'Use {} instead.', message: 'Use {} instead.',
}, },
Function: false,
}, },
}, },
], ],

View File

@ -613,7 +613,6 @@ export class CoreSitePluginsHelperProvider {
for (const property of handlerProperties) { for (const property of handlerProperties) {
if (property !== 'constructor' && typeof handler[property] === 'function' && if (property !== 'constructor' && typeof handler[property] === 'function' &&
typeof jsResult[property] === 'function') { typeof jsResult[property] === 'function') {
// eslint-disable-next-line @typescript-eslint/ban-types
handler[property] = (<Function> jsResult[property]).bind(handler); handler[property] = (<Function> jsResult[property]).bind(handler);
} }
} }
@ -837,7 +836,6 @@ export class CoreSitePluginsHelperProvider {
for (const property of handlerProperties) { for (const property of handlerProperties) {
if (property !== 'constructor' && typeof handler[property] === 'function' && if (property !== 'constructor' && typeof handler[property] === 'function' &&
typeof jsResult[property] === 'function') { typeof jsResult[property] === 'function') {
// eslint-disable-next-line @typescript-eslint/ban-types
handler[property] = (<Function> jsResult[property]).bind(handler); handler[property] = (<Function> jsResult[property]).bind(handler);
} }
} }

View File

@ -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). // 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)); 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); const result = await Zip.unzip(fileEntry.toURL(), destFolder, onProgress as unknown as Function);
if (result == -1) { if (result == -1) {