This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch removing-unused-vars
in repository https://gitbox.apache.org/repos/asf/superset.git

commit f0f6f5cc638a32afc4b262fbadb542b9a15fae29
Author: Evan Rusackas <[email protected]>
AuthorDate: Sun Jan 28 14:16:03 2024 -0700

    chore(tsc): clean up unused vars
---
 .../SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx    | 4 ++--
 .../components/menu/DownloadMenuItems/DownloadAsImage.test.tsx      | 4 ++--
 .../components/menu/DownloadMenuItems/DownloadAsPdf.test.tsx        | 4 ++--
 superset-frontend/src/features/allEntities/AllEntitiesTable.tsx     | 1 -
 superset-frontend/src/features/tags/BulkTagModal.tsx                | 2 +-
 superset-frontend/src/features/tags/TagCard.tsx                     | 3 ---
 superset-frontend/src/features/tags/TagModal.tsx                    | 6 +++---
 superset-frontend/src/pages/AllEntities/index.tsx                   | 6 +++---
 8 files changed, 13 insertions(+), 17 deletions(-)

diff --git 
a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx
 
b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx
index 877edb76c8..b7add81de2 100644
--- 
a/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx
+++ 
b/superset-frontend/src/SqlLab/components/ShareSqlLabQuery/ShareSqlLabQuery.test.tsx
@@ -123,7 +123,7 @@ describe('ShareSqlLabQuery', () => {
         });
       });
       const button = screen.getByRole('button');
-      const { id, remoteId, ...expected } = mockQueryEditor;
+      const { ...expected } = mockQueryEditor;
       const storeQuerySpy = jest.spyOn(utils, 'storeQuery');
       userEvent.click(button);
       expect(storeQuerySpy.mock.calls).toHaveLength(1);
@@ -138,7 +138,7 @@ describe('ShareSqlLabQuery', () => {
         });
       });
       const button = screen.getByRole('button');
-      const { id, ...expected } = unsavedQueryEditor;
+      const { ...expected } = unsavedQueryEditor;
       const storeQuerySpy = jest.spyOn(utils, 'storeQuery');
       userEvent.click(button);
       expect(storeQuerySpy.mock.calls).toHaveLength(1);
diff --git 
a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadAsImage.test.tsx
 
b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadAsImage.test.tsx
index 7881e2a76b..33579985c6 100644
--- 
a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadAsImage.test.tsx
+++ 
b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadAsImage.test.tsx
@@ -1,4 +1,4 @@
-import React, { SyntheticEvent } from 'react';
+import React from 'react';
 import { render, screen, waitFor } from 'spec/helpers/testing-library';
 import userEvent from '@testing-library/user-event';
 import { Menu } from 'src/components/Menu';
