diff --git a/tabby-core/src/api/platform.ts b/tabby-core/src/api/platform.ts index 2b8944665b..834f362219 100644 --- a/tabby-core/src/api/platform.ts +++ b/tabby-core/src/api/platform.ts @@ -90,19 +90,19 @@ export interface FileUploadOptions { export class DirectoryUpload { private childrens: (FileUpload|DirectoryUpload)[] = [] - constructor(private name = '') { + constructor (private name = '') { // Just set name for now. } - getName () { + getName (): string { return this.name } - getChildrens () { + getChildrens (): (FileUpload|DirectoryUpload)[] { return this.childrens } - pushChildren (item: FileUpload|DirectoryUpload) { + pushChildren (item: FileUpload|DirectoryUpload): void { this.childrens.push(item) } } diff --git a/tabby-core/src/directives/dropZone.directive.ts b/tabby-core/src/directives/dropZone.directive.ts index 11afeea80e..64632fbc98 100644 --- a/tabby-core/src/directives/dropZone.directive.ts +++ b/tabby-core/src/directives/dropZone.directive.ts @@ -29,7 +29,7 @@ export class DropZoneDirective implements AfterViewInit { }) this.el.nativeElement.addEventListener('drop', async (event: DragEvent) => { this.removeHint() - this.transfer.emit(await this.platform.startUploadFromDragEvent(event, true)) + this.transfer.emit(await this.platform.startUploadFromDragEvent(event, true)) }) this.el.nativeElement.addEventListener('dragleave', () => { this.removeHint() diff --git a/tabby-electron/src/services/platform.service.ts b/tabby-electron/src/services/platform.service.ts index 78d5173d6d..26668392fc 100644 --- a/tabby-electron/src/services/platform.service.ts +++ b/tabby-electron/src/services/platform.service.ts @@ -54,7 +54,7 @@ export class ElectronPlatformService extends PlatformService { if (item.isDirectory()) { root.pushChildren(await this.getAllFiles(path.join(dir, item.name), new DirectoryUpload(item.name))) } else { - let file = new ElectronFileUpload(path.join(dir, item.name), this.electron) + const file = new ElectronFileUpload(path.join(dir, item.name), this.electron) root.pushChildren(file) await wrapPromise(this.zone, file.open()) this.fileTransferStarted.next(file) @@ -248,8 +248,8 @@ export class ElectronPlatformService extends PlatformService { paths = result.filePaths } - let root = new DirectoryUpload() - root.pushChildren(await this.getAllFiles(paths[0].split(path.sep).join(path.posix.sep),new DirectoryUpload(path.basename(paths[0])))) + const root = new DirectoryUpload() + root.pushChildren(await this.getAllFiles(paths[0].split(path.sep).join(path.posix.sep), new DirectoryUpload(path.basename(paths[0])))) return root } diff --git a/tabby-ssh/src/components/sftpPanel.component.ts b/tabby-ssh/src/components/sftpPanel.component.ts index 336ab0d20e..38625c0fca 100644 --- a/tabby-ssh/src/components/sftpPanel.component.ts +++ b/tabby-ssh/src/components/sftpPanel.component.ts @@ -194,7 +194,7 @@ export class SFTPPanelComponent { } catch { // Intentionally ignoring errors from making duplicate dirs. } - await this.uploadOneFolder(t, path.posix.join(accumPath,t.getName())) + await this.uploadOneFolder(t, path.posix.join(accumPath, t.getName())) } else { await this.sftp.upload(path.posix.join(this.path, accumPath, t.getName()), t) } diff --git a/tabby-web/src/platform.ts b/tabby-web/src/platform.ts index aa4c46b5a0..b64388f961 100644 --- a/tabby-web/src/platform.ts +++ b/tabby-web/src/platform.ts @@ -135,7 +135,7 @@ export class WebPlatformService extends PlatformService { }) } - async startUploadDirectory (paths?: string[]): Promise { + async startUploadDirectory (_paths?: string[]): Promise { return new DirectoryUpload() }