homarr-labs / homarr

Void operators found JS-0098
Anti-pattern
Minor
10 occurrences in this check
29  return (
30    <form
31      onSubmit={form.onSubmit((v) => {
32        void innerProps.onSuccess({33          ...innerProps.category,34          name: v.name,35        });36        actions.closeModal();
37      })}
38    >
Expected 'undefined' and instead saw 'void'
52    <Stack gap="xl">
53      <form
54        onSubmit={form.onSubmit(
55          (v) => void handleSubmit(v),56          (err) => console.log(err),
57        )}
58      >
Expected 'undefined' and instead saw 'void'
54
55  return (
56    <Stack gap="xl">
57      <form onSubmit={form.onSubmit((v) => void handleSubmit(v))}>58        <Stack gap="lg">
59          <TextInput
60            label={t("field.username.label")}
Expected 'undefined' and instead saw 'void'
44          throw response?.error;
45        }
46
47        void router.push("/");48      })
49      .catch((error: Error | string) => {
50        setIsLoading(false);
 83  };
 84
 85  return (
 86    <form onSubmit={form.onSubmit((value) => void handleSubmit(value))}> 87      <Stack>
 88        <TestConnectionNoticeAlert />
 89
 68            title: t("integration.page.create.notification.success.title"),
 69            message: t("integration.page.create.notification.success.message"),
 70          });
 71          void revalidatePathAction("/integrations").then(() => 72            router.push("/integrations"), 73          ); 74        },
 75        onError: () => {
 76          showErrorNotification({
 93  };
 94
 95  return (
 96    <form onSubmit={form.onSubmit((v) => void handleSubmit(v))}> 97      <Stack>
 98        <TestConnectionNoticeAlert />
 99
 78            title: t("integration.page.edit.notification.success.title"),
 79            message: t("integration.page.edit.notification.success.message"),
 80          });
 81          void revalidatePathAction("/integrations").then(() => 82            router.push("/integrations"), 83          ); 84        },
 85        onError: () => {
 86          showErrorNotification({
47                  if (count === 1) {
48                    router.replace("/integrations");
49                  }
50                  void revalidatePathAction("/integrations");51                },
52                onError: () => {
53                  showErrorNotification({
36          title: t("title"),
37          children: t("message", integration),
38          onConfirm: () => {
39            void mutateAsync(40              { id: integration.id },41              {42                onSuccess: () => {43                  showSuccessNotification({44                    title: t("notification.success.title"),45                    message: t("notification.success.message"),46                  });47                  if (count === 1) {48                    router.replace("/integrations");49                  }50                  void revalidatePathAction("/integrations");51                },52                onError: () => {53                  showErrorNotification({54                    title: t("notification.error.title"),55                    message: t("notification.error.message"),56                  });57                },58              },59            );60          },
61        });
62      }}