Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 33d777c

Browse files
committed
chore(site): enable no-redeclare oxlint rule
1 parent d726903 commit 33d777c

9 files changed

Lines changed: 19 additions & 18 deletions

File tree

site/.oxlintrc.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
"new-for-builtins": "error",
186186
"no-explicit-any": "error",
187187
"no-irregular-whitespace": "error",
188+
"no-redeclare": "error",
188189
"no-use-before-define": [
189190
"error",
190191
{ "functions": false, "classes": false, "variables": false }
@@ -205,7 +206,6 @@
205206
// ==========================================================
206207
"no-autofocus": "off", // a11y/noAutofocus (large)
207208
"no-invalid-void-type": "off", // suspicious/noConfusingVoidType (large)
208-
"no-redeclare": "off", // suspicious/noRedeclare (medium: TS declaration merging)
209209
"no-inferrable-types": "off", // style/noInferrableTypes (medium, coder error rule)
210210
"jsx-curly-brace-presence": "off", // style/useConsistentCurlyBraces (medium, coder error rule)
211211
"no-fallthrough": "off", // suspicious/noFallthroughSwitchClause (medium)

site/src/components/FullPageLayout/Sidebar.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ export const SidebarCaption: FC<HTMLAttributes<HTMLSpanElement>> = (props) => {
5555
);
5656
};
5757

58-
interface SidebarIconButton extends ComponentProps<typeof TopbarIconButton> {
58+
interface SidebarIconButtonProps
59+
extends ComponentProps<typeof TopbarIconButton> {
5960
isActive: boolean;
6061
}
6162

62-
export const SidebarIconButton: FC<SidebarIconButton> = ({
63+
export const SidebarIconButton: FC<SidebarIconButtonProps> = ({
6364
isActive,
6465
className,
6566
...buttonProps

site/src/components/HelpPopover/HelpPopover.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ export const HelpPopoverText: FC<HTMLAttributes<HTMLParagraphElement>> = ({
104104
);
105105
};
106106

107-
interface HelpPopoverLink {
107+
interface HelpPopoverLinkProps {
108108
children?: ReactNode;
109109
href: string;
110110
}
111111

112-
export const HelpPopoverLink: FC<HelpPopoverLink> = ({ children, href }) => {
112+
export const HelpPopoverLink: FC<HelpPopoverLinkProps> = ({ children, href }) => {
113113
return (
114114
<a
115115
href={href}

site/src/components/MultiUserSelect/MultiUserSelect.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const MultiMemberSelect: FC<MemberAutocompleteProps> = ({
8383
);
8484
};
8585

86-
type UsersTable<T extends SelectedUser> = {
86+
type UsersTableProps<T extends SelectedUser> = {
8787
error: unknown;
8888
onChange: (user: T, checked: boolean) => void;
8989
selected: readonly T[];
@@ -95,7 +95,7 @@ const UsersTable = <T extends SelectedUser>({
9595
onChange,
9696
selected,
9797
users,
98-
}: UsersTable<T>) => {
98+
}: UsersTableProps<T>) => {
9999
if (error) {
100100
return (
101101
<div className="p-3">

site/src/components/Timeline/TimelineDateRow.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { TableCell, TableRow } from "#/components/Table/Table";
33
import { formatDate } from "#/utils/time";
44
import { createDisplayDate } from "./utils";
55

6-
export interface TimelineDateRow {
6+
interface TimelineDateRowProps {
77
date: Date;
88
}
99

10-
export const TimelineDateRow: FC<TimelineDateRow> = ({ date }) => {
10+
export const TimelineDateRow: FC<TimelineDateRowProps> = ({ date }) => {
1111
return (
1212
<TableRow>
1313
<TableCell

site/src/pages/TemplateSettingsPage/TemplateGeneralSettingsPage/TemplateSettingsForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export const validationSchema = Yup.object({
6666
cors_behavior: Yup.string().oneOf(Object.values(CORSBehaviors)),
6767
});
6868

69-
export interface TemplateSettingsForm {
69+
interface TemplateSettingsFormProps {
7070
template: Template;
7171
onSubmit: (data: UpdateTemplateMeta) => void;
7272
onCancel: () => void;
@@ -79,7 +79,7 @@ export interface TemplateSettingsForm {
7979
portSharingControlsEnabled: boolean;
8080
}
8181

82-
export const TemplateSettingsForm: FC<TemplateSettingsForm> = ({
82+
export const TemplateSettingsForm: FC<TemplateSettingsFormProps> = ({
8383
template,
8484
onSubmit,
8585
onCancel,

site/src/pages/TemplateSettingsPage/TemplateSchedulePage/TemplateScheduleForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const FAILURE_CLEANUP_DEFAULT = 7 * MS_DAY_CONVERSION;
6161
const INACTIVITY_CLEANUP_DEFAULT = 180 * MS_DAY_CONVERSION;
6262
const DORMANT_AUTODELETION_DEFAULT = 30 * MS_DAY_CONVERSION;
6363

64-
export interface TemplateScheduleForm {
64+
interface TemplateScheduleFormProps {
6565
template: Template;
6666
onSubmit: (data: UpdateTemplateMeta) => void;
6767
onCancel: () => void;
@@ -72,7 +72,7 @@ export interface TemplateScheduleForm {
7272
initialTouched?: FormikTouched<UpdateTemplateMeta>;
7373
}
7474

75-
export const TemplateScheduleForm: FC<TemplateScheduleForm> = ({
75+
export const TemplateScheduleForm: FC<TemplateScheduleFormProps> = ({
7676
template,
7777
onSubmit,
7878
onCancel,

site/src/pages/TemplateSettingsPage/TemplateVariablesPage/TemplateVariablesForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import {
2121
TemplateVariableField,
2222
} from "./TemplateVariableField";
2323

24-
export interface TemplateVariablesForm {
24+
interface TemplateVariablesFormProps {
2525
templateVersion: TemplateVersion;
2626
templateVariables: TemplateVersionVariable[];
2727
onSubmit: (data: CreateTemplateVersionRequest) => void;
@@ -31,7 +31,7 @@ export interface TemplateVariablesForm {
3131
// Helpful to show field errors on Storybook
3232
initialTouched?: FormikTouched<CreateTemplateVersionRequest>;
3333
}
34-
export const TemplateVariablesForm: FC<TemplateVariablesForm> = ({
34+
export const TemplateVariablesForm: FC<TemplateVariablesFormProps> = ({
3535
templateVersion,
3636
templateVariables,
3737
onSubmit,

site/src/pages/WorkspacePage/WorkspaceNotifications/Notifications.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from "#/components/Popover/Popover";
1111
import type { ThemeRole } from "#/theme/roles";
1212

13-
export type NotificationItem = {
13+
type Notification = {
1414
title: string;
1515
severity: AlertProps["severity"];
1616
detail?: ReactNode;
@@ -20,7 +20,7 @@ export type NotificationItem = {
2020
type NotificationSeverity = "warning" | "info";
2121

2222
type NotificationsProps = {
23-
items: NotificationItem[];
23+
items: Notification[];
2424
severity: NotificationSeverity;
2525
icon: ReactNode;
2626
};
@@ -131,7 +131,7 @@ const NotificationPill: FC<NotificationPillProps> = ({
131131
};
132132

133133
interface NotificationItemProps {
134-
notification: NotificationItem;
134+
notification: Notification;
135135
}
136136

137137
const NotificationItem: FC<NotificationItemProps> = ({ notification }) => {

0 commit comments

Comments
 (0)