From fb3f4a0ae789e8b263cd281ecda73fab0caf5f03 Mon Sep 17 00:00:00 2001 From: Ville Brofeldt Date: Mon, 27 Mar 2023 15:13:29 +0300 Subject: [PATCH] lint --- superset-frontend/src/explore/components/SaveModal.tsx | 9 +++++---- superset-frontend/src/pages/ChartCreation/index.tsx | 9 +++++---- .../src/pages/DatasetList/DatasetList.test.tsx | 6 ++---- superset-frontend/src/pages/Tags/index.tsx | 4 ++-- superset-frontend/src/views/CRUD/tags/TagCard.tsx | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/superset-frontend/src/explore/components/SaveModal.tsx b/superset-frontend/src/explore/components/SaveModal.tsx index 8d7bd2d895547..9e63f10b61488 100644 --- a/superset-frontend/src/explore/components/SaveModal.tsx +++ b/superset-frontend/src/explore/components/SaveModal.tsx @@ -25,11 +25,12 @@ import { withRouter, RouteComponentProps } from 'react-router-dom'; import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls'; import { css, - t, - styled, DatasourceType, - isDefined, ensureIsArray, + FeatureFlag, + isDefined, + styled, + t, } from '@superset-ui/core'; import { Input } from 'src/components/Input'; import { Form, FormItem } from 'src/components/Form'; @@ -41,7 +42,7 @@ import { Select } from 'src/components'; import Loading from 'src/components/Loading'; import { setSaveChartModalVisibility } from 'src/explore/actions/saveModalActions'; import { SaveActionType } from 'src/explore/types'; -import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags'; +import { isFeatureEnabled } from 'src/featureFlags'; // Session storage key for recent dashboard const SK_DASHBOARD_ID = 'save_chart_recent_dashboard'; diff --git a/superset-frontend/src/pages/ChartCreation/index.tsx b/superset-frontend/src/pages/ChartCreation/index.tsx index baa0c78f1a08d..7ff3442c9d7bc 100644 --- a/superset-frontend/src/pages/ChartCreation/index.tsx +++ b/superset-frontend/src/pages/ChartCreation/index.tsx @@ -20,11 +20,12 @@ import React, { ReactNode } from 'react'; import rison from 'rison'; import querystring from 'query-string'; import { + FeatureFlag, + isDefined, + JsonResponse, styled, - t, SupersetClient, - JsonResponse, - isDefined, + t, } from '@superset-ui/core'; import { getUrlParam } from 'src/utils/urlUtils'; import { URL_PARAMS } from 'src/constants'; @@ -33,7 +34,7 @@ import Button from 'src/components/Button'; import { AsyncSelect, Steps } from 'src/components'; import { Tooltip } from 'src/components/Tooltip'; import withToasts from 'src/components/MessageToasts/withToasts'; -import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags'; +import { isFeatureEnabled } from 'src/featureFlags'; import VizTypeGallery, { MAX_ADVISABLE_VIZ_GALLERY_WIDTH, diff --git a/superset-frontend/src/pages/DatasetList/DatasetList.test.tsx b/superset-frontend/src/pages/DatasetList/DatasetList.test.tsx index 1ce9a7bc0f636..c061d1ab2569a 100644 --- a/superset-frontend/src/pages/DatasetList/DatasetList.test.tsx +++ b/superset-frontend/src/pages/DatasetList/DatasetList.test.tsx @@ -23,6 +23,7 @@ import fetchMock from 'fetch-mock'; import { Provider } from 'react-redux'; import { styledMount as mount } from 'spec/helpers/theming'; import { render, screen, cleanup } from 'spec/helpers/testing-library'; +import { FeatureFlag } from '@superset-ui/core'; import userEvent from '@testing-library/user-event'; import { QueryParamProvider } from 'use-query-params'; import * as featureFlags from 'src/featureFlags'; @@ -255,10 +256,7 @@ describe('RTL', () => { return mounted; } - let isFeatureEnabledMock: jest.SpyInstance< - boolean, - [feature: featureFlags.FeatureFlag] - >; + let isFeatureEnabledMock: jest.SpyInstance; beforeEach(async () => { isFeatureEnabledMock = jest .spyOn(featureFlags, 'isFeatureEnabled') diff --git a/superset-frontend/src/pages/Tags/index.tsx b/superset-frontend/src/pages/Tags/index.tsx index 440e33bf9c690..13c3e8ec49a63 100644 --- a/superset-frontend/src/pages/Tags/index.tsx +++ b/superset-frontend/src/pages/Tags/index.tsx @@ -16,9 +16,9 @@ * specific language governing permissions and limitations * under the License. */ -import { t } from '@superset-ui/core'; +import { FeatureFlag, t } from '@superset-ui/core'; import React, { useMemo, useCallback } from 'react'; -import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags'; +import { isFeatureEnabled } from 'src/featureFlags'; import { createFetchRelated, createErrorHandler, diff --git a/superset-frontend/src/views/CRUD/tags/TagCard.tsx b/superset-frontend/src/views/CRUD/tags/TagCard.tsx index 84e600262e642..7ed8c1df0dc8b 100644 --- a/superset-frontend/src/views/CRUD/tags/TagCard.tsx +++ b/superset-frontend/src/views/CRUD/tags/TagCard.tsx @@ -18,9 +18,9 @@ */ import React from 'react'; import { Link } from 'react-router-dom'; -import { t, useTheme } from '@superset-ui/core'; +import { FeatureFlag, t, useTheme } from '@superset-ui/core'; import { CardStyles } from 'src/views/CRUD/utils'; -import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags'; +import { isFeatureEnabled } from 'src/featureFlags'; import { AntdDropdown } from 'src/components'; import { Menu } from 'src/components/Menu'; import ConfirmStatusChange from 'src/components/ConfirmStatusChange';