Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Mark floating promises with `void`
Rūdolfs Ošiņš committed 2 years ago
commit 37f6cccced511e1cc548bc7fa7d6a423feb2d1fc
parent 930210da807b66482e110aaa4663ff4754129835
14 files changed +18 -18
modified src/App.svelte
@@ -21,7 +21,7 @@

  const activeRouteStore = router.activeRouteStore;

-
  router.loadFromLocation();
+
  void router.loadFromLocation();
  session.initialize();

  if (!window.VITEST && !window.PLAYWRIGHT && import.meta.env.PROD) {
modified src/App/Header/Connect.svelte
@@ -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
modified src/App/Header/Search.svelte
@@ -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" },
modified src/components/Clipboard.svelte
@@ -20,7 +20,7 @@
  }, 800);

  const copy = () => {
-
    toClipboard(text);
+
    void toClipboard(text);
    dispatch("copied");
    icon = small ? "checkmark-small" : "checkmark";
    restoreIcon();
modified src/components/Link.svelte
@@ -16,7 +16,7 @@
    }

    event.preventDefault();
-
    push(route);
+
    void push(route);
    dispatch("afterNavigate");
  }
</script>
modified src/components/Markdown.svelte
@@ -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 ?? "",
modified src/components/ProjectLink.svelte
@@ -19,7 +19,7 @@
    }

    event.preventDefault();
-
    updateProjectRoute(projectParams);
+
    void updateProjectRoute(projectParams);
    dispatch("click");
  }
</script>
modified src/views/projects/Blob.svelte
@@ -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>
modified src/views/projects/History.svelte
@@ -44,7 +44,7 @@
  $: showMoreButton =
    !loading && !error && totalCommitCount && history.length < totalCommitCount;

-
  loadHistory();
+
  void loadHistory();
</script>

<style>
modified src/views/projects/Issue.svelte
@@ -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
modified src/views/projects/Issues.svelte
@@ -74,7 +74,7 @@
  $: {
    page = 0;
    issues = [];
-
    loadIssues(state);
+
    void loadIssues(state);
  }
</script>

modified src/views/projects/Patches.svelte
@@ -76,7 +76,7 @@
  $: {
    page = 0;
    patches = [];
-
    loadPatches(state);
+
    void loadPatches(state);
  }
</script>

modified src/views/projects/View.svelte
@@ -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,
modified src/views/session/Index.svelte
@@ -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>