Skip to content

Commit aec64e0

Browse files
chore: remove unused exports (coder#18038)
1 parent f331140 commit aec64e0

File tree

149 files changed

+165
-188
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

149 files changed

+165
-188
lines changed

site/.knip.jsonc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,5 @@
88
"@types/react-virtualized-auto-sizer",
99
"jest_workaround",
1010
"ts-proto"
11-
],
12-
// Don't report unused exports of types as long as they are used within the file.
13-
"ignoreExportsUsedInFile": {
14-
"interface": true,
15-
"type": true
16-
}
11+
]
1712
}

site/pnpm-lock.yaml

Lines changed: 1 addition & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

site/src/api/errors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ export interface FieldError {
1111
detail: string;
1212
}
1313

14-
export type FieldErrors = Record<FieldError["field"], FieldError["detail"]>;
14+
type FieldErrors = Record<FieldError["field"], FieldError["detail"]>;
1515

1616
export interface ApiErrorResponse {
1717
message: string;
1818
detail?: string;
1919
validations?: FieldError[];
2020
}
2121

22-
export type ApiError = AxiosError<ApiErrorResponse> & {
22+
type ApiError = AxiosError<ApiErrorResponse> & {
2323
response: AxiosResponse<ApiErrorResponse>;
2424
};
2525

site/src/api/queries/workspaces.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export const agentLogs = (agentId: string) => {
355355
};
356356

357357
// workspace usage options
358-
export interface WorkspaceUsageOptions {
358+
interface WorkspaceUsageOptions {
359359
usageApp: UsageAppName;
360360
connectionStatus: ConnectionStatus;
361361
workspaceId: string | undefined;

site/src/components/ActiveUserChart/ActiveUserChart.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const chartConfig = {
2020
color: "hsl(var(--highlight-purple))",
2121
},
2222
} satisfies ChartConfig;
23-
export interface ActiveUserChartProps {
23+
interface ActiveUserChartProps {
2424
data: { date: string; amount: number }[];
2525
}
2626

site/src/components/Avatar/AvatarData.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Avatar } from "components/Avatar/Avatar";
22
import type { FC, ReactNode } from "react";
33

4-
export interface AvatarDataProps {
4+
interface AvatarDataProps {
55
title: ReactNode;
66
subtitle?: ReactNode;
77
src?: string;

site/src/components/Badge/Badge.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ const badgeVariants = cva(
5050
},
5151
);
5252

53-
export interface BadgeProps
53+
interface BadgeProps
5454
extends React.HTMLAttributes<HTMLDivElement>,
5555
VariantProps<typeof badgeVariants> {
5656
asChild?: boolean;

site/src/components/CodeExample/CodeExample.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { FC } from "react";
33
import { MONOSPACE_FONT_FAMILY } from "theme/constants";
44
import { CopyButton } from "../CopyButton/CopyButton";
55

6-
export interface CodeExampleProps {
6+
interface CodeExampleProps {
77
code: string;
88
secret?: boolean;
99
className?: string;

site/src/components/CollapsibleSummary/CollapsibleSummary.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const collapsibleSummaryVariants = cva(
2020
},
2121
);
2222

23-
export interface CollapsibleSummaryProps
23+
interface CollapsibleSummaryProps
2424
extends VariantProps<typeof collapsibleSummaryVariants> {
2525
/**
2626
* The label to display for the collapsible section

site/src/components/Conditionals/ChooseOne.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
type ReactNode,
66
} from "react";
77

8-
export interface CondProps {
8+
interface CondProps {
99
condition?: boolean;
1010
children?: ReactNode;
1111
}

site/src/components/Dialogs/DeleteDialog/DeleteDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { type FC, type FormEvent, useId, useState } from "react";
44
import { Stack } from "../../Stack/Stack";
55
import { ConfirmDialog } from "../ConfirmDialog/ConfirmDialog";
66

7-
export interface DeleteDialogProps {
7+
interface DeleteDialogProps {
88
isOpen: boolean;
99
onConfirm: () => void;
1010
onCancel: () => void;

site/src/components/Expander/Expander.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Link from "@mui/material/Link";
44
import { DropdownArrow } from "components/DropdownArrow/DropdownArrow";
55
import type { FC, ReactNode } from "react";
66

7-
export interface ExpanderProps {
7+
interface ExpanderProps {
88
expanded: boolean;
99
setExpanded: (val: boolean) => void;
1010
children?: ReactNode;

site/src/components/FileUpload/FileUpload.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useClickable } from "hooks/useClickable";
66
import { CloudUploadIcon, FolderIcon, TrashIcon } from "lucide-react";
77
import { type DragEvent, type FC, type ReactNode, useRef } from "react";
88

9-
export interface FileUploadProps {
9+
interface FileUploadProps {
1010
isUploading: boolean;
1111
onUpload: (file: File) => void;
1212
onRemove?: () => void;

site/src/components/Filter/Filter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { ChevronDownIcon } from "lucide-react";
1818
import { type FC, type ReactNode, useEffect, useRef, useState } from "react";
1919
import type { useSearchParams } from "react-router-dom";
2020

21-
export type PresetFilter = {
21+
type PresetFilter = {
2222
name: string;
2323
query: string;
2424
};

site/src/components/Filter/SelectFilter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export type SelectFilterOption = {
2020
value: string;
2121
};
2222

23-
export type SelectFilterProps = {
23+
type SelectFilterProps = {
2424
options: SelectFilterOption[] | undefined;
2525
selectedOption?: SelectFilterOption;
2626
// Used to add a accessibility label to the select

site/src/components/FullPageForm/FullPageHorizontalForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from "components/PageHeader/PageHeader";
88
import type { FC, ReactNode } from "react";
99

10-
export interface FullPageHorizontalFormProps {
10+
interface FullPageHorizontalFormProps {
1111
title: string;
1212
detail?: ReactNode;
1313
onCancel?: () => void;

site/src/components/GlobalSnackbar/EnterpriseSnackbar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import type { FC } from "react";
99

1010
type EnterpriseSnackbarVariant = "error" | "info" | "success";
1111

12-
export interface EnterpriseSnackbarProps extends MuiSnackbarProps {
12+
interface EnterpriseSnackbarProps extends MuiSnackbarProps {
1313
/** Called when the snackbar should close, either from timeout or clicking close */
1414
onClose: () => void;
1515
/** Variant of snackbar, for theming */

site/src/components/Link/Link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const linkVariants = cva(
2323
},
2424
);
2525

26-
export interface LinkProps
26+
interface LinkProps
2727
extends React.AnchorHTMLAttributes<HTMLAnchorElement>,
2828
VariantProps<typeof linkVariants> {
2929
asChild?: boolean;

site/src/components/Logs/Logs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { type Line, LogLine, LogLinePrefix } from "./LogLine";
55

66
export const DEFAULT_LOG_LINE_SIDE_PADDING = 24;
77

8-
export interface LogsProps {
8+
interface LogsProps {
99
lines: Line[];
1010
hideTimestamps?: boolean;
1111
className?: string;

site/src/components/MultiSelectCombobox/MultiSelectCombobox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ interface MultiSelectComboboxProps {
9797
hideClearAllButton?: boolean;
9898
}
9999

100-
export interface MultiSelectComboboxRef {
100+
interface MultiSelectComboboxRef {
101101
selectedValue: Option[];
102102
input: HTMLInputElement;
103103
focus: () => void;

site/src/components/OrganizationAutocomplete/OrganizationAutocomplete.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { AvatarData } from "components/Avatar/AvatarData";
1010
import { type ComponentProps, type FC, useEffect, useState } from "react";
1111
import { useQuery } from "react-query";
1212

13-
export type OrganizationAutocompleteProps = {
13+
type OrganizationAutocompleteProps = {
1414
onChange: (organization: Organization | null) => void;
1515
label?: string;
1616
className?: string;

site/src/components/PageHeader/PageHeader.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { FC, PropsWithChildren, ReactNode } from "react";
22
import { Stack } from "../Stack/Stack";
33

4-
export interface PageHeaderProps {
4+
interface PageHeaderProps {
55
actions?: ReactNode;
66
className?: string;
77
children?: ReactNode;

site/src/components/Paywall/Paywall.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Stack } from "components/Stack/Stack";
66
import { CircleCheckBigIcon } from "lucide-react";
77
import type { FC, ReactNode } from "react";
88

9-
export interface PaywallProps {
9+
interface PaywallProps {
1010
message: string;
1111
description?: ReactNode;
1212
documentationLink?: string;

site/src/components/Paywall/PopoverPaywall.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Stack } from "components/Stack/Stack";
66
import { CircleCheckBigIcon } from "lucide-react";
77
import type { FC, ReactNode } from "react";
88

9-
export interface PopoverPaywallProps {
9+
interface PopoverPaywallProps {
1010
message: string;
1111
description?: ReactNode;
1212
documentationLink?: string;

site/src/components/Pill/Pill.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from "react";
1212
import type { ThemeRole } from "theme/roles";
1313

14-
export type PillProps = HTMLAttributes<HTMLDivElement> & {
14+
type PillProps = HTMLAttributes<HTMLDivElement> & {
1515
icon?: ReactNode;
1616
type?: ThemeRole;
1717
size?: "md" | "lg";

site/src/components/RichParameterInput/RichParameterInput.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const styles = {
121121
}),
122122
} satisfies Record<string, Interpolation<Theme>>;
123123

124-
export interface ParameterLabelProps {
124+
interface ParameterLabelProps {
125125
parameter: TemplateVersionParameter;
126126
isPreset?: boolean;
127127
}
@@ -191,10 +191,7 @@ const ParameterLabel: FC<ParameterLabelProps> = ({ parameter, isPreset }) => {
191191

192192
type Size = "medium" | "small";
193193

194-
export type RichParameterInputProps = Omit<
195-
TextFieldProps,
196-
"size" | "onChange"
197-
> & {
194+
type RichParameterInputProps = Omit<TextFieldProps, "size" | "onChange"> & {
198195
parameter: TemplateVersionParameter;
199196
parameterAutofill?: AutofillBuildParameter;
200197
onChange: (value: string) => void;

site/src/components/SelectMenu/SelectMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const SelectMenuTrigger = PopoverTrigger;
2929

3030
export const SelectMenuContent = PopoverContent;
3131

32-
export type SelectMenuButtonProps = ButtonProps & {
32+
type SelectMenuButtonProps = ButtonProps & {
3333
startIcon?: React.ReactNode;
3434
};
3535

site/src/components/Stack/Stack.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { CSSObject } from "@emotion/react";
22
import { forwardRef } from "react";
33

4-
export type StackProps = {
4+
type StackProps = {
55
className?: string;
66
direction?: "column" | "row";
77
spacing?: number;

site/src/components/TableEmpty/TableEmpty.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
} from "components/EmptyState/EmptyState";
77
import type { FC } from "react";
88

9-
export type TableEmptyProps = EmptyStateProps;
9+
type TableEmptyProps = EmptyStateProps;
1010

1111
export const TableEmpty: FC<TableEmptyProps> = (props) => {
1212
return (

site/src/components/TagInput/TagInput.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import Chip from "@mui/material/Chip";
22
import FormHelperText from "@mui/material/FormHelperText";
33
import { type FC, useId, useMemo } from "react";
44

5-
export type TagInputProps = {
5+
type TagInputProps = {
66
label: string;
77
id?: string;
88
values: string[];

site/src/components/Timeline/Timeline.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const groupByDate = <TData,>(
2222
return itemsByDate;
2323
};
2424

25-
export interface TimelineProps<TData> {
25+
interface TimelineProps<TData> {
2626
items: readonly TData[];
2727
getDate: GetDateFn<TData>;
2828
row: (item: TData) => JSX.Element;

site/src/components/UserAutocomplete/UserAutocomplete.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ import { keepPreviousData, useQuery } from "react-query";
1919
import { prepareQuery } from "utils/filters";
2020

2121
// The common properties between users and org members that we need.
22-
export type SelectedUser = {
22+
type SelectedUser = {
2323
avatar_url?: string;
2424
email: string;
2525
username: string;
2626
};
2727

28-
export type CommonAutocompleteProps<T extends SelectedUser> = {
28+
type CommonAutocompleteProps<T extends SelectedUser> = {
2929
className?: string;
3030
label?: string;
3131
onChange: (user: T | null) => void;
@@ -34,7 +34,7 @@ export type CommonAutocompleteProps<T extends SelectedUser> = {
3434
value: T | null;
3535
};
3636

37-
export type UserAutocompleteProps = CommonAutocompleteProps<User>;
37+
type UserAutocompleteProps = CommonAutocompleteProps<User>;
3838

3939
export const UserAutocomplete: FC<UserAutocompleteProps> = (props) => {
4040
const [filter, setFilter] = useState<string>();
@@ -58,7 +58,7 @@ export const UserAutocomplete: FC<UserAutocompleteProps> = (props) => {
5858
);
5959
};
6060

61-
export type MemberAutocompleteProps =
61+
type MemberAutocompleteProps =
6262
CommonAutocompleteProps<OrganizationMemberWithUserData> & {
6363
organizationId: string;
6464
};

site/src/hooks/useSearchParamsKey.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import { useSearchParams } from "react-router-dom";
22

3-
export type UseSearchParamsKeyConfig = Readonly<{
3+
type UseSearchParamsKeyConfig = Readonly<{
44
key: string;
55
searchParams?: URLSearchParams;
66
defaultValue?: string;
77
replace?: boolean;
88
}>;
99

10-
export type UseSearchParamKeyResult = Readonly<{
10+
type UseSearchParamKeyResult = Readonly<{
1111
value: string;
1212
setValue: (newValue: string) => void;
1313
deleteValue: () => void;

site/src/modules/apps/apps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const openAppInNewWindow = (href: string) => {
7979
window.open(href, "_blank", "width=900,height=600");
8080
};
8181

82-
export type GetAppHrefParams = {
82+
type GetAppHrefParams = {
8383
path: string;
8484
host: string;
8585
workspace: Workspace;

site/src/modules/builds/BuildAvatar/BuildAvatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useClassName } from "hooks/useClassName";
66
import type { FC } from "react";
77
import { getDisplayWorkspaceBuildStatus } from "utils/workspace";
88

9-
export interface BuildAvatarProps {
9+
interface BuildAvatarProps {
1010
build: WorkspaceBuild;
1111
size?: AvatarProps["size"];
1212
}

0 commit comments

Comments
 (0)