This is an automated email from the ASF dual-hosted git repository. beto pushed a commit to branch sc_71594 in repository https://gitbox.apache.org/repos/asf/superset.git
commit 3eb59fec0d120493837e96769491e30588afb30b Author: Beto Dealmeida <[email protected]> AuthorDate: Thu Sep 14 14:29:29 2023 -0700 Fix lint --- superset-frontend/src/components/Datasource/DatasourceModal.tsx | 7 ++++++- .../src/components/ErrorMessage/MarshmallowErrorMessage.tsx | 4 ++-- superset-frontend/src/components/FilterableTable/index.tsx | 1 - 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/superset-frontend/src/components/Datasource/DatasourceModal.tsx b/superset-frontend/src/components/Datasource/DatasourceModal.tsx index fa88989f8a..7cb5f630b6 100644 --- a/superset-frontend/src/components/Datasource/DatasourceModal.tsx +++ b/superset-frontend/src/components/Datasource/DatasourceModal.tsx @@ -31,6 +31,7 @@ import { import Modal from 'src/components/Modal'; import AsyncEsmComponent from 'src/components/AsyncEsmComponent'; +import { SupersetError } from 'src/components/ErrorMessage/types'; import ErrorMessageWithStackTrace from 'src/components/ErrorMessage/ErrorMessageWithStackTrace'; import withToasts from 'src/components/MessageToasts/withToasts'; import { useSelector } from 'react-redux'; @@ -67,6 +68,10 @@ interface DatasourceModalProps { show: boolean; } +interface ErrorResponse { + errors: SupersetError[]; +} + function buildExtraJsonObject(item: Record<string, unknown>) { const certification = item?.certified_by || item?.certification_details @@ -203,7 +208,7 @@ const DatasourceModal: FunctionComponent<DatasourceModalProps> = ({ }) .catch(response => { setIsSaving(false); - response.json().then(errorJson => { + response.json().then((errorJson: ErrorResponse) => { modal.error({ title: t('Error saving dataset'), okButtonProps: { danger: true, className: 'btn-danger' }, diff --git a/superset-frontend/src/components/ErrorMessage/MarshmallowErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/MarshmallowErrorMessage.tsx index 0718840121..854de2ee39 100644 --- a/superset-frontend/src/components/ErrorMessage/MarshmallowErrorMessage.tsx +++ b/superset-frontend/src/components/ErrorMessage/MarshmallowErrorMessage.tsx @@ -18,7 +18,7 @@ */ import React from 'react'; import { JSONTree } from 'react-json-tree'; -import { css, styled, t } from '@superset-ui/core'; +import { css, styled, SupersetTheme, t } from '@superset-ui/core'; import { useJsonTreeTheme } from 'src/hooks/useJsonTreeTheme'; import Collapse from 'src/components/Collapse'; @@ -38,7 +38,7 @@ const StyledUl = styled.ul` padding-top: ${({ theme }) => theme.gridUnit * 4}px; `; -const collapseStyle = theme => css` +const collapseStyle = (theme: SupersetTheme) => css` .ant-collapse-arrow { left: 0px !important; } diff --git a/superset-frontend/src/components/FilterableTable/index.tsx b/superset-frontend/src/components/FilterableTable/index.tsx index 8e7d54ef9f..b27bc33010 100644 --- a/superset-frontend/src/components/FilterableTable/index.tsx +++ b/superset-frontend/src/components/FilterableTable/index.tsx @@ -24,7 +24,6 @@ import { t, safeHtmlSpan, styled, - useTheme, } from '@superset-ui/core'; import { useDebounceValue } from 'src/hooks/useDebounceValue'; import { useJsonTreeTheme } from 'src/hooks/useJsonTreeTheme';
