1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-10-31 00:07:48 +02:00

Added no-floating-promises eslint rule

This commit is contained in:
Laurent Cozic
2020-11-25 14:40:25 +00:00
parent a37f84e988
commit 9b64c1fbdb
45 changed files with 116 additions and 104 deletions

View File

@@ -27,7 +27,7 @@ export default class InteropService_Importer_Md extends InteropService_Importer_
parentFolderId = this.options_.destinationFolder.id;
}
this.importDirectory(sourcePath, parentFolderId);
await this.importDirectory(sourcePath, parentFolderId);
} else {
if (!this.options_.destinationFolder) throw new Error(_('Please specify the notebook where the notes should be imported to.'));
parentFolderId = this.options_.destinationFolder.id;
@@ -52,9 +52,9 @@ export default class InteropService_Importer_Md extends InteropService_Importer_
if (stat.isDirectory()) {
const folderTitle = await Folder.findUniqueItemTitle(basename(stat.path));
const folder = await Folder.save({ title: folderTitle, parent_id: parentFolderId });
this.importDirectory(`${dirPath}/${basename(stat.path)}`, folder.id);
await this.importDirectory(`${dirPath}/${basename(stat.path)}`, folder.id);
} else if (supportedFileExtension.indexOf(fileExtension(stat.path).toLowerCase()) >= 0) {
this.importFile(`${dirPath}/${stat.path}`, parentFolderId);
await this.importFile(`${dirPath}/${stat.path}`, parentFolderId);
}
}
}