fix: add @typescript-eslint/no-floating-promises rule (#2764)

Co-authored-by: himself65 <himself65@outlook.com>
This commit is contained in:
LongYinanandhimself65 authored and GitHub committed 2023-06-13 06:55:23 +00:00
1 parent bbac03107e
commit 1c8f1a05d0
25 files changed
+342 -239

No files matched your search

+14 -9
View File
@@ -32,15 +32,20 @@ export function definePlugin<ID extends string>(
if (isServer) {
if (serverAdapter) {
serverAdapter.load().then(({ default: adapter }) => {
rootStore.set(affinePluginsAtom, plugins => ({
...plugins,
[definition.id]: {
...basePlugin,
serverAdapter: adapter,
},
}));
});
serverAdapter
.load()
.then(({ default: adapter }) => {
rootStore.set(affinePluginsAtom, plugins => ({
...plugins,
[definition.id]: {
...basePlugin,
serverAdapter: adapter,
},
}));
})
.catch(err => {
console.error(err);
});
}
} else if (isClient) {
if (blockSuiteAdapter) {