Skip to content

Commit c1c3c97

Browse files
committed
chore: enable JSX cleanup rules
1 parent 402a468 commit c1c3c97

12 files changed

Lines changed: 18 additions & 21 deletions

File tree

.oxlintrc.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
"no-multi-assign": "error",
5656
"prefer-object-spread": "error",
5757
"react/jsx-no-target-blank": "error",
58+
"react/jsx-fragments": "error",
59+
"react/self-closing-comp": "error",
5860
"trigger/no-thrown-unawaited-redirect": "error",
5961
"trigger-prisma/no-unbounded-list-filter": "error",
6062
"trigger-prisma/no-unbounded-list-filter-in-args-helper": "error"

apps/webapp/app/components/code/CodeBlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ function Chrome({ title }: { title?: string }) {
439439
<div className="flex items-center justify-center">
440440
<div className={cn("rounded-sm px-3 py-0.5 text-xs text-text-faint")}>{title}</div>
441441
</div>
442-
<div></div>
442+
<div />
443443
</div>
444444
);
445445
}

apps/webapp/app/components/logs/LogsTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export function LogsTable({
220220
}
221221

222222
function BlankState({ isLoading, onRefresh }: { isLoading?: boolean; onRefresh?: () => void }) {
223-
if (isLoading) return <TableBlankRow colSpan={6}></TableBlankRow>;
223+
if (isLoading) return <TableBlankRow colSpan={6} />;
224224

225225
const handleRefresh = onRefresh ?? (() => window.location.reload());
226226

apps/webapp/app/components/navigation/HelpAndFeedbackPopover.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { ArrowUpRightIcon } from "@heroicons/react/20/solid";
22
import { motion } from "framer-motion";
3-
import { Fragment, useState } from "react";
3+
import { useState } from "react";
44
import { BookIcon } from "~/assets/icons/BookIcon";
55
import { BulbIcon } from "~/assets/icons/BulbIcon";
66
import { DropdownIcon } from "~/assets/icons/DropdownIcon";
@@ -129,7 +129,7 @@ export function HelpAndFeedback({
129129
sideOffset={isCollapsed ? 8 : 4}
130130
align="start"
131131
>
132-
<Fragment>
132+
<>
133133
{/* This popover lives in the app layout, above both AI hosts, so it opens them
134134
through their open-request bridges rather than context. The hosts register the
135135
keystrokes; this only shows them. */}
@@ -232,7 +232,7 @@ export function HelpAndFeedback({
232232
target="_blank"
233233
/>
234234
</div>
235-
</Fragment>
235+
</>
236236
</PopoverContent>
237237
</Popover>
238238
{/* Hosted outside the popover so closing the menu can't unmount the form mid-submit. */}

apps/webapp/app/components/runs/v3/TaskRunsTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ function BlankState({
717717
const project = useProject();
718718
const environment = useEnvironment();
719719
const colSpan = showRegion ? 16 : 15;
720-
if (isLoading) return <TableBlankRow colSpan={colSpan}></TableBlankRow>;
720+
if (isLoading) return <TableBlankRow colSpan={colSpan} />;
721721

722722
const { tasks, from, to, ...otherFilters } = filters;
723723
const singleTaskFromFilters = filters.tasks.length === 1 ? filters.tasks[0] : null;

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.environment-variables/route.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -831,12 +831,7 @@ function EditEnvironmentVariablePanel({
831831
return (
832832
<Dialog open={isOpen} onOpenChange={setIsOpen}>
833833
<DialogTrigger asChild>
834-
<Button
835-
variant="small-menu-item"
836-
LeadingIcon={PencilSquareIcon}
837-
fullWidth
838-
textAlignLeft
839-
></Button>
834+
<Button variant="small-menu-item" LeadingIcon={PencilSquareIcon} fullWidth textAlignLeft />
840835
</DialogTrigger>
841836
<DialogContent>
842837
<DialogHeader>Edit environment variable</DialogHeader>

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,7 @@ function LiveReloadingStatus({
17231723
</Paragraph>
17241724
</div>
17251725
}
1726-
></SimpleTooltip>
1726+
/>
17271727
)}
17281728
</>
17291729
);

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings.integrations/route.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ export default function IntegrationsSettingsPage() {
354354
<>
355355
<SettingsContainer className="md:mt-6">
356356
{githubAppEnabled && (
357-
<React.Fragment>
357+
<>
358358
<SettingsSection>
359359
<SettingsHeader title="Git settings" />
360360
<GitHubSettingsPanel
@@ -396,7 +396,7 @@ export default function IntegrationsSettingsPage() {
396396
/>
397397
<BuildSettingsForm buildSettings={buildSettings ?? {}} />
398398
</SettingsSection>
399-
</React.Fragment>
399+
</>
400400
)}
401401
</SettingsContainer>
402402

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.test.tasks.$taskParam/route.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export default function Page() {
296296
const result = useTypedLoaderData<typeof loader>();
297297

298298
if (!result.foundTask) {
299-
return <div></div>;
299+
return <div />;
300300
}
301301

302302
const params = useParams();

apps/webapp/app/routes/admin.notifications.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ export default function AdminNotificationsRoute() {
453453
<TableHeaderCell>Clicked</TableHeaderCell>
454454
<TableHeaderCell>Dismissed</TableHeaderCell>
455455
<TableHeaderCell>Status</TableHeaderCell>
456-
<TableHeaderCell></TableHeaderCell>
456+
<TableHeaderCell />
457457
</TableRow>
458458
</TableHeader>
459459
<TableBody>

0 commit comments

Comments
 (0)