style: add no-misused-promises rule (#3547)

Co-authored-by: Peng Xiao <pengxiao@outlook.com>
This commit is contained in:
LongYinanandPeng Xiao authored and GitHub committed 2023-08-04 08:08:10 +00:00
1 parent f8e49ee3be
commit 5795020403
19 files changed
+130 -74

No files matched your search

@@ -106,14 +106,15 @@ export const createSQLiteDBDownloadProvider: DocProviderCreator = (
cleanup: () => {
// todo
},
sync: async () => {
sync: () => {
logger.info('connect sqlite download provider', id);
try {
await syncUpdates(rootDoc);
_resolve();
} catch (error) {
_reject(error);
}
syncUpdates(rootDoc)
.then(() => {
_resolve();
})
.catch(error => {
_reject(error);
});
},
};
};