Handle promise linting (#5488)
This commit is contained in:
@@ -57,7 +57,7 @@ function CollectionLinkChildren({
|
||||
if (!collection) {
|
||||
return;
|
||||
}
|
||||
documents.move(item.id, collection.id, undefined, 0);
|
||||
void documents.move(item.id, collection.id, undefined, 0);
|
||||
},
|
||||
collect: (monitor) => ({
|
||||
isOverReorder: !!monitor.isOver(),
|
||||
|
||||
@@ -36,7 +36,7 @@ function Collections() {
|
||||
] = useDrop({
|
||||
accept: "collection",
|
||||
drop: async (item: DragObject) => {
|
||||
collections.move(
|
||||
void collections.move(
|
||||
item.id,
|
||||
fractionalIndex(null, orderedCollections[0].index)
|
||||
);
|
||||
|
||||
@@ -67,7 +67,7 @@ function InnerDocumentLink(
|
||||
|
||||
React.useEffect(() => {
|
||||
if (isActiveDocument && hasChildDocuments) {
|
||||
fetchChildDocuments(node.id);
|
||||
void fetchChildDocuments(node.id);
|
||||
}
|
||||
}, [fetchChildDocuments, node, hasChildDocuments, isActiveDocument]);
|
||||
|
||||
@@ -115,7 +115,7 @@ function InnerDocumentLink(
|
||||
);
|
||||
|
||||
const handlePrefetch = React.useCallback(() => {
|
||||
prefetchDocument?.(node.id);
|
||||
void prefetchDocument?.(node.id);
|
||||
}, [prefetchDocument, node]);
|
||||
|
||||
const handleTitleChange = React.useCallback(
|
||||
@@ -242,11 +242,11 @@ function InnerDocumentLink(
|
||||
}
|
||||
|
||||
if (expanded) {
|
||||
documents.move(item.id, collection.id, node.id, 0);
|
||||
void documents.move(item.id, collection.id, node.id, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
documents.move(item.id, collection.id, parentId, index + 1);
|
||||
void documents.move(item.id, collection.id, parentId, index + 1);
|
||||
},
|
||||
collect: (monitor) => ({
|
||||
isOverReorder: monitor.isOver(),
|
||||
|
||||
@@ -51,7 +51,7 @@ function DraggableCollectionLink({
|
||||
] = useDrop({
|
||||
accept: "collection",
|
||||
drop: (item: DragObject) => {
|
||||
collections.move(
|
||||
void collections.move(
|
||||
item.id,
|
||||
fractionalIndex(collection.index, belowCollectionIndex)
|
||||
);
|
||||
|
||||
@@ -40,7 +40,7 @@ function Starred() {
|
||||
);
|
||||
|
||||
React.useEffect(() => {
|
||||
fetchResults();
|
||||
void fetchResults();
|
||||
}, []);
|
||||
|
||||
const handleShowMore = async () => {
|
||||
@@ -52,7 +52,7 @@ function Starred() {
|
||||
const [{ isOverReorder, isDraggingAnyStar }, dropToReorder] = useDrop({
|
||||
accept: "star",
|
||||
drop: async (item: { star: Star }) => {
|
||||
item.star.save({
|
||||
void item.star.save({
|
||||
index: fractionalIndex(null, stars.orderedData[0].index),
|
||||
});
|
||||
},
|
||||
|
||||
@@ -90,13 +90,9 @@ function StarredLink({ star }: Props) {
|
||||
}, [star.collectionId, ui.activeCollectionId, locationStateStarred]);
|
||||
|
||||
useEffect(() => {
|
||||
async function load() {
|
||||
if (documentId) {
|
||||
await documents.fetch(documentId);
|
||||
}
|
||||
if (documentId) {
|
||||
void documents.fetch(documentId);
|
||||
}
|
||||
|
||||
load();
|
||||
}, [documentId, documents]);
|
||||
|
||||
const handleDisclosureClick = React.useCallback(
|
||||
@@ -134,7 +130,7 @@ function StarredLink({ star }: Props) {
|
||||
drop: (item: { star: Star }) => {
|
||||
const next = star?.next();
|
||||
|
||||
item.star.save({
|
||||
void item.star.save({
|
||||
index: fractionalIndex(star?.index || null, next?.index || null),
|
||||
});
|
||||
},
|
||||
|
||||
@@ -36,7 +36,7 @@ export default function Version() {
|
||||
}
|
||||
}
|
||||
|
||||
loadReleases();
|
||||
void loadReleases();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user