Mark floating promises with void

Signed-off-by: Rūdolfs Ošiņš <rudolfs@osins.org>
This commit is contained in:
Rūdolfs Ošiņš
2023-05-29 15:54:00 +02:00
parent 930210da80
commit 37f6cccced
14 changed files with 18 additions and 18 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
const activeRouteStore = router.activeRouteStore;
router.loadFromLocation();
void router.loadFromLocation();
session.initialize();
if (!window.VITEST && !window.PLAYWRIGHT && import.meta.env.PROD) {
+2 -2
View File
@@ -17,7 +17,7 @@
}, 800);
function copyToClipboard(clipboard: string) {
toClipboard(clipboard);
void toClipboard(clipboard);
icon = "checkmark-small";
restoreIcon();
}
@@ -217,7 +217,7 @@
<div
class="disconnect"
on:click={() => {
disconnect();
void disconnect();
closeFocused();
}}>
Disconnect
+1 -1
View File
@@ -47,7 +47,7 @@
} else if (searchResult.type === "projects") {
input = "";
if (searchResult.results.length === 1) {
router.push({
void router.push({
resource: "projects",
params: {
view: { resource: "tree" },
+1 -1
View File
@@ -20,7 +20,7 @@
}, 800);
const copy = () => {
toClipboard(text);
void toClipboard(text);
dispatch("copied");
icon = small ? "checkmark-small" : "checkmark";
restoreIcon();
+1 -1
View File
@@ -16,7 +16,7 @@
}
event.preventDefault();
push(route);
void push(route);
dispatch("afterNavigate");
}
</script>
+1 -1
View File
@@ -42,7 +42,7 @@
if (event.target.matches(".file-link")) {
event.preventDefault();
if ($activeRouteStore.resource === "projects") {
updateProjectRoute({
void updateProjectRoute({
path: utils.canonicalize(
event.target.getAttribute("href"),
$activeRouteStore.params.path ?? "",
+1 -1
View File
@@ -19,7 +19,7 @@
}
event.preventDefault();
updateProjectRoute(projectParams);
void updateProjectRoute(projectParams);
dispatch("click");
}
</script>
+1 -1
View File
@@ -63,7 +63,7 @@
// If we have a line number we should show the raw output.
let showMarkdown = line ? false : isMarkdown;
const toggleMarkdown = () => {
updateProjectRoute({ line: undefined });
void updateProjectRoute({ line: undefined });
showMarkdown = !showMarkdown;
};
</script>
+1 -1
View File
@@ -44,7 +44,7 @@
$: showMoreButton =
!loading && !error && totalCommitCount && history.length < totalCommitCount;
loadHistory();
void loadHistory();
</script>
<style>
+2 -2
View File
@@ -258,7 +258,7 @@
<Textarea
resizable
on:submit={() => {
createComment(commentBody);
void createComment(commentBody);
commentBody = "";
}}
bind:value={commentBody}
@@ -274,7 +274,7 @@
size="small"
disabled={!commentBody}
on:click={() => {
createComment(commentBody);
void createComment(commentBody);
commentBody = "";
}}>
Comment
+1 -1
View File
@@ -74,7 +74,7 @@
$: {
page = 0;
issues = [];
loadIssues(state);
void loadIssues(state);
}
</script>
+1 -1
View File
@@ -76,7 +76,7 @@
$: {
page = 0;
patches = [];
loadPatches(state);
void loadPatches(state);
}
</script>
+2 -2
View File
@@ -87,7 +87,7 @@
if (activeRoute.params.route) {
const { revision, path } = parseRoute(activeRoute.params.route, branches);
updateProjectRoute(
void updateProjectRoute(
{
revision,
path,
@@ -123,7 +123,7 @@
}
function handleIssueCreation({ detail: issueId }: CustomEvent<string>) {
router.push({
void router.push({
resource: "projects",
params: {
id,
+2 -2
View File
@@ -18,7 +18,7 @@
if (isAuthenticated) {
modal.show({ component: AuthenticatedModal, props: {} });
router.push({
void router.push({
resource: "seeds",
params: { hostnamePort: "radicle.local", projectPageIndex: 0 },
});
@@ -33,7 +33,7 @@
],
},
});
router.push({ resource: "home" });
void router.push({ resource: "home" });
}
});
</script>