You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2026/07/16 22:50:45 UTC
(superset) branch master updated: chore(lint): display import/no-duplicates lint rule violation as error (#42042)
This is an automated email from the ASF dual-hosted git repository.
rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 50672304840 chore(lint): display import/no-duplicates lint rule violation as error (#42042)
50672304840 is described below
commit 50672304840bf5473867f2e8daa4adf6cf234a5d
Author: Đỗ Trọng Hải <41...@users.noreply.github.com>
AuthorDate: Fri Jul 17 05:50:38 2026 +0700
chore(lint): display import/no-duplicates lint rule violation as error (#42042)
---
superset-frontend/oxlint.json | 5 ++---
.../components/Matrixify/MatrixifyGridRenderer.test.tsx | 3 +--
.../src/chart/stories/ChartDataProvider.stories.tsx | 3 +--
.../src/components/Button/Button.test.tsx | 2 +-
.../test/query/types/PostProcessing.test.ts | 4 +++-
.../playwright/generators/docs/docs-screenshots.spec.ts | 3 +--
.../test/Timeseries/transformProps.test.ts | 7 +++++--
.../test/Timeseries/transformers.test.ts | 6 ++++--
.../test/react-pivottable/tableRenders.test.tsx | 7 ++++---
.../plugins/plugin-chart-table/src/TableChart.tsx | 8 +++-----
.../src/plugin/controls/ColorSchemeControl.tsx | 5 +++--
.../src/plugin/controls/RotationControl.tsx | 6 ++++--
.../src/layers/Arc/stories/Arc.stories.tsx | 3 +--
.../src/layers/Geojson/transformProps.ts | 6 ++++--
superset-frontend/src/SqlLab/actions/sqlLab.test.ts | 3 +--
.../src/SqlLab/components/ResultSet/index.tsx | 3 +--
.../src/components/ErrorMessage/DatabaseErrorMessage.tsx | 3 +--
.../components/ErrorMessage/ParameterErrorMessage.tsx | 3 +--
.../src/components/ErrorMessage/TimeoutErrorMessage.tsx | 3 +--
superset-frontend/src/components/PanelToolbar/index.tsx | 3 +--
superset-frontend/src/dashboard/components/Dashboard.tsx | 16 ++++++++--------
.../src/explore/components/ExploreChartHeader/index.tsx | 3 ++-
.../ExploreChartHeader/useExploreMetadataBar.tsx | 3 +--
.../DndColumnSelectControl/DndColumnMetricSelect.tsx | 3 +--
.../controls/DndColumnSelectControl/DndColumnSelect.tsx | 3 +--
.../controls/DndColumnSelectControl/DndMetricSelect.tsx | 3 +--
.../components/useExploreAdditionalActionsMenu/index.tsx | 2 +-
.../components/Select/SelectFilterPlugin.test.tsx | 8 ++++++--
.../src/filters/components/Select/SelectFilterPlugin.tsx | 3 +--
.../components/TimeGrain/TimeGrainFilterPlugin.tsx | 3 +--
superset-frontend/src/pages/ChartList/index.tsx | 3 +--
superset-frontend/src/views/menu.tsx | 3 +--
32 files changed, 68 insertions(+), 71 deletions(-)
diff --git a/superset-frontend/oxlint.json b/superset-frontend/oxlint.json
index 2510baf7396..5c5af14634e 100644
--- a/superset-frontend/oxlint.json
+++ b/superset-frontend/oxlint.json
@@ -23,7 +23,7 @@
},
"settings": {
"react": {
- "version": "17.0.2"
+ "version": "18.3.1"
}
},
"rules": {
@@ -124,8 +124,7 @@
"import/no-mutable-exports": "error",
"import/no-amd": "error",
"import/first": "error",
- // TODO: Consolidate duplicate imports in DatasetList and other files
- "import/no-duplicates": "warn",
+ "import/no-duplicates": "error",
"import/no-absolute-path": "error",
"import/no-dynamic-require": "error",
"import/no-webpack-loader-syntax": "error",
diff --git a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx
index 588585372da..36a9069c9b3 100644
--- a/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/chart/components/Matrixify/MatrixifyGridRenderer.test.tsx
@@ -19,8 +19,7 @@
import { render } from '@testing-library/react';
import '@testing-library/jest-dom';
-import { ThemeProvider } from '@apache-superset/core/theme';
-import { supersetTheme } from '@apache-superset/core/theme';
+import { ThemeProvider, supersetTheme } from '@apache-superset/core/theme';
import MatrixifyGridRenderer from './MatrixifyGridRenderer';
import type { MatrixifyMode } from '../../types/matrixify';
import { generateMatrixifyGrid } from './MatrixifyGridGenerator';
diff --git a/superset-frontend/packages/superset-ui-core/src/chart/stories/ChartDataProvider.stories.tsx b/superset-frontend/packages/superset-ui-core/src/chart/stories/ChartDataProvider.stories.tsx
index 15eba0adb16..4da72a8e174 100644
--- a/superset-frontend/packages/superset-ui-core/src/chart/stories/ChartDataProvider.stories.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/chart/stories/ChartDataProvider.stories.tsx
@@ -32,8 +32,7 @@ import {
wordCloudFormData,
} from '../../../../superset-ui-core/test/chart/fixtures/formData';
-import { Expandable } from '@storybook-shared';
-import { VerifyCORS, renderError } from '@storybook-shared';
+import { Expandable, VerifyCORS, renderError } from '@storybook-shared';
const BIG_NUMBER = bigNumberFormData.viz_type;
const SANKEY = sankeyFormData.viz_type;
diff --git a/superset-frontend/packages/superset-ui-core/src/components/Button/Button.test.tsx b/superset-frontend/packages/superset-ui-core/src/components/Button/Button.test.tsx
index ddc749fa213..1281a1da242 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/Button/Button.test.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/components/Button/Button.test.tsx
@@ -17,13 +17,13 @@
* under the License.
*/
import { fireEvent, render } from '@superset-ui/core/spec';
-import { Button } from '.';
import {
ButtonGallery,
SIZES as buttonSizes,
STYLES as buttonStyles,
} from './Button.stories';
import {
+ Button,
getSecondaryButtonStyle,
getSecondaryButtonHoverStyles,
} from './index';
diff --git a/superset-frontend/packages/superset-ui-core/test/query/types/PostProcessing.test.ts b/superset-frontend/packages/superset-ui-core/test/query/types/PostProcessing.test.ts
index 4e4ff949cbd..eb1477672e1 100644
--- a/superset-frontend/packages/superset-ui-core/test/query/types/PostProcessing.test.ts
+++ b/superset-frontend/packages/superset-ui-core/test/query/types/PostProcessing.test.ts
@@ -49,8 +49,10 @@ import {
isPostProcessingRename,
isPostProcessingFlatten,
isPostProcessingRank,
+ ComparisonType,
+ RollingType,
+ TimeGranularity,
} from '@superset-ui/core';
-import { ComparisonType, RollingType, TimeGranularity } from '../../../src';
const AGGREGATES_OPTION: Aggregates = {
bar: {
diff --git a/superset-frontend/playwright/generators/docs/docs-screenshots.spec.ts b/superset-frontend/playwright/generators/docs/docs-screenshots.spec.ts
index d7bc20c45fe..ed029888c78 100644
--- a/superset-frontend/playwright/generators/docs/docs-screenshots.spec.ts
+++ b/superset-frontend/playwright/generators/docs/docs-screenshots.spec.ts
@@ -36,8 +36,7 @@
*/
import path from 'path';
-import { Page } from '@playwright/test';
-import { test, expect } from '@playwright/test';
+import { Page, test, expect } from '@playwright/test';
import { URL } from '../../utils/urls';
import { apiDelete, apiGet } from '../../helpers/api/requests';
diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts
index 74c7dfd1237..aef63c1dabe 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformProps.test.ts
@@ -32,7 +32,6 @@ import {
TimeGranularity,
} from '@superset-ui/core';
import { GenericDataType } from '@apache-superset/core/common';
-import { EchartsTimeseriesChartProps } from '../../src/types';
import type { SeriesOption } from 'echarts';
import transformProps from '../../src/Timeseries/transformProps';
import {
@@ -41,7 +40,11 @@ import {
EchartsTimeseriesFormData,
} from '../../src/Timeseries/types';
import { StackControlsValue, TIMESERIES_CONSTANTS } from '../../src/constants';
-import { LegendOrientation, LegendType } from '../../src/types';
+import {
+ LegendOrientation,
+ LegendType,
+ EchartsTimeseriesChartProps,
+} from '../../src/types';
import { DEFAULT_FORM_DATA } from '../../src/Timeseries/constants';
import { createEchartsTimeseriesTestChartProps } from '../helpers';
import { BASE_TIMESTAMP, createTestData } from './helpers';
diff --git a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts
index 19aa1d4a0d6..d73d6691f18 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/test/Timeseries/transformers.test.ts
@@ -26,14 +26,16 @@ import { supersetTheme } from '@apache-superset/core/theme';
import type { SeriesOption } from 'echarts';
import { EchartsTimeseriesSeriesType } from '../../src';
import { TIMESERIES_CONSTANTS } from '../../src/constants';
-import { LegendOrientation } from '../../src/types';
+import {
+ LegendOrientation,
+ EchartsTimeseriesChartProps,
+} from '../../src/types';
import {
transformSeries,
transformNegativeLabelsPosition,
getPadding,
} from '../../src/Timeseries/transformers';
import transformProps from '../../src/Timeseries/transformProps';
-import { EchartsTimeseriesChartProps } from '../../src/types';
import * as seriesUtils from '../../src/utils/series';
// Mock the colorScale function
diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/test/react-pivottable/tableRenders.test.tsx b/superset-frontend/plugins/plugin-chart-pivot-table/test/react-pivottable/tableRenders.test.tsx
index 84e9230980e..e0d587836d6 100644
--- a/superset-frontend/plugins/plugin-chart-pivot-table/test/react-pivottable/tableRenders.test.tsx
+++ b/superset-frontend/plugins/plugin-chart-pivot-table/test/react-pivottable/tableRenders.test.tsx
@@ -17,14 +17,15 @@
* under the License.
*/
-import { groupingValueSort } from '../../src/react-pivottable/utilities';
-
import type { ReactElement } from 'react';
import '@testing-library/jest-dom';
import { fireEvent, render, screen } from '@testing-library/react';
import { supersetTheme, ThemeProvider } from '@apache-superset/core/theme';
import { TableRenderer } from '../../src/react-pivottable/TableRenderers';
-import { aggregatorTemplates } from '../../src/react-pivottable/utilities';
+import {
+ aggregatorTemplates,
+ groupingValueSort,
+} from '../../src/react-pivottable/utilities';
jest.mock(
'react-icons/fa',
diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
index ed82329649a..65bbc5b3702 100644
--- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
+++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
@@ -35,11 +35,6 @@ import {
Row,
} from 'react-table';
import { extent as d3Extent, max as d3Max } from 'd3-array';
-import {
- CaretUpOutlined,
- CaretDownOutlined,
- ColumnHeightOutlined,
-} from '@ant-design/icons';
import cx from 'classnames';
import {
DataRecord,
@@ -68,6 +63,9 @@ import {
Tooltip,
} from '@superset-ui/core/components';
import {
+ CaretUpOutlined,
+ CaretDownOutlined,
+ ColumnHeightOutlined,
CheckOutlined,
InfoCircleOutlined,
DownOutlined,
diff --git a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl.tsx b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl.tsx
index f9f1859b1ff..4c961ce0026 100644
--- a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl.tsx
+++ b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/ColorSchemeControl.tsx
@@ -17,8 +17,9 @@
* under the License.
*/
import { getCategoricalSchemeRegistry } from '@superset-ui/core';
-import InternalColorSchemeControl from './ColorSchemeControl/index';
-import { ColorSchemes } from './ColorSchemeControl/index';
+import InternalColorSchemeControl, {
+ ColorSchemes,
+} from './ColorSchemeControl/index';
// NOTE: We copied the Explore ColorSchemeControl into this plugin to avoid
// pulling the entire frontend src tree into this package’s tsconfig (importing
// from src/ was dragging in fixtures, tests, and other plugins). Keep this copy
diff --git a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/RotationControl.tsx b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/RotationControl.tsx
index ff8a1f28b27..df004139270 100644
--- a/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/RotationControl.tsx
+++ b/superset-frontend/plugins/plugin-chart-word-cloud/src/plugin/controls/RotationControl.tsx
@@ -18,8 +18,10 @@
*/
import { t } from '@apache-superset/core/translation';
import { Select, SelectValue } from '@superset-ui/core/components';
-import { ControlHeader } from '@superset-ui/chart-controls';
-import { ControlComponentProps } from '@superset-ui/chart-controls';
+import {
+ ControlHeader,
+ ControlComponentProps,
+} from '@superset-ui/chart-controls';
type RotationControlProps = ControlComponentProps<string> & {
choices?: [string, string][];
diff --git a/superset-frontend/plugins/preset-chart-deckgl/src/layers/Arc/stories/Arc.stories.tsx b/superset-frontend/plugins/preset-chart-deckgl/src/layers/Arc/stories/Arc.stories.tsx
index c57e8c21419..5eebc7642f4 100644
--- a/superset-frontend/plugins/preset-chart-deckgl/src/layers/Arc/stories/Arc.stories.tsx
+++ b/superset-frontend/plugins/preset-chart-deckgl/src/layers/Arc/stories/Arc.stories.tsx
@@ -21,9 +21,8 @@
/* eslint-disable no-magic-numbers */
import { SuperChart } from '@superset-ui/core';
import { ArcChartPlugin } from '@superset-ui/preset-chart-deckgl';
-import { withResizableChartDemo } from '@storybook-shared';
+import { withResizableChartDemo, dummyDatasource } from '@storybook-shared';
import payload from './payload';
-import { dummyDatasource } from '@storybook-shared';
new ArcChartPlugin().configure({ key: 'deck_arc' }).register();
diff --git a/superset-frontend/plugins/preset-chart-deckgl/src/layers/Geojson/transformProps.ts b/superset-frontend/plugins/preset-chart-deckgl/src/layers/Geojson/transformProps.ts
index cfc5245de3f..996ae2a12c3 100644
--- a/superset-frontend/plugins/preset-chart-deckgl/src/layers/Geojson/transformProps.ts
+++ b/superset-frontend/plugins/preset-chart-deckgl/src/layers/Geojson/transformProps.ts
@@ -17,9 +17,11 @@
* under the License.
*/
import { ChartProps, getColumnLabel } from '@superset-ui/core';
-import { getRecordsFromQuery } from '../transformUtils';
import { DataRecord } from '../spatialUtils';
-import { createBaseTransformResult } from '../transformUtils';
+import {
+ createBaseTransformResult,
+ getRecordsFromQuery,
+} from '../transformUtils';
export default function transformProps(chartProps: ChartProps) {
const { rawFormData: formData } = chartProps;
diff --git a/superset-frontend/src/SqlLab/actions/sqlLab.test.ts b/superset-frontend/src/SqlLab/actions/sqlLab.test.ts
index 0829a8a8013..e648ec5a7e3 100644
--- a/superset-frontend/src/SqlLab/actions/sqlLab.test.ts
+++ b/superset-frontend/src/SqlLab/actions/sqlLab.test.ts
@@ -21,7 +21,7 @@ import configureMockStore from 'redux-mock-store';
import thunk from 'redux-thunk';
import type { ThunkDispatch } from 'redux-thunk';
import type { AnyAction } from 'redux';
-import { waitFor } from 'spec/helpers/testing-library';
+import { waitFor, defaultStore } from 'spec/helpers/testing-library';
import * as actions from 'src/SqlLab/actions/sqlLab';
import type { QueryEditor, Table, SqlLabRootState } from 'src/SqlLab/types';
import { LOG_EVENT } from 'src/logger/actions';
@@ -39,7 +39,6 @@ import {
queryHistoryApi,
type QueryResult,
} from 'src/hooks/apiResources/queries';
-import { defaultStore } from 'spec/helpers/testing-library';
import { ToastType } from '../../components/MessageToasts/types';
const isFeatureEnabledMock = isFeatureEnabled as unknown as jest.Mock;
diff --git a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
index 50e72efa37b..7fc71d13534 100644
--- a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
+++ b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
@@ -47,7 +47,7 @@ import {
import type { GridThemeOverrides } from 'src/components/GridTable/types';
import { buildResultsGridThemeOverrides } from './buildResultsGridThemeOverrides';
import { nanoid } from 'nanoid';
-import { t } from '@apache-superset/core/translation';
+import { t, tn } from '@apache-superset/core/translation';
import {
QueryState,
usePrevious,
@@ -55,7 +55,6 @@ import {
getExtensionsRegistry,
ErrorTypeEnum,
} from '@superset-ui/core';
-import { tn } from '@apache-superset/core/translation';
import { Alert } from '@apache-superset/core/components';
import { styled, useTheme, css } from '@apache-superset/core/theme';
import {
diff --git a/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx
index bc426cc0adf..3e1301cd256 100644
--- a/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx
+++ b/superset-frontend/src/components/ErrorMessage/DatabaseErrorMessage.tsx
@@ -17,8 +17,7 @@
* under the License.
*/
import { ReactNode } from 'react';
-import { t } from '@apache-superset/core/translation';
-import { tn } from '@apache-superset/core/translation';
+import { t, tn } from '@apache-superset/core/translation';
import type { ErrorMessageComponentProps } from './types';
import { IssueCode } from './IssueCode';
diff --git a/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx
index bc79d52613a..cacafbbafce 100644
--- a/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx
+++ b/superset-frontend/src/components/ErrorMessage/ParameterErrorMessage.tsx
@@ -17,8 +17,7 @@
* under the License.
*/
import { ReactNode } from 'react';
-import { t } from '@apache-superset/core/translation';
-import { tn } from '@apache-superset/core/translation';
+import { t, tn } from '@apache-superset/core/translation';
import levenshtein from 'js-levenshtein';
import { List } from '@superset-ui/core/components';
diff --git a/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.tsx b/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.tsx
index 058158111d0..4ad8125f72b 100644
--- a/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.tsx
+++ b/superset-frontend/src/components/ErrorMessage/TimeoutErrorMessage.tsx
@@ -17,8 +17,7 @@
* under the License.
*/
import { ReactNode } from 'react';
-import { t } from '@apache-superset/core/translation';
-import { tn } from '@apache-superset/core/translation';
+import { t, tn } from '@apache-superset/core/translation';
import type { ErrorMessageComponentProps } from './types';
import { IssueCode } from './IssueCode';
diff --git a/superset-frontend/src/components/PanelToolbar/index.tsx b/superset-frontend/src/components/PanelToolbar/index.tsx
index 5523bb23bcb..8d5e9bb39fb 100644
--- a/superset-frontend/src/components/PanelToolbar/index.tsx
+++ b/superset-frontend/src/components/PanelToolbar/index.tsx
@@ -17,12 +17,11 @@
* under the License.
*/
import { useMemo } from 'react';
-import { useMenu } from 'src/core';
import { css, useTheme } from '@apache-superset/core/theme';
import { Button, Divider, Dropdown } from '@superset-ui/core/components';
import { Menu, MenuItemType } from '@superset-ui/core/components/Menu';
import { Icons } from '@superset-ui/core/components/Icons';
-import { commands } from 'src/core';
+import { commands, useMenu } from 'src/core';
export interface PanelToolbarProps {
viewId: string;
diff --git a/superset-frontend/src/dashboard/components/Dashboard.tsx b/superset-frontend/src/dashboard/components/Dashboard.tsx
index 6b7bb48f0da..e6df7eff03d 100644
--- a/superset-frontend/src/dashboard/components/Dashboard.tsx
+++ b/superset-frontend/src/dashboard/components/Dashboard.tsx
@@ -24,7 +24,14 @@ import { Loading } from '@superset-ui/core/components';
import { PluginContext } from 'src/components';
import type { PluginContextType } from 'src/components/DynamicPlugins/types';
import getBootstrapData from 'src/utils/getBootstrapData';
-import type { Slice } from 'src/dashboard/types';
+import type {
+ Slice,
+ ActiveFilters,
+ ChartConfiguration,
+ DashboardLayout,
+ DatasourcesState,
+ LayoutItem,
+} from 'src/dashboard/types';
import getChartIdsFromLayout from '../util/getChartIdsFromLayout';
import getLayoutComponentFromChartId from '../util/getLayoutComponentFromChartId';
@@ -44,13 +51,6 @@ import type {
} from '@superset-ui/core';
import { getAffectedOwnDataCharts } from '../util/charts/getOwnDataCharts';
import { getRelatedCharts } from '../util/getRelatedCharts';
-import type {
- ActiveFilters,
- ChartConfiguration,
- DashboardLayout,
- DatasourcesState,
- LayoutItem,
-} from '../types';
type RelatedChartsFilter =
AppliedNativeFilterType | AppliedCrossFilterType | Filter;
diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx b/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx
index dddaf933353..679f25c0b18 100644
--- a/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx
+++ b/superset-frontend/src/explore/components/ExploreChartHeader/index.tsx
@@ -19,7 +19,6 @@
import { FC, memo, useCallback, useEffect, useMemo, useState } from 'react';
import { useHistory } from 'react-router-dom';
import { useDispatch } from 'react-redux';
-import { QueryFormData, JsonObject } from '@superset-ui/core';
import {
Tooltip,
Button,
@@ -28,6 +27,8 @@ import {
} from '@superset-ui/core/components';
import { AlteredSliceTag } from 'src/components';
import {
+ QueryFormData,
+ JsonObject,
SupersetClient,
isMatrixifyEnabled,
MatrixifyFormData,
diff --git a/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx b/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx
index 9f29adfcedf..3f61e82007b 100644
--- a/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx
+++ b/superset-frontend/src/explore/components/ExploreChartHeader/useExploreMetadataBar.tsx
@@ -17,8 +17,7 @@
* under the License.
*/
import { useMemo } from 'react';
-import { t } from '@apache-superset/core/translation';
-import { tn } from '@apache-superset/core/translation';
+import { t, tn } from '@apache-superset/core/translation';
import MetadataBar, {
MetadataType,
} from '@superset-ui/core/components/MetadataBar';
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx
index 3dbaa3d6b50..0c3f3999a7e 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx
@@ -17,7 +17,7 @@
* under the License.
*/
import { useCallback, useMemo, useState } from 'react';
-import { t } from '@apache-superset/core/translation';
+import { t, tn } from '@apache-superset/core/translation';
import {
AdhocColumn,
isAdhocColumn,
@@ -27,7 +27,6 @@ import {
QueryFormMetric,
QueryFormData,
} from '@superset-ui/core';
-import { tn } from '@apache-superset/core/translation';
import { ColumnMeta, isColumnMeta } from '@superset-ui/chart-controls';
import { arrayMove } from '@dnd-kit/sortable';
import { isString } from 'lodash-es';
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
index e4ef5abd60f..f269691792a 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
@@ -18,9 +18,8 @@
*/
import { useCallback, useMemo, useState } from 'react';
import { useSelector } from 'react-redux';
-import { t } from '@apache-superset/core/translation';
+import { t, tn } from '@apache-superset/core/translation';
import { AdhocColumn, QueryFormColumn, isAdhocColumn } from '@superset-ui/core';
-import { tn } from '@apache-superset/core/translation';
import { ColumnMeta, isColumnMeta } from '@superset-ui/chart-controls';
import { isEmpty } from 'lodash-es';
import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel';
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
index e7880d500a4..52a7d5d0d59 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
@@ -19,7 +19,7 @@
import { useCallback, useEffect, useMemo, useState } from 'react';
import { nanoid } from 'nanoid';
-import { t } from '@apache-superset/core/translation';
+import { t, tn } from '@apache-superset/core/translation';
import {
ensureIsArray,
isAdhocMetricSimple,
@@ -27,7 +27,6 @@ import {
Metric,
QueryFormMetric,
} from '@superset-ui/core';
-import { tn } from '@apache-superset/core/translation';
import { GenericDataType } from '@apache-superset/core/common';
import { arrayMove } from '@dnd-kit/sortable';
import { ColumnMeta } from '@superset-ui/chart-controls';
diff --git a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.tsx b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.tsx
index a8f8f32e98f..9b21454b467 100644
--- a/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.tsx
+++ b/superset-frontend/src/explore/components/useExploreAdditionalActionsMenu/index.tsx
@@ -34,6 +34,7 @@ import {
LatestQueryFormData,
QueryFormData,
Behavior,
+ getChartMetadataRegistry,
} from '@superset-ui/core';
import { css, styled, useTheme } from '@apache-superset/core/theme';
import { t } from '@apache-superset/core/translation';
@@ -43,7 +44,6 @@ import {
Button,
Input,
} from '@superset-ui/core/components';
-import { getChartMetadataRegistry } from '@superset-ui/core';
import { Menu, MenuProps } from '@superset-ui/core/components/Menu';
import { useToasts } from 'src/components/MessageToasts/withToasts';
import { DEFAULT_CSV_STREAMING_ROW_THRESHOLD } from 'src/constants';
diff --git a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx
index 892489d0eef..1db796a0dce 100644
--- a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx
+++ b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.test.tsx
@@ -16,7 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { AppSection, Behavior, ChartProps } from '@superset-ui/core';
+import {
+ AppSection,
+ Behavior,
+ ChartProps,
+ type FilterState,
+} from '@superset-ui/core';
import { supersetTheme } from '@apache-superset/core/theme';
import {
act,
@@ -29,7 +34,6 @@ import {
import { NULL_STRING } from 'src/utils/common';
import SelectFilterPlugin from './SelectFilterPlugin';
import transformProps from './transformProps';
-import { FilterState } from '@superset-ui/core';
import {
SelectFilterOperatorType,
PluginFilterSelectChartProps,
diff --git a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
index e8ab27c8c92..d6b32dd0abf 100644
--- a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
+++ b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
@@ -18,7 +18,7 @@
*/
/* eslint-disable no-param-reassign */
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
-import { t } from '@apache-superset/core/translation';
+import { t, tn } from '@apache-superset/core/translation';
import {
AppSection,
DataMask,
@@ -28,7 +28,6 @@ import {
JsonObject,
finestTemporalGrainFormatter,
} from '@superset-ui/core';
-import { tn } from '@apache-superset/core/translation';
import { styled } from '@apache-superset/core/theme';
import { GenericDataType } from '@apache-superset/core/common';
import { debounce, isUndefined } from 'lodash-es';
diff --git a/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx b/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx
index c37844121c8..10608df3d7a 100644
--- a/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx
+++ b/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx
@@ -16,13 +16,12 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { t } from '@apache-superset/core/translation';
+import { t, tn } from '@apache-superset/core/translation';
import {
ensureIsArray,
ExtraFormData,
TimeGranularity,
} from '@superset-ui/core';
-import { tn } from '@apache-superset/core/translation';
import { useEffect, useMemo, useState } from 'react';
import {
FormItem,
diff --git a/superset-frontend/src/pages/ChartList/index.tsx b/superset-frontend/src/pages/ChartList/index.tsx
index 2700617d388..47d10897c2c 100644
--- a/superset-frontend/src/pages/ChartList/index.tsx
+++ b/superset-frontend/src/pages/ChartList/index.tsx
@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { SupersetTheme } from '@apache-superset/core/theme';
+import { SupersetTheme, css, styled } from '@apache-superset/core/theme';
import { t } from '@apache-superset/core/translation';
import {
isFeatureEnabled,
@@ -27,7 +27,6 @@ import {
isMatrixifyEnabled,
handleKeyboardActivation,
} from '@superset-ui/core';
-import { css, styled } from '@apache-superset/core/theme';
import { useState, useMemo, useCallback } from 'react';
import rison from 'rison';
import { uniqBy } from 'lodash-es';
diff --git a/superset-frontend/src/views/menu.tsx b/superset-frontend/src/views/menu.tsx
index f2fd024d678..8f07ca97ffe 100644
--- a/superset-frontend/src/views/menu.tsx
+++ b/superset-frontend/src/views/menu.tsx
@@ -27,8 +27,7 @@ import { CacheProvider } from '@emotion/react';
import { QueryParamProvider } from 'use-query-params';
import { ReactRouter5Adapter } from 'use-query-params/adapters/react-router-5';
import createCache from '@emotion/cache';
-import { ThemeProvider } from '@apache-superset/core/theme';
-import { theme } from '@apache-superset/core/theme';
+import { ThemeProvider, theme } from '@apache-superset/core/theme';
import { logging } from '@apache-superset/core/utils';
import getBootstrapData from 'src/utils/getBootstrapData';
import initPreamble from 'src/preamble';