diff --git a/.oxlintrc.json b/.oxlintrc.json index 8d8de0274f2..ee5c80fb16f 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -115,6 +115,7 @@ { "files": ["apps/webapp/app/**/*.ts", "apps/webapp/app/**/*.tsx"], "rules": { + "react/jsx-no-useless-fragment": "error", "react/no-unstable-nested-components": "error", "react/rules-of-hooks": "error", "trigger-runops/no-control-plane-run-graph-access": "error", diff --git a/apps/webapp/app/components/ErrorDisplay.tsx b/apps/webapp/app/components/ErrorDisplay.tsx index d40fce0957b..d0f60840f35 100644 --- a/apps/webapp/app/components/ErrorDisplay.tsx +++ b/apps/webapp/app/components/ErrorDisplay.tsx @@ -34,22 +34,16 @@ export function RouteErrorDisplay(options?: ErrorDisplayOptions) { ); } - return ( - <> - {isRouteErrorResponse(error) ? ( - - ) : error instanceof Error ? ( - - ) : ( - - )} - + return isRouteErrorResponse(error) ? ( + + ) : error instanceof Error ? ( + + ) : ( + ); } diff --git a/apps/webapp/app/components/dashboard-agent/AskAgentButton.tsx b/apps/webapp/app/components/dashboard-agent/AskAgentButton.tsx index f5acc37bb38..602a96e123b 100644 --- a/apps/webapp/app/components/dashboard-agent/AskAgentButton.tsx +++ b/apps/webapp/app/components/dashboard-agent/AskAgentButton.tsx @@ -21,7 +21,7 @@ export function AskAgentButton({ fallback?: React.ReactNode; }) { const available = useDashboardAgentAvailable(); - if (!available) return <>{fallback}; + if (!available) return fallback; const button = ( ); } diff --git a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx index ddb7220213c..4f134a14b68 100644 --- a/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx +++ b/apps/webapp/app/components/runs/v3/TaskRunsTable.tsx @@ -253,11 +253,7 @@ export function TaskRunsTable({ > Duration - {showCompute && ( - <> - Compute - - )} + {showCompute && Compute} }> Machine diff --git a/apps/webapp/app/root.tsx b/apps/webapp/app/root.tsx index 1e550155fde..43812d5653d 100644 --- a/apps/webapp/app/root.tsx +++ b/apps/webapp/app/root.tsx @@ -146,27 +146,25 @@ export const shouldRevalidate: ShouldRevalidateFunction = (options) => { export function ErrorBoundary() { return ( - <> - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + ); } @@ -180,39 +178,37 @@ export default function App() { const resolvedTheme = themePreference === "system" ? "dark" : themePreference; return ( - <> - - -