Skip to content

Commit 3305ad6

Browse files
authored
chore(eslint-config, crud): re-enable no-misused-promises COMPASS-9459 (#7019)
* chore(eslint-config, crud): re-enable no-misused-promises * chore(eslint): fix merge resolution
1 parent 8b85574 commit 3305ad6

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

configs/eslint-config-compass/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const extraTsRules = {
3636
'@typescript-eslint/no-duplicate-type-constituents': 'warn',
3737
'@typescript-eslint/no-unsafe-declaration-merging': 'warn',
3838
'@typescript-eslint/no-unsafe-enum-comparison': 'warn',
39-
'@typescript-eslint/no-misused-promises': 'warn',
4039
};
4140

4241
const tsRules = {

packages/compass-crud/src/components/document.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ const Document = (props: DocumentProps) => {
3737
<ReadonlyDocument
3838
doc={doc}
3939
copyToClipboard={copyToClipboard}
40-
openInsertDocumentDialog={openInsertDocumentDialog}
40+
openInsertDocumentDialog={(doc, cloned) => {
41+
void openInsertDocumentDialog?.(doc, cloned);
42+
}}
4143
/>
4244
);
4345
}

packages/compass-crud/src/stores/crud-store.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ export type CrudActions = {
8989
rowIndex: number;
9090
}
9191
): void;
92-
updateDocument(doc: Document): void;
93-
removeDocument(doc: Document): void;
94-
replaceDocument(doc: Document): void;
95-
openInsertDocumentDialog(doc: BSONObject, cloned: boolean): void;
92+
updateDocument(doc: Document): Promise<void>;
93+
removeDocument(doc: Document): Promise<void>;
94+
replaceDocument(doc: Document): Promise<void>;
95+
openInsertDocumentDialog(doc: BSONObject, cloned: boolean): Promise<void>;
9696
copyToClipboard(doc: Document): void; //XXX
9797
openBulkDeleteDialog(): void;
98-
runBulkUpdate(): void;
98+
runBulkUpdate(): Promise<void>;
9999
closeBulkDeleteDialog(): void;
100-
runBulkDelete(): void;
100+
runBulkDelete(): Promise<void>;
101101
openDeleteQueryExportToLanguageDialog(): void;
102102
saveUpdateQuery(name: string): Promise<void>;
103103
};

0 commit comments

Comments
 (0)