Skip to content

Commit 8a02be6

Browse files
ambvclaude
andcommitted
Fix ESLint errors in shared types, hooks, and UI components
Remove unused imports. Replace empty interfaces with type aliases. Fix a const used only as a type. Export DialogClose so it's not flagged as unused. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d1327aa commit 8a02be6

File tree

8 files changed

+10
-27
lines changed

8 files changed

+10
-27
lines changed

frontend/src/components/diff/CommitTooltipContent.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use client';
22

33
import type { Commit } from '@/lib/types';
4-
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
54

65
interface CommitTooltipContentProps {
76
commit?: Commit;

frontend/src/components/ui/collapsible.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use client';
22

3-
import * as React from 'react';
43
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
54

65
const Collapsible = CollapsiblePrimitive.Root;

frontend/src/components/ui/dialog.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ DialogDescription.displayName = DialogPrimitive.Description.displayName;
110110

111111
export {
112112
Dialog,
113+
DialogClose,
113114
DialogTrigger,
114115
DialogContent,
115116
DialogHeader,

frontend/src/components/ui/textarea.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import * as React from 'react';
22

33
import { cn } from '@/lib/utils';
44

5-
export interface TextareaProps
6-
extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
5+
export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement>;
76

87
const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
98
({ className, ...props }, ref) => {

frontend/src/hooks/use-toast.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,19 @@ type ToasterToast = ToastProps & {
1515
action?: ToastActionElement;
1616
};
1717

18-
const actionTypes = {
19-
ADD_TOAST: 'ADD_TOAST',
20-
UPDATE_TOAST: 'UPDATE_TOAST',
21-
DISMISS_TOAST: 'DISMISS_TOAST',
22-
REMOVE_TOAST: 'REMOVE_TOAST',
23-
} as const;
24-
2518
let count = 0;
2619

2720
function genId() {
2821
count = (count + 1) % Number.MAX_SAFE_INTEGER;
2922
return count.toString();
3023
}
3124

32-
type ActionType = typeof actionTypes;
25+
type ActionType = {
26+
ADD_TOAST: 'ADD_TOAST';
27+
UPDATE_TOAST: 'UPDATE_TOAST';
28+
DISMISS_TOAST: 'DISMISS_TOAST';
29+
REMOVE_TOAST: 'REMOVE_TOAST';
30+
};
3331

3432
type Action =
3533
| {

frontend/src/lib/api.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@ import type {
55
DiffTableRow,
66
Environment,
77
PythonVersionFilterOption,
8-
BenchmarkResultJson,
9-
AuthToken,
108
TokenCreate,
119
TokenUpdate,
1210
TokenAnalytics,
13-
AdminUser,
1411
AdminUserCreate,
1512
AdminCurrentUser,
1613
GitHubAuthResponse,
@@ -20,7 +17,6 @@ import type {
2017
DatabaseTable,
2118
TableSchema,
2219
QueryResult,
23-
BenchmarkResult,
2420
BenchmarkResultUpdate,
2521
CommitUpdate,
2622
BinaryCreate,
@@ -36,13 +32,10 @@ import type {
3632
EnvironmentSummary,
3733
CommitSummary,
3834
BatchTrendsResponse,
39-
UploadResponse,
4035
TrendRequest,
41-
TrendQueryParams,
4236
BatchTrendRequest,
4337
BenchmarkNamesQueryParams,
4438
DiffQueryParams,
45-
UploadRequestData,
4639
} from '../types/api';
4740

4841
const API_BASE =

frontend/src/types/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export interface TrendRequest {
6060
}
6161

6262
// Keep TrendQueryParams as alias for backward compatibility
63-
export interface TrendQueryParams extends TrendRequest {}
63+
export type TrendQueryParams = TrendRequest;
6464

6565
export interface UploadRequestData {
6666
commit_sha: string;

frontend/src/types/components.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
import { ReactNode } from 'react';
2-
import {
3-
Binary,
4-
Environment,
5-
PythonVersionFilterOption,
6-
DiffTableRow,
7-
} from '@/lib/types';
8-
import { ChartDataPoint, TrendDataPoint } from './api';
2+
import { ChartDataPoint } from './api';
93

104
// Base component props
115
export interface BaseComponentProps {

0 commit comments

Comments
 (0)