MOBILE-3947 eslint: Unban Function type
parent
bb2e08d0fc
commit
7f630b287a
|
@ -47,6 +47,7 @@ const appConfig = {
|
||||||
Object: {
|
Object: {
|
||||||
message: 'Use {} instead.',
|
message: 'Use {} instead.',
|
||||||
},
|
},
|
||||||
|
Function: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue