This is an automated email from the ASF dual-hosted git repository.
diegopucci 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 414cdbf83a fix(no-restricted-imports): Fix overrides and include
no-fa-icons-usage (#32571)
414cdbf83a is described below
commit 414cdbf83a2b6cf5baf535a98554baf483fecf0e
Author: Geido <[email protected]>
AuthorDate: Mon Mar 17 18:52:52 2025 +0200
fix(no-restricted-imports): Fix overrides and include no-fa-icons-usage
(#32571)
---
superset-frontend/.eslintrc.js | 138 +++++++++++++++------
.../eslint-rules/eslint-plugin-icons/index.js | 68 ++++++++++
.../eslint-plugin-icons/no-fontawesome.test.js | 61 +++++++++
.../eslint-rules/eslint-plugin-icons/package.json | 16 +++
superset-frontend/package-lock.json | 10 ++
superset-frontend/package.json | 1 +
.../src/components/ControlHeader.tsx | 6 +
superset-frontend/spec/helpers/setup.ts | 1 +
superset-frontend/spec/helpers/testing-library.tsx | 3 +
.../src/SqlLab/components/QueryTable/index.tsx | 2 +
.../src/SqlLab/components/ResultSet/index.tsx | 4 +
.../components/RunQueryActionButton/index.tsx | 2 +
.../SqlLab/components/SaveDatasetModal/index.tsx | 3 +-
.../SqlLab/components/SqlEditorLeftBar/index.tsx | 2 +
.../SqlLab/components/SqlEditorTabHeader/index.tsx | 10 ++
.../SqlLab/components/TabbedSqlEditors/index.tsx | 4 +
.../src/SqlLab/components/TableElement/index.tsx | 2 +
.../src/SqlLab/components/TablePreview/index.tsx | 3 +
.../src/components/CachedLabel/index.tsx | 2 +
.../src/components/Collapse/index.tsx | 6 +-
.../src/components/CronPicker/CronPicker.tsx | 3 +-
.../src/components/Datasource/CollectionTable.tsx | 9 +-
.../src/components/Datasource/DatasourceEditor.jsx | 2 +
.../src/components/Datasource/Field.tsx | 2 +
.../src/components/ErrorMessage/ErrorAlert.tsx | 3 +-
.../src/components/ErrorMessage/IssueCode.tsx | 2 +
superset-frontend/src/components/Form/Form.tsx | 3 +-
superset-frontend/src/components/Form/FormItem.tsx | 3 +-
.../src/components/Icons/AntdEnhanced.tsx | 1 +
superset-frontend/src/components/Icons/Icon.tsx | 1 +
superset-frontend/src/components/Icons/IconType.ts | 1 +
.../src/components/ImportModal/index.tsx | 3 +-
.../src/components/MessageToasts/Toast.tsx | 2 +
.../src/components/Select/AsyncSelect.tsx | 3 +-
.../src/components/Select/CustomTag.tsx | 3 +-
superset-frontend/src/components/Select/Select.tsx | 3 +-
.../src/components/Select/constants.ts | 3 +-
superset-frontend/src/components/Select/styles.tsx | 6 +-
superset-frontend/src/components/Select/types.ts | 6 +-
superset-frontend/src/components/Select/utils.tsx | 3 +-
.../src/components/Table/VirtualTable.tsx | 3 +-
superset-frontend/src/components/Table/index.tsx | 9 +-
.../Table/utils/InteractiveTableUtils.ts | 3 +-
.../src/components/TableSelector/index.tsx | 3 +-
superset-frontend/src/components/Tabs/Tabs.tsx | 3 +-
superset-frontend/src/components/Tags/Tag.tsx | 3 +-
superset-frontend/src/components/Tooltip/index.tsx | 3 +-
.../src/components/TooltipParagraph/index.tsx | 6 +-
superset-frontend/src/components/index.ts | 13 +-
.../src/dashboard/components/DashboardGrid.jsx | 4 +
.../src/dashboard/components/SliceHeader/index.tsx | 4 +
.../components/URLShortLinkButton/index.tsx | 6 +
.../FilterBar/FilterControls/FilterControl.tsx | 2 +
.../src/explore/components/EmbedCodeContent.jsx | 2 +
.../explore/components/PropertiesModal/index.tsx | 3 +-
.../explore/components/RunQueryButton/index.tsx | 2 +
.../controls/AnnotationLayerControl/index.tsx | 4 +
.../controls/CollectionControl/index.jsx | 2 +
.../controls/ColorSchemeControl/index.tsx | 3 +-
.../ColumnConfigControl/ColumnConfigControl.tsx | 4 +
.../ColumnConfigControl/ColumnConfigItem.tsx | 2 +
.../DateFilterControl/components/AdvancedFrame.tsx | 2 +
.../DndColumnSelectPopoverTitle.jsx | 2 +
.../DndColumnSelectControl/useResizeButton.tsx | 2 +
.../controls/LayerConfigsControl/FlatLayerTree.tsx | 9 +-
.../LayerConfigsPopoverContent.tsx | 3 +-
.../controls/LayerConfigsControl/LayerTreeItem.tsx | 6 +-
.../controls/LayerConfigsControl/dragDropUtil.tsx | 3 +-
.../controls/LayerConfigsControl/types.ts | 3 +-
.../controls/MapViewControl/ExtentTag.tsx | 3 +-
.../MetricControl/AdhocMetricEditPopover/index.jsx | 2 +
.../MetricControl/AdhocMetricEditPopoverTitle.tsx | 2 +
.../controls/SelectAsyncControl/index.tsx | 3 +-
.../src/explore/components/controls/ViewQuery.tsx | 2 +
.../components/controls/VizTypeControl/index.tsx | 2 +
.../ZoomConfigControl/ZoomConfigControl.tsx | 3 +-
.../src/features/alerts/AlertReportModal.tsx | 2 +
.../src/features/alerts/components/StyledPanel.tsx | 6 +-
.../alerts/components/ValidatedPanelHeader.tsx | 3 +-
.../databases/DatabaseModal/ModalHeader.tsx | 3 +-
.../databases/DatabaseModal/SSHTunnelForm.tsx | 3 +-
.../src/features/databases/DatabaseModal/index.tsx | 3 +-
.../features/databases/UploadDataModel/index.tsx | 6 +-
superset-frontend/src/features/databases/types.ts | 3 +-
superset-frontend/src/features/home/ChartTable.tsx | 2 +
.../src/features/home/DashboardTable.tsx | 2 +
superset-frontend/src/features/home/RightMenu.tsx | 2 +
.../src/features/home/SavedQueries.tsx | 2 +
superset-frontend/src/features/tags/TagModal.tsx | 3 +-
.../components/Select/SelectFilterPlugin.tsx | 3 +-
.../TimeColumn/TimeColumnFilterPlugin.tsx | 3 +-
.../components/TimeGrain/TimeGrainFilterPlugin.tsx | 3 +-
.../src/pages/AlertReportList/index.tsx | 4 +
.../src/pages/AnnotationLayerList/index.tsx | 4 +
.../src/pages/AnnotationList/index.tsx | 4 +
.../src/pages/ChartCreation/index.tsx | 4 +
superset-frontend/src/pages/ChartList/index.tsx | 2 +
.../src/pages/CssTemplateList/index.tsx | 2 +
.../src/pages/DashboardList/index.tsx | 2 +
superset-frontend/src/pages/DatabaseList/index.tsx | 2 +
superset-frontend/src/pages/DatasetList/index.tsx | 2 +
.../src/pages/RowLevelSecurityList/index.tsx | 4 +
.../src/pages/SavedQueryList/index.tsx | 2 +
superset-frontend/src/pages/Tags/index.tsx | 7 +-
superset-frontend/src/preamble.ts | 3 +-
superset-frontend/src/utils/downloadAsImage.ts | 1 +
106 files changed, 532 insertions(+), 97 deletions(-)
diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js
index 3d5e04cde0..65cdd18a2c 100644
--- a/superset-frontend/.eslintrc.js
+++ b/superset-frontend/.eslintrc.js
@@ -36,6 +36,45 @@ if (process.env.NODE_ENV === 'production') {
];
}
+const restrictedImportsRules = {
+ 'no-design-icons': {
+ name: '@ant-design/icons',
+ message:
+ 'Avoid importing icons directly from @ant-design/icons. Use the
src/components/Icons component instead.',
+ },
+ 'no-moment': {
+ name: 'moment',
+ message:
+ 'Please use the dayjs library instead of moment.js. See
https://day.js.org',
+ },
+ 'no-lodash-memoize': {
+ name: 'lodash/memoize',
+ message: 'Lodash Memoize is unsafe! Please use memoize-one instead',
+ },
+ 'no-testing-library-react': {
+ name: '@testing-library/react',
+ message: 'Please use spec/helpers/testing-library instead',
+ },
+ 'no-testing-library-react-dom-utils': {
+ name: '@testing-library/react-dom-utils',
+ message: 'Please use spec/helpers/testing-library instead',
+ },
+ 'no-antd': {
+ name: 'antd',
+ message: 'Please import Ant components from the index of src/components',
+ },
+ 'no-antd-v5': {
+ name: 'antd-v5',
+ message: 'Please import Ant v5 components from the index of
src/components',
+ },
+ 'no-superset-theme': {
+ name: '@superset-ui/core',
+ importNames: ['supersetTheme'],
+ message:
+ 'Please use the theme directly from the ThemeProvider rather than
importing supersetTheme.',
+ },
+};
+
module.exports = {
extends: [
'airbnb',
@@ -74,6 +113,7 @@ module.exports = {
'file-progress',
'lodash',
'theme-colors',
+ 'icons',
'i18n-strings',
'react-prefer-function-component',
'prettier',
@@ -200,6 +240,13 @@ module.exports = {
message: 'Wildcard imports are not allowed',
},
],
+ 'no-restricted-imports': [
+ 'error',
+ {
+ paths: Object.values(restrictedImportsRules).filter(Boolean),
+ patterns: ['antd/*'],
+ },
+ ],
},
settings: {
'import/resolver': {
@@ -210,6 +257,51 @@ module.exports = {
},
},
},
+ {
+ files: ['packages/**'],
+ rules: {
+ 'no-restricted-imports': [
+ 'error',
+ {
+ paths: [
+ restrictedImportsRules['no-moment'],
+ restrictedImportsRules['no-lodash-memoize'],
+ restrictedImportsRules['no-superset-theme'],
+ ],
+ patterns: [],
+ },
+ ],
+ },
+ },
+ {
+ files: ['plugins/**'],
+ rules: {
+ 'no-restricted-imports': [
+ 'error',
+ {
+ paths: [
+ restrictedImportsRules['no-moment'],
+ restrictedImportsRules['no-lodash-memoize'],
+ ],
+ patterns: [],
+ },
+ ],
+ },
+ },
+ {
+ files: ['src/components/**', 'src/theme/**'],
+ rules: {
+ 'no-restricted-imports': [
+ 'error',
+ {
+ paths: Object.values(restrictedImportsRules).filter(
+ r => r.name !== 'antd-v5',
+ ),
+ patterns: ['antd/*'],
+ },
+ ],
+ },
+ },
{
files: [
'*.test.ts',
@@ -267,6 +359,7 @@ module.exports = {
'Default React import is not required due to automatic JSX
runtime in React 16.4',
},
],
+ 'no-restricted-imports': 0,
},
},
{
@@ -284,6 +377,7 @@ module.exports = {
],
rules: {
'theme-colors/no-literal-colors': 0,
+ 'icons/no-fa-icons-usage': 0,
'i18n-strings/no-template-vars': 0,
'no-restricted-imports': 0,
'react/no-void-elements': 0,
@@ -292,6 +386,7 @@ module.exports = {
],
rules: {
'theme-colors/no-literal-colors': 'error',
+ 'icons/no-fa-icons-usage': 'error',
'i18n-strings/no-template-vars': ['error', true],
camelcase: [
'error',
@@ -330,42 +425,6 @@ module.exports = {
'no-nested-ternary': 0,
'no-prototype-builtins': 0,
'no-restricted-properties': 0,
- 'no-restricted-imports': [
- 'error',
- {
- paths: [
- {
- name: 'antd',
- message:
- 'Please import Ant components from the index of src/components',
- },
- {
- name: 'antd-v5',
- message:
- 'Please import Ant v5 components from the index of
src/components',
- },
- {
- name: '@superset-ui/core',
- importNames: ['supersetTheme'],
- message:
- 'Please use the theme directly from the ThemeProvider rather
than importing supersetTheme.',
- },
- {
- name: 'lodash/memoize',
- message: 'Lodash Memoize is unsafe! Please use memoize-one
instead',
- },
- {
- name: '@testing-library/react',
- message: 'Please use spec/helpers/testing-library instead',
- },
- {
- name: '@testing-library/react-dom-utils',
- message: 'Please use spec/helpers/testing-library instead',
- },
- ],
- patterns: ['antd/*'],
- },
- ],
'no-shadow': 0, // re-enable up for discussion
'padded-blocks': 0,
'prefer-arrow-callback': 0,
@@ -406,6 +465,13 @@ module.exports = {
'no-promise-executor-return': 0,
'react/no-unused-class-component-methods': 0,
'react/react-in-jsx-scope': 0,
+ 'no-restricted-imports': [
+ 'error',
+ {
+ paths: Object.values(restrictedImportsRules).filter(Boolean),
+ patterns: ['antd/*'],
+ },
+ ],
},
ignorePatterns,
};
diff --git a/superset-frontend/eslint-rules/eslint-plugin-icons/index.js
b/superset-frontend/eslint-rules/eslint-plugin-icons/index.js
new file mode 100644
index 0000000000..a3dae1a3c1
--- /dev/null
+++ b/superset-frontend/eslint-rules/eslint-plugin-icons/index.js
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @fileoverview Rule to warn about direct imports from @ant-design/icons
+ * @author Apache
+ */
+
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+
+/** @type {import('eslint').Rule.RuleModule} */
+module.exports = {
+ rules: {
+ 'no-fa-icons-usage': {
+ meta: {
+ type: 'problem',
+ docs: {
+ description:
+ 'Disallow the usage of FontAwesome icons in the codebase',
+ category: 'Best Practices',
+ },
+ schema: [],
+ },
+ create(context) {
+ return {
+ // Check for JSX elements with class names containing "fa"
+ JSXElement(node) {
+ if (
+ node.openingElement &&
+ node.openingElement.name.name === 'i' &&
+ node.openingElement.attributes &&
+ node.openingElement.attributes.some(
+ attr =>
+ attr.name &&
+ attr.name.name === 'className' &&
+ /fa fa-/.test(attr.value.value),
+ )
+ ) {
+ context.report({
+ node,
+ message:
+ 'FontAwesome icons should not be used. Use the
src/components/Icons component instead.',
+ });
+ }
+ },
+ };
+ },
+ },
+ },
+};
diff --git
a/superset-frontend/eslint-rules/eslint-plugin-icons/no-fontawesome.test.js
b/superset-frontend/eslint-rules/eslint-plugin-icons/no-fontawesome.test.js
new file mode 100644
index 0000000000..52a81eabe9
--- /dev/null
+++ b/superset-frontend/eslint-rules/eslint-plugin-icons/no-fontawesome.test.js
@@ -0,0 +1,61 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * @fileoverview Test file for the no-fa-icons-usage rule
+ * @author Apache
+ */
+
+const { RuleTester } = require('eslint');
+const plugin = require('.');
+
+//------------------------------------------------------------------------------
+// Tests
+//------------------------------------------------------------------------------
+const ruleTester = new RuleTester({ parserOptions: { ecmaVersion: 6 } });
+const rule = plugin.rules['no-fa-icons-usage'];
+
+const errors = [
+ {
+ message:
+ 'FontAwesome icons should not be used. Use the src/components/Icons
component instead.',
+ },
+];
+
+ruleTester.run('no-fa-icons-usage', rule, {
+ valid: ['<Icons.Database />', '<Icons.Search />'],
+ invalid: [
+ {
+ code: '<i className="fa fa-database"></i>',
+ errors,
+ },
+ {
+ code: '<i className="fa fa-search"></i>',
+ errors,
+ },
+ {
+ code: '<i className="fa fa-home"></i>',
+ errors,
+ },
+ {
+ code: '<i className="fa fa-arrow-right"></i>',
+ errors,
+ },
+ ],
+});
diff --git a/superset-frontend/eslint-rules/eslint-plugin-icons/package.json
b/superset-frontend/eslint-rules/eslint-plugin-icons/package.json
new file mode 100644
index 0000000000..f2118e936c
--- /dev/null
+++ b/superset-frontend/eslint-rules/eslint-plugin-icons/package.json
@@ -0,0 +1,16 @@
+{
+ "name": "eslint-plugin-icons",
+ "version": "1.0.0",
+ "description": "Warns about direct usage of Ant Design icons",
+ "main": "index.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "keywords": [],
+ "license": "Apache-2.0",
+ "author": "Apache",
+ "dependencies": {},
+ "peerDependencies": {
+ "eslint": ">=0.8.0"
+ }
+}
diff --git a/superset-frontend/package-lock.json
b/superset-frontend/package-lock.json
index 63f9adb705..95f10d09ea 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -243,6 +243,7 @@
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-cypress": "^3.6.0",
"eslint-plugin-file-progress": "^1.5.0",
+ "eslint-plugin-icons": "file:eslint-rules/eslint-plugin-icons",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jest": "^27.8.0",
"eslint-plugin-jest-dom": "^5.5.0",
@@ -317,6 +318,11 @@
"eslint": ">=0.8.0"
}
},
+ "eslint-rules/eslint-plugin-icons": {
+ "version": "1.0.0",
+ "dev": true,
+ "license": "Apache-2.0"
+ },
"eslint-rules/eslint-plugin-theme-colors": {
"version": "1.0.0",
"dev": true,
@@ -21906,6 +21912,10 @@
"resolved": "eslint-rules/eslint-plugin-i18n-strings",
"link": true
},
+ "node_modules/eslint-plugin-icons": {
+ "resolved": "eslint-rules/eslint-plugin-icons",
+ "link": true
+ },
"node_modules/eslint-plugin-import": {
"version": "2.31.0",
"resolved":
"https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz",
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 7e0bb92d9b..7f207f1972 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -310,6 +310,7 @@
"eslint-import-resolver-typescript": "^3.7.0",
"eslint-plugin-cypress": "^3.6.0",
"eslint-plugin-file-progress": "^1.5.0",
+ "eslint-plugin-icons": "file:eslint-rules/eslint-plugin-icons",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jest": "^27.8.0",
"eslint-plugin-jest-dom": "^5.5.0",
diff --git
a/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlHeader.tsx
b/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlHeader.tsx
index baa4df55b8..44e47d55e9 100644
---
a/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlHeader.tsx
+++
b/superset-frontend/packages/superset-ui-chart-controls/src/components/ControlHeader.tsx
@@ -105,6 +105,8 @@ export function ControlHeader({
{warning && (
<span>
<Tooltip id="error-tooltip" placement="top" title={warning}>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-exclamation-circle text-warning" />
</Tooltip>{' '}
</span>
@@ -112,6 +114,8 @@ export function ControlHeader({
{danger && (
<span>
<Tooltip id="error-tooltip" placement="top" title={danger}>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-exclamation-circle text-danger" />
</Tooltip>{' '}
</span>
@@ -123,6 +127,8 @@ export function ControlHeader({
placement="top"
title={validationErrors.join(' ')}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-exclamation-circle text-danger" />
</Tooltip>{' '}
</span>
diff --git a/superset-frontend/spec/helpers/setup.ts
b/superset-frontend/spec/helpers/setup.ts
index 553bd416a7..6af5a181ff 100644
--- a/superset-frontend/spec/helpers/setup.ts
+++ b/superset-frontend/spec/helpers/setup.ts
@@ -19,6 +19,7 @@
import './shim';
// eslint-disable-next-line no-restricted-syntax -- whole React import is
required for mocking React module in tests.
import React from 'react';
+// eslint-disable-next-line no-restricted-imports
import { configure as configureTestingLibrary } from '@testing-library/react';
import { matchers } from '@emotion/jest';
diff --git a/superset-frontend/spec/helpers/testing-library.tsx
b/superset-frontend/spec/helpers/testing-library.tsx
index 29bbbdf412..0734796771 100644
--- a/superset-frontend/spec/helpers/testing-library.tsx
+++ b/superset-frontend/spec/helpers/testing-library.tsx
@@ -18,6 +18,7 @@
*/
import '@testing-library/jest-dom';
import { ReactNode, ReactElement } from 'react';
+// eslint-disable-next-line no-restricted-imports
import {
render,
RenderOptions,
@@ -25,6 +26,7 @@ import {
waitFor,
within,
} from '@testing-library/react';
+// eslint-disable-next-line no-restricted-imports
import { ThemeProvider, supersetTheme } from '@superset-ui/core';
import { BrowserRouter } from 'react-router-dom';
import { Provider } from 'react-redux';
@@ -107,6 +109,7 @@ export function sleep(time: number) {
});
}
+// eslint-disable-next-line no-restricted-imports
export * from '@testing-library/react';
export { customRender as render };
export { default as userEvent } from '@testing-library/user-event';
diff --git a/superset-frontend/src/SqlLab/components/QueryTable/index.tsx
b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx
index baf0e6f35f..4fa44ff497 100644
--- a/superset-frontend/src/SqlLab/components/QueryTable/index.tsx
+++ b/superset-frontend/src/SqlLab/components/QueryTable/index.tsx
@@ -277,6 +277,8 @@ const QueryTable = ({
buttonStyle="link"
onClick={() => openQuery(q.queryId)}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-external-link m-r-3" />
{t('Edit')}
</Button>
diff --git a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
index db44fdda16..fb375260e4 100644
--- a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
+++ b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
@@ -361,6 +361,8 @@ const ResultSet = ({
}
}}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-file-text-o" /> {t('Download to CSV')}
</Button>
)}
@@ -374,6 +376,8 @@ const ResultSet = ({
buttonSize="small"
data-test="copy-to-clipboard-button"
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-clipboard" /> {t('Copy to Clipboard')}
</Button>
}
diff --git
a/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx
b/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx
index 0992d64a79..97d024407b 100644
--- a/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx
+++ b/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx
@@ -48,6 +48,8 @@ const buildText = (
if (shouldShowStopButton) {
return (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-stop" /> {t('Stop')}
</>
);
diff --git a/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
b/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
index ab17556a72..1138b00125 100644
--- a/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
+++ b/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
@@ -49,7 +49,8 @@ import {
import { mountExploreUrl } from 'src/explore/exploreUtils';
import { postFormData } from 'src/explore/exploreUtils/formData';
import { URL_PARAMS } from 'src/constants';
-import { SelectValue } from 'antd/lib/select';
+// eslint-disable-next-line no-restricted-imports
+import { SelectValue } from 'antd/lib/select'; // TODO: Remove antd
import { isEmpty } from 'lodash';
interface QueryDatabase {
diff --git a/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx
b/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx
index 360376a1d8..59fd26023f 100644
--- a/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx
+++ b/superset-frontend/src/SqlLab/components/SqlEditorLeftBar/index.tsx
@@ -298,6 +298,8 @@ const SqlEditorLeftBar = ({
buttonStyle="danger"
onClick={handleResetState}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-bomb" /> {t('Reset state')}
</Button>
)}
diff --git
a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx
b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx
index 76c8b74b19..e06279ebc5 100644
--- a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx
+++ b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx
@@ -99,6 +99,8 @@ const SqlEditorTabHeader: FC<Props> = ({ queryEditor }) => {
data-test="close-tab-menu-option"
>
<IconContainer>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-close" />
</IconContainer>
{t('Close tab')}
@@ -109,6 +111,8 @@ const SqlEditorTabHeader: FC<Props> = ({ queryEditor }) => {
data-test="rename-tab-menu-option"
>
<IconContainer>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-i-cursor" />
</IconContainer>
{t('Rename tab')}
@@ -119,6 +123,8 @@ const SqlEditorTabHeader: FC<Props> = ({ queryEditor }) => {
data-test="toggle-menu-option"
>
<IconContainer>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-cogs" />
</IconContainer>
{qe.hideLeftBar ? t('Expand tool bar') : t('Hide tool bar')}
@@ -129,6 +135,8 @@ const SqlEditorTabHeader: FC<Props> = ({ queryEditor }) => {
data-test="close-all-other-menu-option"
>
<IconContainer>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-times-circle-o" />
</IconContainer>
{t('Close all other tabs')}
@@ -139,6 +147,8 @@ const SqlEditorTabHeader: FC<Props> = ({ queryEditor }) => {
data-test="clone-tab-menu-option"
>
<IconContainer>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-files-o" />
</IconContainer>
{t('Duplicate tab')}
diff --git a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx
b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx
index a9360ad655..21a9c8a97d 100644
--- a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx
+++ b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx
@@ -247,6 +247,8 @@ class TabbedSqlEditors extends
PureComponent<TabbedSqlEditorsProps> {
: t('New tab (Ctrl + t)')
}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i data-test="add-tab-icon" className="fa fa-plus-circle" />
</Tooltip>
</StyledTab>
@@ -289,6 +291,8 @@ class TabbedSqlEditors extends
PureComponent<TabbedSqlEditorsProps> {
: t('New tab (Ctrl + t)')
}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i data-test="add-tab-icon" className="fa fa-plus-circle" />
</Tooltip>
}
diff --git a/superset-frontend/src/SqlLab/components/TableElement/index.tsx
b/superset-frontend/src/SqlLab/components/TableElement/index.tsx
index 5817e5662c..f65229fd6f 100644
--- a/superset-frontend/src/SqlLab/components/TableElement/index.tsx
+++ b/superset-frontend/src/SqlLab/components/TableElement/index.tsx
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// TODO: Remove fa-icon
+/* eslint-disable icons/no-fa-icons-usage */
import { useState, useRef, useEffect } from 'react';
import { useDispatch } from 'react-redux';
import type { Table } from 'src/SqlLab/types';
diff --git a/superset-frontend/src/SqlLab/components/TablePreview/index.tsx
b/superset-frontend/src/SqlLab/components/TablePreview/index.tsx
index a52f5a71d8..5ed54874e5 100644
--- a/superset-frontend/src/SqlLab/components/TablePreview/index.tsx
+++ b/superset-frontend/src/SqlLab/components/TablePreview/index.tsx
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// TODO: Remove fa-icon
+/* eslint-disable icons/no-fa-icons-usage */
import { type FC, useCallback, useMemo, useRef, useState } from 'react';
import { shallowEqual, useDispatch, useSelector } from 'react-redux';
import { nanoid } from 'nanoid';
@@ -58,6 +60,7 @@ type Props = {
const extensionsRegistry = getExtensionsRegistry();
const COLUMN_KEYS = ['column_name', 'column_type', 'keys', 'comment'];
+// TODO: Remove fa-icon
const MENUS = [
{
key: 'refresh-table',
diff --git a/superset-frontend/src/components/CachedLabel/index.tsx
b/superset-frontend/src/components/CachedLabel/index.tsx
index e237c3a164..9fd35b4154 100644
--- a/superset-frontend/src/components/CachedLabel/index.tsx
+++ b/superset-frontend/src/components/CachedLabel/index.tsx
@@ -49,6 +49,8 @@ const CacheLabel: FC<CacheLabelProps> = ({
onMouseOver={() => setHovered(true)}
onMouseOut={() => setHovered(false)}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('Cached')} <i className="fa fa-refresh" />
</Label>
</Tooltip>
diff --git a/superset-frontend/src/components/Collapse/index.tsx
b/superset-frontend/src/components/Collapse/index.tsx
index b2e0e206b6..42af995bb9 100644
--- a/superset-frontend/src/components/Collapse/index.tsx
+++ b/superset-frontend/src/components/Collapse/index.tsx
@@ -17,8 +17,10 @@
* under the License.
*/
import { styled } from '@superset-ui/core';
-import { Collapse as AntdCollapse } from 'antd';
-import { CollapseProps as AntdCollapseProps } from 'antd/lib/collapse';
+// eslint-disable-next-line no-restricted-imports
+import { Collapse as AntdCollapse } from 'antd'; // TODO: Remove antd
+// eslint-disable-next-line no-restricted-imports
+import { CollapseProps as AntdCollapseProps } from 'antd/lib/collapse'; //
TODO: Remove antd
export interface CollapseProps extends AntdCollapseProps {
light?: boolean;
diff --git a/superset-frontend/src/components/CronPicker/CronPicker.tsx
b/superset-frontend/src/components/CronPicker/CronPicker.tsx
index 9c65106e18..3e0e93d65d 100644
--- a/superset-frontend/src/components/CronPicker/CronPicker.tsx
+++ b/superset-frontend/src/components/CronPicker/CronPicker.tsx
@@ -16,7 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { ConfigProvider } from 'antd';
+// eslint-disable-next-line no-restricted-imports
+import { ConfigProvider } from 'antd'; // TODO: Remove antd
import { styled, t } from '@superset-ui/core';
import ReactCronPicker, { Locale, CronProps } from 'react-js-cron';
diff --git a/superset-frontend/src/components/Datasource/CollectionTable.tsx
b/superset-frontend/src/components/Datasource/CollectionTable.tsx
index 3a6543b408..23f725b0a4 100644
--- a/superset-frontend/src/components/Datasource/CollectionTable.tsx
+++ b/superset-frontend/src/components/Datasource/CollectionTable.tsx
@@ -400,6 +400,8 @@ export default class CRUDCollection extends PureComponent<
role="button"
aria-label="Toggle expand"
tabIndex={0}
+ // TODO: Remove fa-icon
+ // eslint-disable-next-line icons/no-fa-icons-usage
className={`fa fa-caret-${
isExpanded ? 'down' : 'right'
} text-primary pointer`}
@@ -484,7 +486,12 @@ export default class CRUDCollection extends PureComponent<
onClick={this.onAddItem}
data-test="add-item-button"
>
- <i data-test="crud-add-table-item" className="fa fa-plus" />{'
'}
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
+ <i
+ data-test="crud-add-table-item"
+ className="fa fa-plus"
+ />{' '}
{t('Add item')}
</Button>
</StyledButtonWrapper>
diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
index fae0270828..40205b854c 100644
--- a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
+++ b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
@@ -1380,6 +1380,8 @@ class DatasourceEditor extends PureComponent {
className="sync-from-source"
disabled={this.state.isEditMode}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-database" />{' '}
{t('Sync columns from source')}
</Button>
diff --git a/superset-frontend/src/components/Datasource/Field.tsx
b/superset-frontend/src/components/Datasource/Field.tsx
index 3751e414b1..1232f0208c 100644
--- a/superset-frontend/src/components/Datasource/Field.tsx
+++ b/superset-frontend/src/components/Datasource/Field.tsx
@@ -68,6 +68,8 @@ export default function Field<V>({
{label || fieldKey}
{compact && description && (
<Tooltip id="field-descr" placement="right" title={description}>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-info-circle m-l-5" />
</Tooltip>
)}
diff --git a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx
b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx
index 4ad75eb21a..ac52d0cd3f 100644
--- a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx
+++ b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx
@@ -19,7 +19,8 @@
import { useState } from 'react';
import { Tooltip } from 'src/components/Tooltip';
import Modal from 'src/components/Modal';
-import { ExclamationCircleOutlined, WarningOutlined } from '@ant-design/icons';
+// eslint-disable-next-line no-restricted-imports
+import { ExclamationCircleOutlined, WarningOutlined } from
'@ant-design/icons'; // TODO: Use src/components/Icons
import Alert from 'src/components/Alert';
import { t, useTheme } from '@superset-ui/core';
diff --git a/superset-frontend/src/components/ErrorMessage/IssueCode.tsx
b/superset-frontend/src/components/ErrorMessage/IssueCode.tsx
index efa367dbd4..f862f3589e 100644
--- a/superset-frontend/src/components/ErrorMessage/IssueCode.tsx
+++ b/superset-frontend/src/components/ErrorMessage/IssueCode.tsx
@@ -31,6 +31,8 @@ export default function IssueCode({ code, message }:
IssueCodeProps) {
target="_blank"
aria-label="Superset docs link"
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-external-link" />
</a>
</>
diff --git a/superset-frontend/src/components/Form/Form.tsx
b/superset-frontend/src/components/Form/Form.tsx
index 143f0494bb..66a9f58d7f 100644
--- a/superset-frontend/src/components/Form/Form.tsx
+++ b/superset-frontend/src/components/Form/Form.tsx
@@ -16,7 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-import AntdForm, { FormProps } from 'antd/lib/form';
+// eslint-disable-next-line no-restricted-imports
+import AntdForm, { FormProps } from 'antd/lib/form'; // TODO: Remove antd
import { styled } from '@superset-ui/core';
const StyledForm = styled(AntdForm)`
diff --git a/superset-frontend/src/components/Form/FormItem.tsx
b/superset-frontend/src/components/Form/FormItem.tsx
index dd829cd1e4..97fee96689 100644
--- a/superset-frontend/src/components/Form/FormItem.tsx
+++ b/superset-frontend/src/components/Form/FormItem.tsx
@@ -16,7 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-import Form from 'antd/lib/form';
+// eslint-disable-next-line no-restricted-imports
+import Form from 'antd/lib/form'; // TODO: Remove antd
import { styled } from '@superset-ui/core';
const StyledItem = styled(Form.Item)`
diff --git a/superset-frontend/src/components/Icons/AntdEnhanced.tsx
b/superset-frontend/src/components/Icons/AntdEnhanced.tsx
index 423e2b39ee..90d7da612b 100644
--- a/superset-frontend/src/components/Icons/AntdEnhanced.tsx
+++ b/superset-frontend/src/components/Icons/AntdEnhanced.tsx
@@ -18,6 +18,7 @@
*/
// NOTE: Targeted import (as opposed to `import *`) is important here for
proper tree-shaking
+// eslint-disable-next-line no-restricted-imports
import {
AlignCenterOutlined,
AlignLeftOutlined,
diff --git a/superset-frontend/src/components/Icons/Icon.tsx
b/superset-frontend/src/components/Icons/Icon.tsx
index 39e5627235..7e299cc520 100644
--- a/superset-frontend/src/components/Icons/Icon.tsx
+++ b/superset-frontend/src/components/Icons/Icon.tsx
@@ -18,6 +18,7 @@
*/
import { FC, SVGProps, useEffect, useRef, useState } from 'react';
+// eslint-disable-next-line no-restricted-imports
import AntdIcon from '@ant-design/icons';
import { styled } from '@superset-ui/core';
import TransparentIcon from 'src/assets/images/icons/transparent.svg';
diff --git a/superset-frontend/src/components/Icons/IconType.ts
b/superset-frontend/src/components/Icons/IconType.ts
index 41a4089e12..b055cb06bc 100644
--- a/superset-frontend/src/components/Icons/IconType.ts
+++ b/superset-frontend/src/components/Icons/IconType.ts
@@ -16,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
+// eslint-disable-next-line no-restricted-imports
import { IconComponentProps } from '@ant-design/icons/lib/components/Icon';
type AntdIconType = IconComponentProps;
diff --git a/superset-frontend/src/components/ImportModal/index.tsx
b/superset-frontend/src/components/ImportModal/index.tsx
index 69d8f3a751..12b4be4f4f 100644
--- a/superset-frontend/src/components/ImportModal/index.tsx
+++ b/superset-frontend/src/components/ImportModal/index.tsx
@@ -18,7 +18,8 @@
*/
import { FunctionComponent, useEffect, useState, ChangeEvent } from 'react';
-import { UploadChangeParam, UploadFile } from 'antd/lib/upload/interface';
+// eslint-disable-next-line no-restricted-imports
+import { UploadChangeParam, UploadFile } from 'antd/lib/upload/interface'; //
TODO: Remove antd
import { styled, t } from '@superset-ui/core';
import Button from 'src/components/Button';
diff --git a/superset-frontend/src/components/MessageToasts/Toast.tsx
b/superset-frontend/src/components/MessageToasts/Toast.tsx
index 65cbb8b119..a9bc4f8a7b 100644
--- a/superset-frontend/src/components/MessageToasts/Toast.tsx
+++ b/superset-frontend/src/components/MessageToasts/Toast.tsx
@@ -98,6 +98,8 @@ export default function Toast({ toast, onCloseToast }:
ToastPresenterProps) {
>
{icon}
<Interweave content={toast.text} noHtml={!toast.allowHtml} />
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i
className="fa fa-close pull-right pointer"
role="button"
diff --git a/superset-frontend/src/components/Select/AsyncSelect.tsx
b/superset-frontend/src/components/Select/AsyncSelect.tsx
index c63513491e..5004a49a8b 100644
--- a/superset-frontend/src/components/Select/AsyncSelect.tsx
+++ b/superset-frontend/src/components/Select/AsyncSelect.tsx
@@ -37,7 +37,8 @@ import {
usePrevious,
getClientErrorObject,
} from '@superset-ui/core';
-import { LabeledValue as AntdLabeledValue } from 'antd/lib/select';
+// eslint-disable-next-line no-restricted-imports
+import { LabeledValue as AntdLabeledValue } from 'antd/lib/select'; // TODO:
Remove antd
import { debounce, isEqual, uniq } from 'lodash';
import Icons from 'src/components/Icons';
import { FAST_DEBOUNCE, SLOW_DEBOUNCE } from 'src/constants';
diff --git a/superset-frontend/src/components/Select/CustomTag.tsx
b/superset-frontend/src/components/Select/CustomTag.tsx
index 5a0f4a791f..bb5a8fc7cd 100644
--- a/superset-frontend/src/components/Select/CustomTag.tsx
+++ b/superset-frontend/src/components/Select/CustomTag.tsx
@@ -17,7 +17,8 @@
* under the License.
*/
import { MouseEvent } from 'react';
-import { Tag as AntdTag } from 'antd';
+// eslint-disable-next-line no-restricted-imports
+import { Tag as AntdTag } from 'antd'; // TODO: Remove antd
import { styled, useCSSTextTruncation } from '@superset-ui/core';
import { Tooltip } from '../Tooltip';
import { CustomCloseIcon } from '../Tags/Tag';
diff --git a/superset-frontend/src/components/Select/Select.tsx
b/superset-frontend/src/components/Select/Select.tsx
index 91f9515448..0a3e04f88d 100644
--- a/superset-frontend/src/components/Select/Select.tsx
+++ b/superset-frontend/src/components/Select/Select.tsx
@@ -35,7 +35,8 @@ import {
t,
usePrevious,
} from '@superset-ui/core';
-import AntdSelect, { LabeledValue as AntdLabeledValue } from 'antd/lib/select';
+// eslint-disable-next-line no-restricted-imports
+import AntdSelect, { LabeledValue as AntdLabeledValue } from
'antd/lib/select'; // TODO: Remove antd
import { debounce, isEqual, uniq } from 'lodash';
import { FAST_DEBOUNCE } from 'src/constants';
import {
diff --git a/superset-frontend/src/components/Select/constants.ts
b/superset-frontend/src/components/Select/constants.ts
index 63218d9b71..248f881df1 100644
--- a/superset-frontend/src/components/Select/constants.ts
+++ b/superset-frontend/src/components/Select/constants.ts
@@ -16,7 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { LabeledValue as AntdLabeledValue } from 'antd/lib/select';
+// eslint-disable-next-line no-restricted-imports
+import { LabeledValue as AntdLabeledValue } from 'antd/lib/select'; // TODO:
Remove antd
import { rankedSearchCompare } from 'src/utils/rankedSearchCompare';
export const MAX_TAG_COUNT = 4;
diff --git a/superset-frontend/src/components/Select/styles.tsx
b/superset-frontend/src/components/Select/styles.tsx
index d68b391593..726f6af628 100644
--- a/superset-frontend/src/components/Select/styles.tsx
+++ b/superset-frontend/src/components/Select/styles.tsx
@@ -18,8 +18,10 @@
*/
import { styled } from '@superset-ui/core';
import Icons from 'src/components/Icons';
-import { Spin, Tag } from 'antd';
-import AntdSelect from 'antd/lib/select';
+// eslint-disable-next-line no-restricted-imports
+import { Spin, Tag } from 'antd'; // TODO: Remove antd
+// eslint-disable-next-line no-restricted-imports
+import AntdSelect from 'antd/lib/select'; // TODO: Remove antd
export const StyledHeader = styled.span<{ headerPosition: string }>`
${({ theme, headerPosition }) => `
diff --git a/superset-frontend/src/components/Select/types.ts
b/superset-frontend/src/components/Select/types.ts
index e8a1ee8248..85d380bdfa 100644
--- a/superset-frontend/src/components/Select/types.ts
+++ b/superset-frontend/src/components/Select/types.ts
@@ -22,12 +22,14 @@ import {
ReactNode,
RefObject,
} from 'react';
+// eslint-disable-next-line no-restricted-imports
import {
SelectProps as AntdSelectProps,
SelectValue as AntdSelectValue,
LabeledValue as AntdLabeledValue,
-} from 'antd/lib/select';
-import { TagProps } from 'antd/lib/tag';
+} from 'antd/lib/select'; // TODO: Remove antd
+// eslint-disable-next-line no-restricted-imports
+import { TagProps } from 'antd/lib/tag'; // TODO: Remove antd
export type RawValue = string | number;
diff --git a/superset-frontend/src/components/Select/utils.tsx
b/superset-frontend/src/components/Select/utils.tsx
index 454d6757ca..0c21ec228e 100644
--- a/superset-frontend/src/components/Select/utils.tsx
+++ b/superset-frontend/src/components/Select/utils.tsx
@@ -17,7 +17,8 @@
* under the License.
*/
import { ensureIsArray, t } from '@superset-ui/core';
-import AntdSelect, { LabeledValue as AntdLabeledValue } from 'antd/lib/select';
+// eslint-disable-next-line no-restricted-imports
+import AntdSelect, { LabeledValue as AntdLabeledValue } from
'antd/lib/select'; // TODO: Remove antd
import { ReactElement, RefObject } from 'react';
import Icons from 'src/components/Icons';
import { StyledHelperText, StyledLoadingText, StyledSpin } from './styles';
diff --git a/superset-frontend/src/components/Table/VirtualTable.tsx
b/superset-frontend/src/components/Table/VirtualTable.tsx
index 4eb4842e83..7e2f97a6e5 100644
--- a/superset-frontend/src/components/Table/VirtualTable.tsx
+++ b/superset-frontend/src/components/Table/VirtualTable.tsx
@@ -17,10 +17,11 @@
* under the License.
*/
+// eslint-disable-next-line no-restricted-imports
import AntTable, {
TablePaginationConfig,
TableProps as AntTableProps,
-} from 'antd/lib/table';
+} from 'antd/lib/table'; // TODO: Remove antd
import classNames from 'classnames';
import { useResizeDetector } from 'react-resize-detector';
import { useEffect, useRef, useState, useCallback, CSSProperties } from
'react';
diff --git a/superset-frontend/src/components/Table/index.tsx
b/superset-frontend/src/components/Table/index.tsx
index fb37aa9ce9..b16f254a27 100644
--- a/superset-frontend/src/components/Table/index.tsx
+++ b/superset-frontend/src/components/Table/index.tsx
@@ -18,14 +18,17 @@
*/
import { useState, useEffect, useRef, Key } from 'react';
+// eslint-disable-next-line no-restricted-imports
import AntTable, {
ColumnsType,
TableProps as AntTableProps,
-} from 'antd/lib/table';
-import { PaginationProps } from 'antd/lib/pagination';
+} from 'antd/lib/table'; // TODO: Remove antd
+// eslint-disable-next-line no-restricted-imports
+import { PaginationProps } from 'antd/lib/pagination'; // TODO: Remove antd
import { t, useTheme, logging, styled } from '@superset-ui/core';
import Loading from 'src/components/Loading';
-import { RowSelectionType } from 'antd/lib/table/interface';
+// eslint-disable-next-line no-restricted-imports
+import { RowSelectionType } from 'antd/lib/table/interface'; // TODO: Remove
antd
import InteractiveTableUtils from './utils/InteractiveTableUtils';
import VirtualTable from './VirtualTable';
diff --git
a/superset-frontend/src/components/Table/utils/InteractiveTableUtils.ts
b/superset-frontend/src/components/Table/utils/InteractiveTableUtils.ts
index 94977413e2..70030a3bc4 100644
--- a/superset-frontend/src/components/Table/utils/InteractiveTableUtils.ts
+++ b/superset-frontend/src/components/Table/utils/InteractiveTableUtils.ts
@@ -16,7 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-import type { ColumnsType } from 'antd/es/table';
+// eslint-disable-next-line no-restricted-imports
+import type { ColumnsType } from 'antd/es/table'; // TODO: Remove antd
import { SUPERSET_TABLE_COLUMN } from 'src/components/Table';
import { withinRange } from './utils';
diff --git a/superset-frontend/src/components/TableSelector/index.tsx
b/superset-frontend/src/components/TableSelector/index.tsx
index 940f42cb3d..cfb7d5f818 100644
--- a/superset-frontend/src/components/TableSelector/index.tsx
+++ b/superset-frontend/src/components/TableSelector/index.tsx
@@ -23,7 +23,8 @@ import {
useMemo,
useEffect,
} from 'react';
-import { SelectValue } from 'antd/lib/select';
+// eslint-disable-next-line no-restricted-imports
+import { SelectValue } from 'antd/lib/select'; // TODO: Remove antd
import {
styled,
diff --git a/superset-frontend/src/components/Tabs/Tabs.tsx
b/superset-frontend/src/components/Tabs/Tabs.tsx
index 3af2ecec36..9ba165dc35 100644
--- a/superset-frontend/src/components/Tabs/Tabs.tsx
+++ b/superset-frontend/src/components/Tabs/Tabs.tsx
@@ -17,7 +17,8 @@
* under the License.
*/
import { css, styled } from '@superset-ui/core';
-import AntdTabs, { TabsProps as AntdTabsProps } from 'antd/lib/tabs';
+// eslint-disable-next-line no-restricted-imports
+import AntdTabs, { TabsProps as AntdTabsProps } from 'antd/lib/tabs'; // TODO:
Remove antd
import Icons from 'src/components/Icons';
export interface TabsProps extends AntdTabsProps {
diff --git a/superset-frontend/src/components/Tags/Tag.tsx
b/superset-frontend/src/components/Tags/Tag.tsx
index 0683a782f5..e8bba93742 100644
--- a/superset-frontend/src/components/Tags/Tag.tsx
+++ b/superset-frontend/src/components/Tags/Tag.tsx
@@ -22,7 +22,8 @@ import TagType from 'src/types/TagType';
import { Tag as AntdTag } from 'antd-v5';
import { useMemo } from 'react';
import { Tooltip } from 'src/components/Tooltip';
-import { CloseOutlined } from '@ant-design/icons';
+// eslint-disable-next-line no-restricted-imports
+import { CloseOutlined } from '@ant-design/icons'; // TODO: Use
src/components/Icons
const StyledTag = styled(AntdTag)`
${({ theme }) => `
diff --git a/superset-frontend/src/components/Tooltip/index.tsx
b/superset-frontend/src/components/Tooltip/index.tsx
index 615ad802e7..4fa37124b1 100644
--- a/superset-frontend/src/components/Tooltip/index.tsx
+++ b/superset-frontend/src/components/Tooltip/index.tsx
@@ -16,7 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { supersetTheme } from '@superset-ui/core';
+// eslint-disable-next-line no-restricted-imports
+import { supersetTheme } from '@superset-ui/core'; // TODO: DO not import
theme directly
import { Tooltip as AntdTooltip } from 'antd-v5';
import { TooltipProps, TooltipPlacement } from 'antd-v5/lib/tooltip';
diff --git a/superset-frontend/src/components/TooltipParagraph/index.tsx
b/superset-frontend/src/components/TooltipParagraph/index.tsx
index f891c2282a..54632a954b 100644
--- a/superset-frontend/src/components/TooltipParagraph/index.tsx
+++ b/superset-frontend/src/components/TooltipParagraph/index.tsx
@@ -17,8 +17,10 @@
* under the License.
*/
import { useState, FC } from 'react';
-import { Typography } from 'antd';
-import { ParagraphProps } from 'antd/es/typography/Paragraph';
+// eslint-disable-next-line no-restricted-imports
+import { Typography } from 'antd'; // TODO: Remove antd
+// eslint-disable-next-line no-restricted-imports
+import { ParagraphProps } from 'antd/es/typography/Paragraph'; // TODO: Remove
antd
import { Tooltip } from '../Tooltip';
const TooltipParagraph: FC<ParagraphProps> = ({
diff --git a/superset-frontend/src/components/index.ts
b/superset-frontend/src/components/index.ts
index 6a447de4a3..3858ad83c2 100644
--- a/superset-frontend/src/components/index.ts
+++ b/superset-frontend/src/components/index.ts
@@ -42,7 +42,8 @@ export {
} from 'antd-v5';
// Vanilla Ant Design components from v4 that require migration
-export { Upload } from 'antd';
+// eslint-disable-next-line no-restricted-imports
+export { Upload } from 'antd'; // TODO: Remove antd
/*
* Components that conflict with the ones in src/components.
@@ -50,8 +51,10 @@ export { Upload } from 'antd';
* listed below may need review. Avoid incrementing this list by using
* or extending the components in src/components.
*/
+// TODO: Remove these imports
+// eslint-disable-next-line no-restricted-imports
export {
- Breadcrumb as AntdBreadcrumb, // TODO: Make this a real Component
+ Breadcrumb as AntdBreadcrumb,
Checkbox as AntdCheckbox,
Collapse as AntdCollapse,
Form as AntdForm,
@@ -59,5 +62,7 @@ export {
} from 'antd';
// Exported types
-export type { FormInstance } from 'antd/lib/form';
-export type { RadioChangeEvent } from 'antd/lib/radio';
+// eslint-disable-next-line no-restricted-imports
+export type { FormInstance } from 'antd/lib/form'; // TODO: Remove antd
+// eslint-disable-next-line no-restricted-imports
+export type { RadioChangeEvent } from 'antd/lib/radio'; // TODO: Remove antd
diff --git a/superset-frontend/src/dashboard/components/DashboardGrid.jsx
b/superset-frontend/src/dashboard/components/DashboardGrid.jsx
index a5f0e52408..51dc6b2198 100644
--- a/superset-frontend/src/dashboard/components/DashboardGrid.jsx
+++ b/superset-frontend/src/dashboard/components/DashboardGrid.jsx
@@ -213,6 +213,8 @@ class DashboardGrid extends PureComponent {
size="large"
buttonText={
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" />
{t('Create a new chart')}
</>
@@ -237,6 +239,8 @@ class DashboardGrid extends PureComponent {
)}
buttonText={
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" />
{t('Create a new chart')}
</>
diff --git a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx
b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx
index 8df6200220..8f3de862fb 100644
--- a/superset-frontend/src/dashboard/components/SliceHeader/index.tsx
+++ b/superset-frontend/src/dashboard/components/SliceHeader/index.tsx
@@ -222,6 +222,8 @@ const SliceHeader = forwardRef<HTMLDivElement,
SliceHeaderProps>(
placement="top"
title={annotationsLoading}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i
role="img"
aria-label={annotationsLoading}
@@ -235,6 +237,8 @@ const SliceHeader = forwardRef<HTMLDivElement,
SliceHeaderProps>(
placement="top"
title={annotationsError}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i
role="img"
aria-label={annotationsError}
diff --git
a/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx
b/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx
index d36a43cfab..38a73c98a7 100644
--- a/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx
+++ b/superset-frontend/src/dashboard/components/URLShortLinkButton/index.tsx
@@ -88,11 +88,15 @@ export default function URLShortLinkButton({
<CopyToClipboard
text={shortUrl}
copyNode={
+ // TODO: Remove fa-icon
+ // eslint-disable-next-line icons/no-fa-icons-usage
<i className="fa fa-clipboard" title={t('Copy to clipboard')} />
}
/>
<a href={emailLink} aria-label="Email link">
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-envelope" />
</a>
</div>
@@ -108,6 +112,8 @@ export default function URLShortLinkButton({
}}
aria-label={t('Copy URL')}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="short-link-trigger fa fa-link" />
</span>
diff --git
a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx
b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx
index 089b6857cb..9d6274a566 100644
---
a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx
+++
b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControl.tsx
@@ -208,6 +208,8 @@ const DescriptionToolTip = ({ description }: { description:
string }) => (
whiteSpace: 'normal',
}}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i
className="fa fa-info-circle text-muted"
css={(theme: SupersetTheme) => ({
diff --git a/superset-frontend/src/explore/components/EmbedCodeContent.jsx
b/superset-frontend/src/explore/components/EmbedCodeContent.jsx
index 19ccfeb54c..c629f75e60 100644
--- a/superset-frontend/src/explore/components/EmbedCodeContent.jsx
+++ b/superset-frontend/src/explore/components/EmbedCodeContent.jsx
@@ -93,6 +93,8 @@ const EmbedCodeContent = ({ formData, addDangerToast }) => {
text={html}
copyNode={
<CopyButtonEmbedCode buttonSize="xsmall">
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-clipboard" />
</CopyButtonEmbedCode>
}
diff --git a/superset-frontend/src/explore/components/PropertiesModal/index.tsx
b/superset-frontend/src/explore/components/PropertiesModal/index.tsx
index 9a6831fc59..fccf71e813 100644
--- a/superset-frontend/src/explore/components/PropertiesModal/index.tsx
+++ b/superset-frontend/src/explore/components/PropertiesModal/index.tsx
@@ -22,7 +22,8 @@ import Modal from 'src/components/Modal';
import { Input, TextArea } from 'src/components/Input';
import Button from 'src/components/Button';
import { AsyncSelect, Row, Col, AntdForm } from 'src/components';
-import { SelectValue } from 'antd/lib/select';
+// eslint-disable-next-line no-restricted-imports
+import { SelectValue } from 'antd/lib/select'; // TODO: Remove antd
import rison from 'rison';
import {
t,
diff --git a/superset-frontend/src/explore/components/RunQueryButton/index.tsx
b/superset-frontend/src/explore/components/RunQueryButton/index.tsx
index 17c9a06184..08733132a8 100644
--- a/superset-frontend/src/explore/components/RunQueryButton/index.tsx
+++ b/superset-frontend/src/explore/components/RunQueryButton/index.tsx
@@ -42,6 +42,8 @@ export const RunQueryButton = ({
}: RunQueryButtonProps) =>
loading ? (
<Button onClick={onStop} buttonStyle="warning" disabled={!canStopQuery}>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-stop" /> {t('Stop')}
</Button>
) : (
diff --git
a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx
b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx
index 3768b6c5ee..84071c8670 100644
---
a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx
+++
b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx
@@ -187,6 +187,8 @@ class AnnotationLayerControl extends PureComponent<Props,
PopoverState> {
const { annotationError, annotationQuery, theme } = this.props;
if (annotationQuery[anno.name]) {
return (
+ // TODO: Remove fa-icon
+ // eslint-disable-next-line icons/no-fa-icons-usage
<i
className="fa fa-refresh"
style={{ color: theme.colors.primary.base }}
@@ -261,6 +263,8 @@ class AnnotationLayerControl extends PureComponent<Props,
PopoverState> {
}
>
<CustomListItem selectable>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i
data-test="add-annotation-layer-button"
className="fa fa-plus"
diff --git
a/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx
b/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx
index a4867b0f14..5453250302 100644
---
a/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx
+++
b/superset-frontend/src/explore/components/controls/CollectionControl/index.jsx
@@ -65,6 +65,8 @@ const defaultProps = {
const SortableListItem = SortableElement(CustomListItem);
const SortableList = SortableContainer(List);
const SortableDragger = SortableHandle(() => (
+ // TODO: Remove fa-icon
+ // eslint-disable-next-line icons/no-fa-icons-usage
<i
role="img"
aria-label="drag"
diff --git
a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx
b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx
index e055e065ff..a187e52b8e 100644
---
a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx
+++
b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx
@@ -29,7 +29,8 @@ import {
getLabelsColorMap,
CategoricalColorNamespace,
} from '@superset-ui/core';
-import AntdSelect from 'antd/lib/select';
+// eslint-disable-next-line no-restricted-imports
+import AntdSelect from 'antd/lib/select'; // TODO: Remove antd
import { sortBy } from 'lodash';
import ControlHeader from 'src/explore/components/ControlHeader';
import { Tooltip } from 'src/components/Tooltip';
diff --git
a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx
b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx
index 9caa94c602..eabcfa09bb 100644
---
a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx
+++
b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigControl.tsx
@@ -150,10 +150,14 @@ export default function ColumnConfigControl<T extends
ColumnConfig>({
>
{showAllColumns ? (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-angle-up" /> {t('Show less
columns')}
</>
) : (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-angle-down" />
{t('Show all columns')}
</>
diff --git
a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx
b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx
index be9dfff25b..40f7d3c952 100644
---
a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx
+++
b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigItem.tsx
@@ -75,6 +75,8 @@ export default memo(function ColumnConfigItem({
>
<ColumnTypeLabel type={column.type} />
{column.name}
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i
className="fa fa-caret-right"
css={{
diff --git
a/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx
b/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx
index 1a804ef160..5e9b034dd3 100644
---
a/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx
+++
b/superset-frontend/src/explore/components/controls/DateFilterControl/components/AdvancedFrame.tsx
@@ -55,6 +55,8 @@ export function AdvancedFrame(props: FrameComponentProps) {
<div className="section-title">
{t('Configure Advanced Time Range ')}
<DateFunctionTooltip placement="rightBottom">
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-info-circle text-muted" />
</DateFunctionTooltip>
</div>
diff --git
a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.jsx
b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.jsx
index 13a78d2578..9c1f6636c5 100644
---
a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.jsx
+++
b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.jsx
@@ -91,6 +91,8 @@ export const DndColumnSelectPopoverTitle = ({
>
{title || defaultLabel}
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i
className="fa fa-pencil"
style={{ color: isHovered ? 'black' : 'grey' }}
diff --git
a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx
b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx
index d0abf1eb1d..6dd0268dda 100644
---
a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx
+++
b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/useResizeButton.tsx
@@ -132,6 +132,8 @@ export default function useResizeButton(
}, [onMouseUp]);
return [
+ // TODO: Remove fa-icon
+ // eslint-disable-next-line icons/no-fa-icons-usage
<i
role="button"
aria-label="Resize"
diff --git
a/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx
b/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx
index 56de1914d4..0c2d574fd1 100644
---
a/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx
+++
b/superset-frontend/src/explore/components/controls/LayerConfigsControl/FlatLayerTree.tsx
@@ -16,10 +16,13 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { PlusOutlined } from '@ant-design/icons';
+// eslint-disable-next-line no-restricted-imports
+import { PlusOutlined } from '@ant-design/icons'; // TODO: Use
src/components/Icons
import { css, styled, t } from '@superset-ui/core';
-import { Button, Tree } from 'antd';
-import { TreeProps } from 'antd/lib/tree';
+// eslint-disable-next-line no-restricted-imports
+import { Button, Tree } from 'antd'; // TODO: Remove antd
+// eslint-disable-next-line no-restricted-imports
+import { TreeProps } from 'antd/lib/tree'; // TODO: Remove antd
import { forwardRef } from 'react';
import { FlatLayerDataNode, FlatLayerTreeProps, LayerConf } from './types';
import { handleDrop } from './dragDropUtil';
diff --git
a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx
b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx
index 3ab51c5c94..5794aafa77 100644
---
a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx
+++
b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerConfigsPopoverContent.tsx
@@ -17,7 +17,8 @@
* under the License.
*/
import { css, JsonValue, styled, t } from '@superset-ui/core';
-import { Button, Form, Tabs } from 'antd';
+// eslint-disable-next-line no-restricted-imports
+import { Button, Form, Tabs } from 'antd'; // TODO: Remove antd
import { mix } from 'polished';
import { Data as GsData } from 'geostyler-data';
import { Style as GsStyle } from 'geostyler-style';
diff --git
a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerTreeItem.tsx
b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerTreeItem.tsx
index a06b317813..283c2b3fb0 100644
---
a/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerTreeItem.tsx
+++
b/superset-frontend/src/explore/components/controls/LayerConfigsControl/LayerTreeItem.tsx
@@ -16,8 +16,10 @@
* specific language governing permissions and limitations
* under the License.
*/
-import { CloseOutlined, RightOutlined } from '@ant-design/icons';
-import { Button, Tag } from 'antd';
+// eslint-disable-next-line no-restricted-imports
+import { CloseOutlined, RightOutlined } from '@ant-design/icons'; // TODO: Use
src/components/Icons
+// eslint-disable-next-line no-restricted-imports
+import { Button, Tag } from 'antd'; // TODO: Remove antd
import { FC } from 'react';
import { LayerTreeItemProps } from './types';
diff --git
a/superset-frontend/src/explore/components/controls/LayerConfigsControl/dragDropUtil.tsx
b/superset-frontend/src/explore/components/controls/LayerConfigsControl/dragDropUtil.tsx
index e173c82ae1..f87ed9620e 100644
---
a/superset-frontend/src/explore/components/controls/LayerConfigsControl/dragDropUtil.tsx
+++
b/superset-frontend/src/explore/components/controls/LayerConfigsControl/dragDropUtil.tsx
@@ -17,7 +17,8 @@
* under the License.
*/
-import { TreeProps } from 'antd/lib/tree';
+// eslint-disable-next-line no-restricted-imports
+import { TreeProps } from 'antd/lib/tree'; // TODO: Remove antd
import { DropInfoType, FlatLayerDataNode } from './types';
/**
diff --git
a/superset-frontend/src/explore/components/controls/LayerConfigsControl/types.ts
b/superset-frontend/src/explore/components/controls/LayerConfigsControl/types.ts
index a706048314..6ad5b850e1 100644
---
a/superset-frontend/src/explore/components/controls/LayerConfigsControl/types.ts
+++
b/superset-frontend/src/explore/components/controls/LayerConfigsControl/types.ts
@@ -17,7 +17,8 @@
* under the License.
*/
-import { DataNode, TreeProps } from 'antd/lib/tree';
+// eslint-disable-next-line no-restricted-imports
+import { DataNode, TreeProps } from 'antd/lib/tree'; // TODO: Remove antd
import { ControlComponentProps } from '@superset-ui/chart-controls';
import { Style } from 'geostyler-style';
import { CardStyleProps } from 'geostyler/dist/Component/CardStyle/CardStyle';
diff --git
a/superset-frontend/src/explore/components/controls/MapViewControl/ExtentTag.tsx
b/superset-frontend/src/explore/components/controls/MapViewControl/ExtentTag.tsx
index 1ec1ab93b1..fb43b28d23 100644
---
a/superset-frontend/src/explore/components/controls/MapViewControl/ExtentTag.tsx
+++
b/superset-frontend/src/explore/components/controls/MapViewControl/ExtentTag.tsx
@@ -18,7 +18,8 @@
*/
import { t } from '@superset-ui/core';
-import { Tag } from 'antd';
+// eslint-disable-next-line no-restricted-imports
+import { Tag } from 'antd'; // TODO: Remove antd
import { FC } from 'react';
import { ExtentTagProps } from './types';
diff --git
a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.jsx
b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.jsx
index 188487b338..63a5a8aecb 100644
---
a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.jsx
+++
b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopover/index.jsx
@@ -516,6 +516,8 @@ export default class AdhocMetricEditPopover extends
PureComponent {
>
{t('Save')}
</Button>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i
role="button"
aria-label="Resize"
diff --git
a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx
b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx
index a4b5b6ac2c..861a2c88a7 100644
---
a/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx
+++
b/superset-frontend/src/explore/components/controls/MetricControl/AdhocMetricEditPopoverTitle.tsx
@@ -120,6 +120,8 @@ const AdhocMetricEditPopoverTitle:
FC<AdhocMetricEditPopoverTitleProps> = ({
>
<TitleLabel>{title?.label || defaultLabel}</TitleLabel>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i
className="fa fa-pencil"
style={{ color: isHovered ? 'black' : 'grey' }}
diff --git
a/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx
b/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx
index baa8070eaa..2ce48f8cc2 100644
---
a/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx
+++
b/superset-frontend/src/explore/components/controls/SelectAsyncControl/index.tsx
@@ -21,7 +21,8 @@ import { t, SupersetClient, getClientErrorObject } from
'@superset-ui/core';
import ControlHeader from 'src/explore/components/ControlHeader';
import { Select } from 'src/components';
import { SelectOptionsType, SelectProps } from 'src/components/Select/types';
-import { SelectValue, LabeledValue } from 'antd/lib/select';
+// eslint-disable-next-line no-restricted-imports
+import { SelectValue, LabeledValue } from 'antd/lib/select'; // TODO: Remove
antd
import withToasts from 'src/components/MessageToasts/withToasts';
type SelectAsyncProps = Omit<SelectProps, 'options' | 'ariaLabel' |
'onChange'>;
diff --git a/superset-frontend/src/explore/components/controls/ViewQuery.tsx
b/superset-frontend/src/explore/components/controls/ViewQuery.tsx
index 29e42c3b88..1b3e359ce1 100644
--- a/superset-frontend/src/explore/components/controls/ViewQuery.tsx
+++ b/superset-frontend/src/explore/components/controls/ViewQuery.tsx
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// TODO: Remove fa-icon
+/* eslint-disable icons/no-fa-icons-usage */
import { FC } from 'react';
import { styled } from '@superset-ui/core';
import SyntaxHighlighter from 'react-syntax-highlighter/dist/cjs/light';
diff --git
a/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx
b/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx
index 96754950ce..0a9b4189f3 100644
--- a/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx
+++ b/superset-frontend/src/explore/components/controls/VizTypeControl/index.tsx
@@ -55,6 +55,8 @@ function VizSupportValidation({ vizType }: { vizType: string
}) {
margin-top: ${theme.gridUnit}px;
`}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-exclamation-circle text-danger" />{' '}
<small>{t('This visualization type is not supported.')}</small>
</div>
diff --git
a/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx
b/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx
index 5ed10f2470..a986382444 100644
---
a/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx
+++
b/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx
@@ -18,7 +18,8 @@
*/
import { ControlHeader } from '@superset-ui/chart-controls';
import { css, styled, t } from '@superset-ui/core';
-import { Form, Tag } from 'antd';
+// eslint-disable-next-line no-restricted-imports
+import { Form, Tag } from 'antd'; // TODO: Remove antd
import { FC, useState } from 'react';
import { isZoomConfigsLinear, isZoomConfigsExp } from './typeguards';
import { ZoomConfigs, ZoomConfigsControlProps } from './types';
diff --git a/superset-frontend/src/features/alerts/AlertReportModal.tsx
b/superset-frontend/src/features/alerts/AlertReportModal.tsx
index f230a02b52..9b3f82dff1 100644
--- a/superset-frontend/src/features/alerts/AlertReportModal.tsx
+++ b/superset-frontend/src/features/alerts/AlertReportModal.tsx
@@ -407,6 +407,8 @@ const NotificationMethodAdd:
FunctionComponent<NotificationMethodAddProps> = ({
return (
<StyledNotificationAddButton className={status} onClick={checkStatus}>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" />{' '}
{status === 'active'
? t('Add another notification method')
diff --git a/superset-frontend/src/features/alerts/components/StyledPanel.tsx
b/superset-frontend/src/features/alerts/components/StyledPanel.tsx
index 651055b35a..736200f222 100644
--- a/superset-frontend/src/features/alerts/components/StyledPanel.tsx
+++ b/superset-frontend/src/features/alerts/components/StyledPanel.tsx
@@ -18,8 +18,10 @@
*/
import { ReactNode } from 'react';
import { css, SupersetTheme } from '@superset-ui/core';
-import { Collapse as AntdCollapse } from 'antd';
-import { CollapsePanelProps } from 'antd/lib/collapse';
+// eslint-disable-next-line no-restricted-imports
+import { Collapse as AntdCollapse } from 'antd'; // TODO: Remove antd
+// eslint-disable-next-line no-restricted-imports
+import { CollapsePanelProps } from 'antd/lib/collapse'; // TODO: Remove antd
const anticonHeight = 12;
const antdPanelStyles = (theme: SupersetTheme) => css`
diff --git
a/superset-frontend/src/features/alerts/components/ValidatedPanelHeader.tsx
b/superset-frontend/src/features/alerts/components/ValidatedPanelHeader.tsx
index cb682f2677..04e4d99aaf 100644
--- a/superset-frontend/src/features/alerts/components/ValidatedPanelHeader.tsx
+++ b/superset-frontend/src/features/alerts/components/ValidatedPanelHeader.tsx
@@ -17,7 +17,8 @@
* under the License.
*/
import { t } from '@superset-ui/core';
-import { CheckCircleOutlined } from '@ant-design/icons';
+// eslint-disable-next-line no-restricted-imports
+import { CheckCircleOutlined } from '@ant-design/icons'; // TODO: Use
src/components/Icons
const ValidatedPanelHeader = ({
title,
diff --git
a/superset-frontend/src/features/databases/DatabaseModal/ModalHeader.tsx
b/superset-frontend/src/features/databases/DatabaseModal/ModalHeader.tsx
index b4409be509..6ab47cb247 100644
--- a/superset-frontend/src/features/databases/DatabaseModal/ModalHeader.tsx
+++ b/superset-frontend/src/features/databases/DatabaseModal/ModalHeader.tsx
@@ -18,7 +18,8 @@
*/
import { getDatabaseDocumentationLinks } from 'src/views/CRUD/hooks';
-import { UploadFile } from 'antd/lib/upload/interface';
+// eslint-disable-next-line no-restricted-imports
+import { UploadFile } from 'antd/lib/upload/interface'; // TODO: Remove antd
import { t } from '@superset-ui/core';
import {
EditHeaderTitle,
diff --git
a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx
b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx
index 907fe3c9a0..7a4a72ff53 100644
--- a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx
+++ b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelForm.tsx
@@ -22,7 +22,8 @@ import { AntdForm, Col, Row } from 'src/components';
import { Form, FormLabel } from 'src/components/Form';
import { Radio } from 'src/components/Radio';
import { Input, TextArea } from 'src/components/Input';
-import { Input as AntdInput, Tooltip } from 'antd';
+// eslint-disable-next-line no-restricted-imports
+import { Input as AntdInput, Tooltip } from 'antd'; // TODO: Remove antd
import Icons from 'src/components/Icons';
import { DatabaseObject, FieldPropTypes } from '../types';
import { AuthType } from '.';
diff --git a/superset-frontend/src/features/databases/DatabaseModal/index.tsx
b/superset-frontend/src/features/databases/DatabaseModal/index.tsx
index 3a7eb0d21d..1244b52655 100644
--- a/superset-frontend/src/features/databases/DatabaseModal/index.tsx
+++ b/superset-frontend/src/features/databases/DatabaseModal/index.tsx
@@ -36,7 +36,8 @@ import {
import { useHistory } from 'react-router-dom';
import { setItem, LocalStorageKeys } from 'src/utils/localStorageHelpers';
-import { UploadChangeParam, UploadFile } from 'antd/lib/upload/interface';
+// eslint-disable-next-line no-restricted-imports
+import { UploadChangeParam, UploadFile } from 'antd/lib/upload/interface'; //
TODO: Remove antd
import Tabs from 'src/components/Tabs';
import { AntdSelect, Upload } from 'src/components';
import Alert from 'src/components/Alert';
diff --git a/superset-frontend/src/features/databases/UploadDataModel/index.tsx
b/superset-frontend/src/features/databases/UploadDataModel/index.tsx
index eccfe3da37..f07debf914 100644
--- a/superset-frontend/src/features/databases/UploadDataModel/index.tsx
+++ b/superset-frontend/src/features/databases/UploadDataModel/index.tsx
@@ -43,10 +43,12 @@ import {
Select,
Upload,
} from 'src/components';
+// eslint-disable-next-line no-restricted-imports
import { UploadOutlined } from '@ant-design/icons';
-import { Input, InputNumber } from 'src/components/Input';
+import { Input, InputNumber } from 'src/components/Input'; // TODO: Use
src/components/Icons
import rison from 'rison';
-import { UploadChangeParam, UploadFile } from 'antd/lib/upload/interface';
+// eslint-disable-next-line no-restricted-imports
+import { UploadChangeParam, UploadFile } from 'antd/lib/upload/interface'; //
TODO: Remove antd
import withToasts from 'src/components/MessageToasts/withToasts';
import {
antdCollapseStyles,
diff --git a/superset-frontend/src/features/databases/types.ts
b/superset-frontend/src/features/databases/types.ts
index a41499b980..a3a87b1e47 100644
--- a/superset-frontend/src/features/databases/types.ts
+++ b/superset-frontend/src/features/databases/types.ts
@@ -1,5 +1,6 @@
import { JsonObject } from '@superset-ui/core';
-import { InputProps } from 'antd/lib/input';
+// eslint-disable-next-line no-restricted-imports
+import { InputProps } from 'antd/lib/input'; // TODO: Remove antd
import { ChangeEvent, EventHandler, FormEvent } from 'react';
/**
diff --git a/superset-frontend/src/features/home/ChartTable.tsx
b/superset-frontend/src/features/home/ChartTable.tsx
index e8026f0035..1836362ce7 100644
--- a/superset-frontend/src/features/home/ChartTable.tsx
+++ b/superset-frontend/src/features/home/ChartTable.tsx
@@ -186,6 +186,8 @@ function ChartTable({
{
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" />
{t('Chart')}
</>
diff --git a/superset-frontend/src/features/home/DashboardTable.tsx
b/superset-frontend/src/features/home/DashboardTable.tsx
index 28cf137026..dda1febcfe 100644
--- a/superset-frontend/src/features/home/DashboardTable.tsx
+++ b/superset-frontend/src/features/home/DashboardTable.tsx
@@ -186,6 +186,8 @@ function DashboardTable({
{
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" />
{t('Dashboard')}
</>
diff --git a/superset-frontend/src/features/home/RightMenu.tsx
b/superset-frontend/src/features/home/RightMenu.tsx
index a9518fdcbd..453942574a 100644
--- a/superset-frontend/src/features/home/RightMenu.tsx
+++ b/superset-frontend/src/features/home/RightMenu.tsx
@@ -16,6 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
+// TODO: Remove fa-icon
+/* eslint-disable icons/no-fa-icons-usage */
import { Fragment, useState, useEffect, FC, PureComponent } from 'react';
import rison from 'rison';
diff --git a/superset-frontend/src/features/home/SavedQueries.tsx
b/superset-frontend/src/features/home/SavedQueries.tsx
index ef1d20c23c..be5a36dbda 100644
--- a/superset-frontend/src/features/home/SavedQueries.tsx
+++ b/superset-frontend/src/features/home/SavedQueries.tsx
@@ -258,6 +258,8 @@ const SavedQueries = ({
{
name: (
<Link to="/sqllab?new=true">
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" />
{t('SQL Query')}
</Link>
diff --git a/superset-frontend/src/features/tags/TagModal.tsx
b/superset-frontend/src/features/tags/TagModal.tsx
index 50c321ddcf..b7b7138627 100644
--- a/superset-frontend/src/features/tags/TagModal.tsx
+++ b/superset-frontend/src/features/tags/TagModal.tsx
@@ -23,7 +23,8 @@ import Modal from 'src/components/Modal';
import AsyncSelect from 'src/components/Select/AsyncSelect';
import { FormLabel } from 'src/components/Form';
import { t, styled, SupersetClient } from '@superset-ui/core';
-import { Input } from 'antd';
+// eslint-disable-next-line no-restricted-imports
+import { Input } from 'antd'; // TODO: Remove antd
import { Divider } from 'src/components/Divider';
import Button from 'src/components/Button';
import { Tag } from 'src/views/CRUD/types';
diff --git
a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
index ab5a43e2f7..23447fb295 100644
--- a/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
+++ b/superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
@@ -30,7 +30,8 @@ import {
t,
tn,
} from '@superset-ui/core';
-import { LabeledValue as AntdLabeledValue } from 'antd/lib/select';
+// eslint-disable-next-line no-restricted-imports
+import { LabeledValue as AntdLabeledValue } from 'antd/lib/select'; // TODO:
Remove antd
import { debounce } from 'lodash';
import { useImmerReducer } from 'use-immer';
import { Select } from 'src/components';
diff --git
a/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx
b/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx
index 247c19e4c4..0e456b35c0 100644
---
a/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx
+++
b/superset-frontend/src/filters/components/TimeColumn/TimeColumnFilterPlugin.tsx
@@ -25,7 +25,8 @@ import {
} from '@superset-ui/core';
import { useEffect, useState } from 'react';
import { Select } from 'src/components';
-import { FormItemProps } from 'antd/lib/form';
+// eslint-disable-next-line no-restricted-imports
+import { FormItemProps } from 'antd/lib/form'; // TODO: Remove antd
import { FilterPluginStyle, StyledFormItem, StatusMessage } from '../common';
import { PluginFilterTimeColumnProps } from './types';
diff --git
a/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx
b/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx
index 46c57c0ea6..e8381f53e5 100644
---
a/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx
+++
b/superset-frontend/src/filters/components/TimeGrain/TimeGrainFilterPlugin.tsx
@@ -25,7 +25,8 @@ import {
} from '@superset-ui/core';
import { useEffect, useMemo, useState } from 'react';
import { Select } from 'src/components';
-import { FormItemProps } from 'antd/lib/form';
+// eslint-disable-next-line no-restricted-imports
+import { FormItemProps } from 'antd/lib/form'; // TODO: Remove antd
import { FilterPluginStyle, StyledFormItem, StatusMessage } from '../common';
import { PluginFilterTimeGrainProps } from './types';
diff --git a/superset-frontend/src/pages/AlertReportList/index.tsx
b/superset-frontend/src/pages/AlertReportList/index.tsx
index f60caf0cf7..33355f0c4a 100644
--- a/superset-frontend/src/pages/AlertReportList/index.tsx
+++ b/superset-frontend/src/pages/AlertReportList/index.tsx
@@ -417,6 +417,8 @@ function AlertList({
subMenuButtons.push({
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {title}
</>
),
@@ -441,6 +443,8 @@ function AlertList({
buttonAction: () => handleAlertEdit(null),
buttonText: canCreate ? (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {title}{' '}
</>
) : null,
diff --git a/superset-frontend/src/pages/AnnotationLayerList/index.tsx
b/superset-frontend/src/pages/AnnotationLayerList/index.tsx
index d1f88ba651..5871c1f111 100644
--- a/superset-frontend/src/pages/AnnotationLayerList/index.tsx
+++ b/superset-frontend/src/pages/AnnotationLayerList/index.tsx
@@ -214,6 +214,8 @@ function AnnotationLayersList({
subMenuButtons.push({
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {t('Annotation layer')}
</>
),
@@ -271,6 +273,8 @@ function AnnotationLayersList({
buttonAction: () => handleAnnotationLayerEdit(null),
buttonText: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {t('Annotation layer')}
</>
),
diff --git a/superset-frontend/src/pages/AnnotationList/index.tsx
b/superset-frontend/src/pages/AnnotationList/index.tsx
index 6e4b4169f8..8947a40ff5 100644
--- a/superset-frontend/src/pages/AnnotationList/index.tsx
+++ b/superset-frontend/src/pages/AnnotationList/index.tsx
@@ -226,6 +226,8 @@ function AnnotationList({
subMenuButtons.push({
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {t('Annotation')}
</>
),
@@ -259,6 +261,8 @@ function AnnotationList({
},
buttonText: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {t('Annotation')}
</>
),
diff --git a/superset-frontend/src/pages/ChartCreation/index.tsx
b/superset-frontend/src/pages/ChartCreation/index.tsx
index 5cbce4954d..d3d9ee5e5d 100644
--- a/superset-frontend/src/pages/ChartCreation/index.tsx
+++ b/superset-frontend/src/pages/ChartCreation/index.tsx
@@ -306,6 +306,8 @@ export class ChartCreation extends PureComponent<
data-test="add-chart-new-dataset-instructions"
>
{`${VIEW_INSTRUCTIONS_TEXT} `}
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-external-link" />
</a>
.
@@ -318,6 +320,8 @@ export class ChartCreation extends PureComponent<
target="_blank"
>
{`${VIEW_INSTRUCTIONS_TEXT} `}
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-external-link" />
</a>
.
diff --git a/superset-frontend/src/pages/ChartList/index.tsx
b/superset-frontend/src/pages/ChartList/index.tsx
index 031722ab22..3e962aaf99 100644
--- a/superset-frontend/src/pages/ChartList/index.tsx
+++ b/superset-frontend/src/pages/ChartList/index.tsx
@@ -760,6 +760,8 @@ function ChartList(props: ChartListProps) {
subMenuButtons.push({
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {t('Chart')}
</>
),
diff --git a/superset-frontend/src/pages/CssTemplateList/index.tsx
b/superset-frontend/src/pages/CssTemplateList/index.tsx
index c0948c949e..fd75f3ef23 100644
--- a/superset-frontend/src/pages/CssTemplateList/index.tsx
+++ b/superset-frontend/src/pages/CssTemplateList/index.tsx
@@ -196,6 +196,8 @@ function CssTemplatesList({
subMenuButtons.push({
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {t('CSS template')}
</>
),
diff --git a/superset-frontend/src/pages/DashboardList/index.tsx
b/superset-frontend/src/pages/DashboardList/index.tsx
index 3e63bd4b91..6d5753e016 100644
--- a/superset-frontend/src/pages/DashboardList/index.tsx
+++ b/superset-frontend/src/pages/DashboardList/index.tsx
@@ -680,6 +680,8 @@ function DashboardList(props: DashboardListProps) {
subMenuButtons.push({
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {t('Dashboard')}
</>
),
diff --git a/superset-frontend/src/pages/DatabaseList/index.tsx
b/superset-frontend/src/pages/DatabaseList/index.tsx
index 3e9471be74..5e9f7a2374 100644
--- a/superset-frontend/src/pages/DatabaseList/index.tsx
+++ b/superset-frontend/src/pages/DatabaseList/index.tsx
@@ -317,6 +317,8 @@ function DatabaseList({
'data-test': 'btn-create-database',
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {t('Database')}{' '}
</>
),
diff --git a/superset-frontend/src/pages/DatasetList/index.tsx
b/superset-frontend/src/pages/DatasetList/index.tsx
index 8173456e97..a2cac3b036 100644
--- a/superset-frontend/src/pages/DatasetList/index.tsx
+++ b/superset-frontend/src/pages/DatasetList/index.tsx
@@ -624,6 +624,8 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({
buttonArr.push({
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {t('Dataset')}{' '}
</>
),
diff --git a/superset-frontend/src/pages/RowLevelSecurityList/index.tsx
b/superset-frontend/src/pages/RowLevelSecurityList/index.tsx
index 9d263af14b..f3b211f95d 100644
--- a/superset-frontend/src/pages/RowLevelSecurityList/index.tsx
+++ b/superset-frontend/src/pages/RowLevelSecurityList/index.tsx
@@ -246,6 +246,8 @@ function RowLevelSecurityList(props: RLSProps) {
buttonAction: () => handleRuleEdit(null),
buttonText: canEdit ? (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" data-test="add-rule-empty" /> {'Rule'}{' '}
</>
) : null,
@@ -312,6 +314,8 @@ function RowLevelSecurityList(props: RLSProps) {
subMenuButtons.push({
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" data-test="add-rule" /> {t('Rule')}
</>
),
diff --git a/superset-frontend/src/pages/SavedQueryList/index.tsx
b/superset-frontend/src/pages/SavedQueryList/index.tsx
index 052815f635..c68654a519 100644
--- a/superset-frontend/src/pages/SavedQueryList/index.tsx
+++ b/superset-frontend/src/pages/SavedQueryList/index.tsx
@@ -196,6 +196,8 @@ function SavedQueryList({
subMenuButtons.push({
name: (
<Link to="/sqllab?new=true">
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {t('Query')}
</Link>
),
diff --git a/superset-frontend/src/pages/Tags/index.tsx
b/superset-frontend/src/pages/Tags/index.tsx
index d7bda00ed4..138b1e8a44 100644
--- a/superset-frontend/src/pages/Tags/index.tsx
+++ b/superset-frontend/src/pages/Tags/index.tsx
@@ -37,7 +37,8 @@ import Icons from 'src/components/Icons';
import { Tooltip } from 'src/components/Tooltip';
import { Link } from 'react-router-dom';
import { deleteTags } from 'src/features/tags/tags';
-import { Tag as AntdTag } from 'antd';
+// eslint-disable-next-line no-restricted-imports
+import { Tag as AntdTag } from 'antd'; // TODO: Remove antd
import { QueryObjectColumns, Tag } from 'src/views/CRUD/types';
import TagModal from 'src/features/tags/TagModal';
import FaveStar from 'src/components/FaveStar';
@@ -134,6 +135,8 @@ function TagList(props: TagListProps) {
buttonAction: () => setShowTagModal(true),
buttonText: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" data-test="add-rule-empty" />{' '}
{'Create a new Tag'}{' '}
</>
@@ -321,6 +324,8 @@ function TagList(props: TagListProps) {
subMenuButtons.push({
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
<i className="fa fa-plus" /> {t('Tag')}
</>
),
diff --git a/superset-frontend/src/preamble.ts
b/superset-frontend/src/preamble.ts
index 54c3b15e4f..d7aebc1c27 100644
--- a/superset-frontend/src/preamble.ts
+++ b/superset-frontend/src/preamble.ts
@@ -23,7 +23,8 @@ import dayjs from 'dayjs';
import {
configure,
makeApi,
- supersetTheme,
+ // eslint-disable-next-line no-restricted-imports
+ supersetTheme, // TODO: DO not import theme directly
initFeatureFlags,
} from '@superset-ui/core';
import { merge } from 'lodash';
diff --git a/superset-frontend/src/utils/downloadAsImage.ts
b/superset-frontend/src/utils/downloadAsImage.ts
index 63b65cb60b..a16a13544e 100644
--- a/superset-frontend/src/utils/downloadAsImage.ts
+++ b/superset-frontend/src/utils/downloadAsImage.ts
@@ -19,6 +19,7 @@
import { SyntheticEvent } from 'react';
import domToImage from 'dom-to-image-more';
import { kebabCase } from 'lodash';
+// eslint-disable-next-line no-restricted-imports
import { t, supersetTheme } from '@superset-ui/core';
import { addWarningToast } from 'src/components/MessageToasts/actions';