Skip to content

Commit 0ff616a

Browse files
committed
fix: Worked through all oxlint suggestions
1 parent 91c439e commit 0ff616a

File tree

12 files changed

+21
-163
lines changed

12 files changed

+21
-163
lines changed

deploy-template/fastify/static.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fastifyStatic from '@fastify/static';
22
import { join } from 'path';
33

4-
export default async (fastify, { hdbCore, logger }) => {
4+
export default async (fastify) => {
55
fastify.register(fastifyStatic, {
66
root: join(import.meta.dirname, '../web'),
77
maxAge: '30d',

src/components/Breadcrumbs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function Breadcrumbs({ restartRequired }: { restartRequired?: boolean })
2121
.filter((x) => x && x.length > 0);
2222

2323
const breadcrumbs = [
24-
<Link to="/">
24+
<Link key="home" to="/">
2525
<HomeIcon aria-hidden="true" className="size-5 shrink-0" />
2626
<span className="sr-only">Home</span>
2727
</Link>,
@@ -35,7 +35,7 @@ export function Breadcrumbs({ restartRequired }: { restartRequired?: boolean })
3535

3636
let path = `/${routeHistory.slice(0, index + 1).join('/')}`;
3737
let name = capitalizeWords(route);
38-
let id: string | undefined;
38+
let id: string | undefined = undefined;
3939
if (route === 'databases' && routeHistory.length === index + 3) {
4040
// id = routeHistory[index + 1];
4141
name = routeHistory[index + 2];

src/components/ContactUs.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export function ContactUs({ overEmail }: { readonly overEmail?: boolean }) {
33
<a
44
href={overEmail ? 'mailto:[email protected]' : 'https://discord.com/channels/1415002037439041710/1415002038286286994'}
55
target="_blank"
6+
rel="noreferrer"
67
className="underline">
78
Contact us
89
</a>);

src/components/InstanceTypeSelectInput.tsx

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/components/ui/sidebar/SidebarProvider.tsx

Lines changed: 0 additions & 111 deletions
This file was deleted.

src/features/auth/ClusterInstanceSignIn.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,11 @@ export function ClusterInstanceSignIn() {
149149
<li>Is the server running?</li>
150150
<li>Have you <a
151151
href="https://docs.harperdb.io/docs/developers/security/configuration#cors" target="_blank"
152+
rel="noreferrer"
152153
className="underline">enabled CORS</a> for the operations API?
153154
</li>
154155
{warnAboutLocalDeviceAccess && <li>Have you allowed <a
155-
href="https://www.google.com/search?q=How+do+I+enable+local+network+access+in+my+browser%3F" className="underline" target="_blank">local
156+
href="https://www.google.com/search?q=How+do+I+enable+local+network+access+in+my+browser%3F" className="underline" target="_blank" rel="noreferrer">local
156157
network access</a> in your browser?</li>}
157158
</ol>
158159
</div>

src/features/auth/SignUp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ export function SignUp() {
187187
)}
188188
/>
189189
<p className="text-xs">By creating an account, you agree to
190-
the <a rel="noopener" href="https://www.harper.fast/resources/privacy-policy" target="_blank" className="underline hover:text-blue-300">
190+
the <a href="https://www.harper.fast/resources/privacy-policy" target="_blank" rel="noreferrer" className="underline hover:text-blue-300">
191191
Privacy Policy
192-
</a> and <a rel="noopener" href="https://www.harper.fast/resources/terms-of-use" target="_blank" className="underline hover:text-blue-300">
192+
</a> and <a href="https://www.harper.fast/resources/terms-of-use" target="_blank" rel="noreferrer" className="underline hover:text-blue-300">
193193
Terms of Service
194194
</a></p>
195195

src/features/cluster/Scaling.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function Scaling() {
4949
<p>Your cluster is updating with the latest changes. This includes waiting several minutes to let
5050
traffic drain safely. <span className="text-muted-foreground">
5151
We will let you know when we are ready for you to connect! In the meantime, join us
52-
on <a href="https://discord.gg/VzZuaw3Xay" target="_blank">Discord</a>! Get real-time help from our
52+
on <a href="https://discord.gg/VzZuaw3Xay" target="_blank" rel="noreferrer">Discord</a>! Get real-time help from our
5353
engineers, see feature drops early, and connect with others building on Fabric.</span>
5454
</p>
5555
</div>

src/features/cluster/StartingUp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export function StartingUp() {
9393
<p>Your cluster is spinning up with the latest changes, including your own DNS records and private
9494
connections. Please wait while we get everything going. <span className="text-muted-foreground">
9595
We will let you know when we are ready for you to connect! In the meantime, join us
96-
on <a href="https://discord.gg/VzZuaw3Xay" target="_blank">Discord</a>! Get real-time help from our
96+
on <a href="https://discord.gg/VzZuaw3Xay" target="_blank" rel="noreferrer">Discord</a>! Get real-time help from our
9797
engineers, see feature drops early, and connect with others building on Fabric.</span>
9898
</p>
9999
</div>

src/features/clusters/components/ClusterCard.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -128,42 +128,42 @@ export function ClusterCard({ cluster }: { cluster: Cluster; }) {
128128

129129
const menuItems = [
130130
isActive && update && !auth.isLoading && (!isDirectConnect || isFabricConnect) && (
131-
<Link to={`${cluster.id}/sign-in`} disabled={signingOut}>
131+
<Link key="sign-in" to={`${cluster.id}/sign-in`} disabled={signingOut}>
132132
<DropdownMenuItem>Direct Sign In</DropdownMenuItem>
133133
</Link>
134134
),
135135
isActive && update && (
136-
<Link to={`${cluster.id}/edit`} disabled={signingOut}>
136+
<Link key="edit" to={`${cluster.id}/edit`} disabled={signingOut}>
137137
<DropdownMenuItem>Edit</DropdownMenuItem>
138138
</Link>
139139
),
140140
isActive && view && (
141-
<Link to={`${cluster.id}/instances`} disabled={signingOut}>
141+
<Link key="instances" to={`${cluster.id}/instances`} disabled={signingOut}>
142142
<DropdownMenuItem>Instances</DropdownMenuItem>
143143
</Link>
144144
),
145145
isActive && view && cluster.fqdn && (
146-
<DropdownMenuItem onClick={onCopyFQDNClick} disabled={signingOut}>
146+
<DropdownMenuItem key="copy-host-name" onClick={onCopyFQDNClick} disabled={signingOut}>
147147
Copy Host Name
148148
</DropdownMenuItem>
149149
),
150150
isActive && view && cluster.fqdn && (
151-
<DropdownMenuItem onClick={onCopyAPIClick} disabled={signingOut}>
151+
<DropdownMenuItem key="copy-api-url" onClick={onCopyAPIClick} disabled={signingOut}>
152152
Copy API URL
153153
</DropdownMenuItem>
154154
),
155155
isActive && view && !!operationsUrl && !auth.isLoading && isDirectConnect && (
156-
<DropdownMenuItem onClick={onSignOutClick} disabled={signingOut}>
156+
<DropdownMenuItem key="direct-sign-out" onClick={onSignOutClick} disabled={signingOut}>
157157
Direct Sign Out
158158
</DropdownMenuItem>
159159
),
160160
clusterHasFailed && create && (
161-
<DropdownMenuItem className="focus:bg-green/70 focus:text-white" onClick={onTryAgainClick}>
161+
<DropdownMenuItem key="try-again" className="focus:bg-green/70 focus:text-white" onClick={onTryAgainClick}>
162162
Try Again
163163
</DropdownMenuItem>
164164
),
165165
!isTerminated && remove && (
166-
<DropdownMenuItem className="focus:bg-red/70 focus:text-white" onClick={onTerminateClick}>
166+
<DropdownMenuItem key="remove" className="focus:bg-red/70 focus:text-white" onClick={onTerminateClick}>
167167
{isSelfManaged ? 'Remove' : 'Terminate'}
168168
</DropdownMenuItem>
169169
),

0 commit comments

Comments
 (0)