From ef2ad80ad9db932bce54bb5f69384231edef8769 Mon Sep 17 00:00:00 2001 From: Ruben Thoms Date: Thu, 30 Jan 2025 14:07:39 +0100 Subject: [PATCH] Removed unnecessary error comments --- .../lib/components/Dialog/components/DialogComponent.tsx | 1 - react/src/lib/components/EdsIcon/EdsIcon.tsx | 2 -- react/src/lib/components/Menu/components/Group/Group.tsx | 1 - react/src/lib/components/Menu/components/Icon/Icon.tsx | 2 -- .../lib/components/Menu/components/MenuBar/MenuBar.tsx | 1 - .../components/WebvizDialogTitle/WebvizDialogTitle.tsx | 1 - .../components/WebvizContentOverlay.tsx | 3 --- .../components/WebvizToolbarButton.tsx | 1 - .../lib/components/WebvizPluginTour/WebvizPluginTour.tsx | 3 --- .../components/FullScreenMenu/full-screen-menu.tsx | 1 - .../WebvizSettingsDrawer/WebvizSettingsDrawer.tsx | 2 -- .../components/AuthorDialog/author-dialog.tsx | 8 ++++---- .../components/PluginActions/plugin-actions.tsx | 7 ------- .../components/ViewList/view-list.tsx | 2 -- .../components/ViewSelector/view-selector.tsx | 2 -- .../WebvizSettingsGroup/WebvizSettingsGroup.tsx | 2 -- .../components/WebvizViewElement/WebvizViewElement.tsx | 4 ---- 17 files changed, 4 insertions(+), 39 deletions(-) diff --git a/react/src/lib/components/Dialog/components/DialogComponent.tsx b/react/src/lib/components/Dialog/components/DialogComponent.tsx index e2d6fbb7..59dd6355 100644 --- a/react/src/lib/components/Dialog/components/DialogComponent.tsx +++ b/react/src/lib/components/Dialog/components/DialogComponent.tsx @@ -126,7 +126,6 @@ export const DialogComponent: React.FC = (props) => { color: "#ccc", }} > - { /* @ts-expect-error - this is a very weird bug */} diff --git a/react/src/lib/components/EdsIcon/EdsIcon.tsx b/react/src/lib/components/EdsIcon/EdsIcon.tsx index 124a5c5d..7695ff8e 100644 --- a/react/src/lib/components/EdsIcon/EdsIcon.tsx +++ b/react/src/lib/components/EdsIcon/EdsIcon.tsx @@ -28,7 +28,6 @@ export const EdsIcon: React.FC = (props) => { `https://eds-storybook-react.azurewebsites.net/?path=/story/icons--preview.` } > - { /* @ts-expect-error - this is a very weird bug */} = (props) => { return ( <> - { /* @ts-expect-error - this is a very weird bug */} ); diff --git a/react/src/lib/components/Menu/components/Group/Group.tsx b/react/src/lib/components/Menu/components/Group/Group.tsx index 7687970c..aa697c1f 100644 --- a/react/src/lib/components/Menu/components/Group/Group.tsx +++ b/react/src/lib/components/Menu/components/Group/Group.tsx @@ -73,7 +73,6 @@ export const Group: React.FC = (props) => { : "Collapse group" } > - { /* @ts-expect-error - this is a very weird bug */} = (props) => { `https://eds-storybook-react.azurewebsites.net/?path=/story/icons--preview.` } > - { /* @ts-expect-error - this is a very weird bug */} = (props) => { return ( <> - { /* @ts-expect-error - this is a very weird bug */} ( variant="ghost_icon" onClick={handleMenuButtonClick} > - { /* @ts-expect-error - this is a very weird bug */} diff --git a/react/src/lib/components/WebvizDialog/components/WebvizDialogTitle/WebvizDialogTitle.tsx b/react/src/lib/components/WebvizDialog/components/WebvizDialogTitle/WebvizDialogTitle.tsx index b6c96465..7e7911ba 100644 --- a/react/src/lib/components/WebvizDialog/components/WebvizDialogTitle/WebvizDialogTitle.tsx +++ b/react/src/lib/components/WebvizDialog/components/WebvizDialogTitle/WebvizDialogTitle.tsx @@ -74,7 +74,6 @@ export const WebvizDialogTitle = React.forwardRef< aria-label="close" onClick={() => handleCloseClick()} > - { /* @ts-expect-error - this is a very weird bug */} diff --git a/react/src/lib/components/WebvizPluginPlaceholder/components/WebvizContentOverlay.tsx b/react/src/lib/components/WebvizPluginPlaceholder/components/WebvizContentOverlay.tsx index ad078560..8bd7bbb0 100644 --- a/react/src/lib/components/WebvizPluginPlaceholder/components/WebvizContentOverlay.tsx +++ b/react/src/lib/components/WebvizPluginPlaceholder/components/WebvizContentOverlay.tsx @@ -43,14 +43,12 @@ const WebvizContentOverlay: React.FC> = ({
{contactPerson && "name" in contactPerson && (

- { /* @ts-expect-error - this is a very weird bug */} {contactPerson.name}

)} {contactPerson && "email" in contactPerson && (

- { /* @ts-expect-error - this is a very weird bug */} {contactPerson.email} @@ -59,7 +57,6 @@ const WebvizContentOverlay: React.FC> = ({ )} {contactPerson && "phone" in contactPerson && (

- { /* @ts-expect-error - this is a very weird bug */} {contactPerson.phone}

diff --git a/react/src/lib/components/WebvizPluginPlaceholder/components/WebvizToolbarButton.tsx b/react/src/lib/components/WebvizPluginPlaceholder/components/WebvizToolbarButton.tsx index e5d3c9d8..5784ece9 100644 --- a/react/src/lib/components/WebvizPluginPlaceholder/components/WebvizToolbarButton.tsx +++ b/react/src/lib/components/WebvizPluginPlaceholder/components/WebvizToolbarButton.tsx @@ -24,7 +24,6 @@ const WebvizToolbarButton: React.FC = ({ target, }) => { const createIcon = (useOnClick: boolean) => ( - // @ts-expect-error - this is a very weird bug = ( > {pluginData && (
- { /* @ts-expect-error - this is a very weird bug */} {pluginData.views.find( @@ -314,7 +313,6 @@ export const WebvizPluginTour: React.FC = ( } > Next - { /* @ts-expect-error - this is a very weird bug */} } @@ -329,7 +327,6 @@ export const WebvizPluginTour: React.FC = ( }} disabled={currentTourStep === 0} > - { /* @ts-expect-error - this is a very weird bug */} Back diff --git a/react/src/lib/components/WebvizPluginsWrapper/components/FullScreenMenu/full-screen-menu.tsx b/react/src/lib/components/WebvizPluginsWrapper/components/FullScreenMenu/full-screen-menu.tsx index 3d3a2a64..75494f08 100644 --- a/react/src/lib/components/WebvizPluginsWrapper/components/FullScreenMenu/full-screen-menu.tsx +++ b/react/src/lib/components/WebvizPluginsWrapper/components/FullScreenMenu/full-screen-menu.tsx @@ -38,7 +38,6 @@ export const FullScreenMenu: React.FC = ( } > - { /* @ts-expect-error - this is a very weird bug */} <>{icon && } diff --git a/react/src/lib/components/WebvizSettingsDrawer/WebvizSettingsDrawer.tsx b/react/src/lib/components/WebvizSettingsDrawer/WebvizSettingsDrawer.tsx index 00837330..f2df8cd3 100644 --- a/react/src/lib/components/WebvizSettingsDrawer/WebvizSettingsDrawer.tsx +++ b/react/src/lib/components/WebvizSettingsDrawer/WebvizSettingsDrawer.tsx @@ -164,9 +164,7 @@ export const WebvizSettingsDrawer: React.FC = ( }`} onClick={() => handleToggleOpenClick()} > - { /* @ts-expect-error - this is a very weird bug */} - { /* @ts-expect-error - this is a very weird bug */} diff --git a/react/src/lib/components/WebvizSettingsDrawer/components/AuthorDialog/author-dialog.tsx b/react/src/lib/components/WebvizSettingsDrawer/components/AuthorDialog/author-dialog.tsx index fce4726d..05756b0e 100644 --- a/react/src/lib/components/WebvizSettingsDrawer/components/AuthorDialog/author-dialog.tsx +++ b/react/src/lib/components/WebvizSettingsDrawer/components/AuthorDialog/author-dialog.tsx @@ -48,7 +48,7 @@ export const AuthorDialog: React.FC = ( color: "#ccc", }} > - { /* @ts-expect-error - this is a very weird bug */} + @@ -57,7 +57,7 @@ export const AuthorDialog: React.FC = ( - { /* @ts-expect-error - this is a very weird bug */} + @@ -66,7 +66,7 @@ export const AuthorDialog: React.FC = ( - { /* @ts-expect-error - this is a very weird bug */} + @@ -75,7 +75,7 @@ export const AuthorDialog: React.FC = ( - { /* @ts-expect-error - this is a very weird bug */} + diff --git a/react/src/lib/components/WebvizSettingsDrawer/components/PluginActions/plugin-actions.tsx b/react/src/lib/components/WebvizSettingsDrawer/components/PluginActions/plugin-actions.tsx index 1ccbd7ba..c84ce3a0 100644 --- a/react/src/lib/components/WebvizSettingsDrawer/components/PluginActions/plugin-actions.tsx +++ b/react/src/lib/components/WebvizSettingsDrawer/components/PluginActions/plugin-actions.tsx @@ -563,7 +563,6 @@ export const PluginActions: React.FC = ( onClick={() => handleFullScreenClick()} > - { /* @ts-expect-error - this is a very weird bug */}
@@ -572,7 +571,6 @@ export const PluginActions: React.FC = ( onClick={() => handleScreenShotClick()} > - { /* @ts-expect-error - this is a very weird bug */}
@@ -582,7 +580,6 @@ export const PluginActions: React.FC = ( onClick={handleDownloadClick} > - { /* @ts-expect-error - this is a very weird bug */} @@ -599,7 +596,6 @@ export const PluginActions: React.FC = ( badgeContent={numDeprecationWarnings} color="primary" > - { /* @ts-expect-error - this is a very weird bug */} @@ -611,7 +607,6 @@ export const PluginActions: React.FC = ( onClick={() => setOpenAuthorDialog(true)} > - { /* @ts-expect-error - this is a very weird bug */} @@ -622,7 +617,6 @@ export const PluginActions: React.FC = ( onClick={() => setTourIsOpen(true)} > - { /* @ts-expect-error - this is a very weird bug */} @@ -633,7 +627,6 @@ export const PluginActions: React.FC = ( onClick={() => openInNewTab(feedbackUrl)} > - { /* @ts-expect-error - this is a very weird bug */} diff --git a/react/src/lib/components/WebvizSettingsDrawer/components/ViewList/view-list.tsx b/react/src/lib/components/WebvizSettingsDrawer/components/ViewList/view-list.tsx index e3935084..c1c374ea 100644 --- a/react/src/lib/components/WebvizSettingsDrawer/components/ViewList/view-list.tsx +++ b/react/src/lib/components/WebvizSettingsDrawer/components/ViewList/view-list.tsx @@ -115,7 +115,6 @@ export const ViewList: React.FC = (props: ViewListProps) => {
{el.views[0].id === props.activeViewId && (<> - { /* @ts-expect-error - this is a very weird bug */} )} @@ -153,7 +152,6 @@ export const ViewList: React.FC = (props: ViewListProps) => {
{view.id === props.activeViewId && (<> - { /* @ts-expect-error - this is a very weird bug */} )} diff --git a/react/src/lib/components/WebvizSettingsDrawer/components/ViewSelector/view-selector.tsx b/react/src/lib/components/WebvizSettingsDrawer/components/ViewSelector/view-selector.tsx index ffd3b764..253485c7 100644 --- a/react/src/lib/components/WebvizSettingsDrawer/components/ViewSelector/view-selector.tsx +++ b/react/src/lib/components/WebvizSettingsDrawer/components/ViewSelector/view-selector.tsx @@ -146,7 +146,6 @@ export const ViewSelector: React.FC = ( onClick={() => setMenuOpen(true)} >
- { /* @ts-expect-error - this is a very weird bug */}
= ( width: isCollapsed ? 0 : "auto", }} > - { /* @ts-expect-error - this is a very weird bug */}
diff --git a/react/src/lib/components/WebvizSettingsGroup/WebvizSettingsGroup.tsx b/react/src/lib/components/WebvizSettingsGroup/WebvizSettingsGroup.tsx index f2ee134b..b2055324 100644 --- a/react/src/lib/components/WebvizSettingsGroup/WebvizSettingsGroup.tsx +++ b/react/src/lib/components/WebvizSettingsGroup/WebvizSettingsGroup.tsx @@ -148,7 +148,6 @@ export const WebvizSettingsGroup: React.FC = ( > {props.viewId === "" && (
- { /* @ts-expect-error - this is a very weird bug */} = ( {!props.alwaysOpen && (
- { /* @ts-expect-error - this is a very weird bug */} = (props) => { handleOpenSettingsDialog()} > - { /* @ts-expect-error - this is a very weird bug */} @@ -564,7 +563,6 @@ export const WebvizViewElement: React.FC = (props) => {
handleDownloadClick()}> - { /* @ts-expect-error - this is a very weird bug */} @@ -573,7 +571,6 @@ export const WebvizViewElement: React.FC = (props) => {
- { /* @ts-expect-error - this is a very weird bug */} @@ -581,7 +578,6 @@ export const WebvizViewElement: React.FC = (props) => {
- { /* @ts-expect-error - this is a very weird bug */}