@@ -7,7 +7,7 @@ import DownloadAsImage from './DownloadAsImage';
 
 jest.mock('src/utils/downloadAsImage', () => ({
   __esModule: true,
-  default: jest.fn(() => (_e: SyntheticEvent) => {}),
+  default: jest.fn(() => {}),
 }));
 
 const createProps = () => ({
diff --git 
a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadAsPdf.test.tsx
 
b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadAsPdf.test.tsx
index 371026e7aa..0498178a01 100644
--- 
a/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadAsPdf.test.tsx
+++ 
b/superset-frontend/src/dashboard/components/menu/DownloadMenuItems/DownloadAsPdf.test.tsx
@@ -1,4 +1,4 @@
-import React, { SyntheticEvent } from 'react';
+import React from 'react';
 import { render, screen, waitFor } from 'spec/helpers/testing-library';
 import userEvent from '@testing-library/user-event';
 import { Menu } from 'src/components/Menu';
@@ -7,7 +7,7 @@ import DownloadAsPdf from './DownloadAsPdf';
 
 jest.mock('src/utils/downloadAsPdf', () => ({
   __esModule: true,
-  default: jest.fn(() => (_e: SyntheticEvent) => {}),
+  default: jest.fn(() => () => {}),
 }));
 
 const createProps = () => ({
diff --git a/superset-frontend/src/features/allEntities/AllEntitiesTable.tsx 
b/superset-frontend/src/features/allEntities/AllEntitiesTable.tsx
index 50fdd5a51b..d8aaaac441 100644
--- a/superset-frontend/src/features/allEntities/AllEntitiesTable.tsx
+++ b/superset-frontend/src/features/allEntities/AllEntitiesTable.tsx
@@ -74,7 +74,6 @@ interface AllEntitiesTableProps {
 }
 
 export default function AllEntitiesTable({
-  search = '',
   setShowTagModal,
   objects,
 }: AllEntitiesTableProps) {
diff --git a/superset-frontend/src/features/tags/BulkTagModal.tsx 
b/superset-frontend/src/features/tags/BulkTagModal.tsx
index 643dcdb432..6f8e38d00f 100644
--- a/superset-frontend/src/features/tags/BulkTagModal.tsx
+++ b/superset-frontend/src/features/tags/BulkTagModal.tsx
@@ -80,7 +80,7 @@ const BulkTagModal: React.FC<BulkTagModalProps> = ({
         }
         addSuccessToast(t('Tagged %s %ss', tagged.length, resourceName));
       })
-      .catch(err => {
+      .catch(() => {
         addDangerToast(t('Failed to tag items'));
       });
 
diff --git a/superset-frontend/src/features/tags/TagCard.tsx 
b/superset-frontend/src/features/tags/TagCard.tsx
index f9d82f9bce..979c7ee320 100644
--- a/superset-frontend/src/features/tags/TagCard.tsx
+++ b/superset-frontend/src/features/tags/TagCard.tsx
@@ -44,10 +44,7 @@ interface TagCardProps {
 function TagCard({
   tag,
   hasPerm,
-  bulkSelectEnabled,
-  tagFilter,
   refreshData,
-  userId,
   addDangerToast,
   addSuccessToast,
   showThumbnails,
diff --git a/superset-frontend/src/features/tags/TagModal.tsx 
b/superset-frontend/src/features/tags/TagModal.tsx
index 5057c8441d..eb69a6be4b 100644
--- a/superset-frontend/src/features/tags/TagModal.tsx
+++ b/superset-frontend/src/features/tags/TagModal.tsx
@@ -123,7 +123,7 @@ const TagModal: React.FC<TagModalProps> = ({
           setChartsToTag(resourceMap[TaggableResources.Chart]);
           setSavedQueriesToTag(resourceMap[TaggableResources.SavedQuery]);
         },
-        (error: Response) => {
+        () => {
           addDangerToast('Error Fetching Tagged Objects');
         },
       );
@@ -231,7 +231,7 @@ const TagModal: React.FC<TagModalProps> = ({
           objects_to_tag: [...dashboards, ...charts, ...savedQueries],
         },
       })
-        .then(({ json = {} }) => {
+        .then(() => {
           refreshData();
           clearTagForm();
           addSuccessToast(t('Tag updated'));
@@ -249,7 +249,7 @@ const TagModal: React.FC<TagModalProps> = ({
           objects_to_tag: [...dashboards, ...charts, ...savedQueries],
         },
       })
-        .then(({ json = {} }) => {
+        .then(() => {
           refreshData();
           clearTagForm();
           addSuccessToast(t('Tag created'));
diff --git a/superset-frontend/src/pages/AllEntities/index.tsx 
b/superset-frontend/src/pages/AllEntities/index.tsx
index b94cab846d..ed6fd5f681 100644
--- a/superset-frontend/src/pages/AllEntities/index.tsx
+++ b/superset-frontend/src/pages/AllEntities/index.tsx
@@ -117,7 +117,7 @@ function AllEntities() {
   const editableTitleProps = {
     title: tag?.name || '',
     placeholder: 'testing',
-    onSave: (newDatasetName: string) => {},
+    onSave: () => {},
     canEdit: false,
     label: t('dataset name'),
   };
@@ -162,7 +162,7 @@ function AllEntities() {
         setObjects(objects);
         setLoading(false);
       },
-      (error: Response) => {
+      () => {
         addDangerToast('Error Fetching Tagged Objects');
         setLoading(false);
       },
@@ -176,7 +176,7 @@ function AllEntities() {
         setTag(tag);
         setLoading(false);
       },
-      (error: Response) => {
+      () => {
         addDangerToast(t('Error Fetching Tagged Objects'));
         setLoading(false);
       },

Reply via email to