diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js
index 3d5e04cde0d..65cdd18a2c7 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 00000000000..a3dae1a3c10
--- /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 00000000000..52a81eabe9e
--- /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: ['', ''],
+ invalid: [
+ {
+ code: '',
+ errors,
+ },
+ {
+ code: '',
+ errors,
+ },
+ {
+ code: '',
+ errors,
+ },
+ {
+ code: '',
+ 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 00000000000..f2118e936cd
--- /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 63f9adb7057..95f10d09ea1 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 7e0bb92d9b1..7f207f1972b 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 baa4df55b8a..44e47d55e99 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 && (
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{' '}
@@ -112,6 +114,8 @@ export function ControlHeader({
{danger && (
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{' '}
@@ -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 */}
{' '}
diff --git a/superset-frontend/spec/helpers/setup.ts b/superset-frontend/spec/helpers/setup.ts
index 553bd416a75..6af5a181ff1 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 29bbbdf412d..07347967710 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 baf0e6f35f5..4fa44ff4978 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 */}
{t('Edit')}
diff --git a/superset-frontend/src/SqlLab/components/ResultSet/index.tsx b/superset-frontend/src/SqlLab/components/ResultSet/index.tsx
index db44fdda164..fb375260e45 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 */}
{t('Download to CSV')}
)}
@@ -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 */}
{t('Copy to Clipboard')}
}
diff --git a/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx b/superset-frontend/src/SqlLab/components/RunQueryActionButton/index.tsx
index 0992d64a792..97d024407bf 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 */}
{t('Stop')}
>
);
diff --git a/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx b/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
index ab17556a72a..1138b00125a 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 360376a1d8e..59fd26023f7 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 */}
{t('Reset state')}
)}
diff --git a/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditorTabHeader/index.tsx
index 76c8b74b19d..e06279ebc56 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 = ({ queryEditor }) => {
data-test="close-tab-menu-option"
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('Close tab')}
@@ -109,6 +111,8 @@ const SqlEditorTabHeader: FC = ({ queryEditor }) => {
data-test="rename-tab-menu-option"
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('Rename tab')}
@@ -119,6 +123,8 @@ const SqlEditorTabHeader: FC = ({ queryEditor }) => {
data-test="toggle-menu-option"
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{qe.hideLeftBar ? t('Expand tool bar') : t('Hide tool bar')}
@@ -129,6 +135,8 @@ const SqlEditorTabHeader: FC = ({ queryEditor }) => {
data-test="close-all-other-menu-option"
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('Close all other tabs')}
@@ -139,6 +147,8 @@ const SqlEditorTabHeader: FC = ({ queryEditor }) => {
data-test="clone-tab-menu-option"
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('Duplicate tab')}
diff --git a/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx b/superset-frontend/src/SqlLab/components/TabbedSqlEditors/index.tsx
index a9360ad655e..21a9c8a97d0 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 {
: t('New tab (Ctrl + t)')
}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
@@ -289,6 +291,8 @@ class TabbedSqlEditors extends PureComponent {
: t('New tab (Ctrl + t)')
}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
}
diff --git a/superset-frontend/src/SqlLab/components/TableElement/index.tsx b/superset-frontend/src/SqlLab/components/TableElement/index.tsx
index 5817e5662c5..f65229fd6fa 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 a52f5a71d87..5ed54874e58 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 e237c3a1645..9fd35b41543 100644
--- a/superset-frontend/src/components/CachedLabel/index.tsx
+++ b/superset-frontend/src/components/CachedLabel/index.tsx
@@ -49,6 +49,8 @@ const CacheLabel: FC = ({
onMouseOver={() => setHovered(true)}
onMouseOut={() => setHovered(false)}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('Cached')}
diff --git a/superset-frontend/src/components/Collapse/index.tsx b/superset-frontend/src/components/Collapse/index.tsx
index b2e0e206b6c..42af995bb9e 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 9c65106e18c..3e0e93d65da 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 3a6543b4080..23f725b0a42 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"
>
- {' '}
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
+ {' '}
{t('Add item')}
diff --git a/superset-frontend/src/components/Datasource/DatasourceEditor.jsx b/superset-frontend/src/components/Datasource/DatasourceEditor.jsx
index fae02708280..40205b854cc 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 */}
{' '}
{t('Sync columns from source')}
diff --git a/superset-frontend/src/components/Datasource/Field.tsx b/superset-frontend/src/components/Datasource/Field.tsx
index 3751e414b1d..1232f0208c1 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({
{label || fieldKey}
{compact && description && (
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
)}
diff --git a/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx b/superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx
index 4ad75eb21a4..ac52d0cd3fe 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 efa367dbd4e..f862f3589e4 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 */}
>
diff --git a/superset-frontend/src/components/Form/Form.tsx b/superset-frontend/src/components/Form/Form.tsx
index 143f0494bb8..66a9f58d7f2 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 dd829cd1e48..97fee966891 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 423e2b39eea..90d7da612b8 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 39e5627235a..7e299cc5206 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 41a4089e126..b055cb06bc1 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 69d8f3a7513..12b4be4f4fb 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 65cbb8b1190..a9bc4f8a7bb 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}
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
`
${({ theme, headerPosition }) => `
diff --git a/superset-frontend/src/components/Select/types.ts b/superset-frontend/src/components/Select/types.ts
index e8a1ee82486..85d380bdfa0 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 454d6757ca0..0c21ec228ef 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 4eb4842e838..7e2f97a6e5d 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 fb37aa9ce91..b16f254a27e 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 94977413e2c..70030a3bc47 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 940f42cb3dc..cfb7d5f818d 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 3af2ecec36b..9ba165dc353 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 0683a782f52..e8bba93742e 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 615ad802e7d..4fa37124b18 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 f891c2282ab..54632a954b6 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 = ({
diff --git a/superset-frontend/src/components/index.ts b/superset-frontend/src/components/index.ts
index 6a447de4a37..3858ad83c2a 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 a5f0e52408c..51dc6b21980 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 */}
{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 */}
{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 8df62002206..8f3de862fbd 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(
placement="top"
title={annotationsLoading}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
(
placement="top"
title={annotationsError}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
}
/>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
@@ -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 */}
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 089b6857cb3..9d6274a5662 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 */}
({
diff --git a/superset-frontend/src/explore/components/EmbedCodeContent.jsx b/superset-frontend/src/explore/components/EmbedCodeContent.jsx
index 19ccfeb54ce..c629f75e603 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={
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
}
diff --git a/superset-frontend/src/explore/components/PropertiesModal/index.tsx b/superset-frontend/src/explore/components/PropertiesModal/index.tsx
index 9a6831fc595..fccf71e8135 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 17c9a061845..08733132a8f 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 ? (
) : (
diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx
index 3768b6c5ee2..84071c8670a 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 {
const { annotationError, annotationQuery, theme } = this.props;
if (annotationQuery[anno.name]) {
return (
+ // TODO: Remove fa-icon
+ // eslint-disable-next-line icons/no-fa-icons-usage
{
}
>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
(
+ // TODO: Remove fa-icon
+ // eslint-disable-next-line icons/no-fa-icons-usage
({
>
{showAllColumns ? (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('Show less columns')}
>
) : (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{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 be9dfff25ba..40f7d3c952b 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({
>
{column.name}
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('Configure Advanced Time Range ')}
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.jsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelectPopoverTitle.jsx
index 13a78d25786..9c1f6636c5d 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 */}
{t('Save')}
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
= ({
>
{title?.label || defaultLabel}
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
;
diff --git a/superset-frontend/src/explore/components/controls/ViewQuery.tsx b/superset-frontend/src/explore/components/controls/ViewQuery.tsx
index 29e42c3b883..1b3e359ce10 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 96754950cee..0a9b4189f32 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 */}
{' '}
{t('This visualization type is not supported.')}
diff --git a/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx b/superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx
index 5ed10f2470c..a9863824440 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 f230a02b52f..9b3f82dff1b 100644
--- a/superset-frontend/src/features/alerts/AlertReportModal.tsx
+++ b/superset-frontend/src/features/alerts/AlertReportModal.tsx
@@ -407,6 +407,8 @@ const NotificationMethodAdd: FunctionComponent = ({
return (
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{' '}
{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 651055b35a1..736200f2229 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 cb682f26777..04e4d99aaf5 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 b4409be5093..6ab47cb2473 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 907fe3c9a05..7a4a72ff538 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 3a7eb0d21d3..1244b526550 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 eccfe3da377..f07debf9148 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 a41499b9804..a3a87b1e476 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 e8026f00358..1836362ce7a 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 */}
{t('Chart')}
>
diff --git a/superset-frontend/src/features/home/DashboardTable.tsx b/superset-frontend/src/features/home/DashboardTable.tsx
index 28cf137026d..dda1febcfef 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 */}
{t('Dashboard')}
>
diff --git a/superset-frontend/src/features/home/RightMenu.tsx b/superset-frontend/src/features/home/RightMenu.tsx
index a9518fdcbd9..453942574ac 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 ef1d20c23cd..be5a36dbdac 100644
--- a/superset-frontend/src/features/home/SavedQueries.tsx
+++ b/superset-frontend/src/features/home/SavedQueries.tsx
@@ -258,6 +258,8 @@ const SavedQueries = ({
{
name: (
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('SQL Query')}
diff --git a/superset-frontend/src/features/tags/TagModal.tsx b/superset-frontend/src/features/tags/TagModal.tsx
index 50c321ddcfa..b7b7138627d 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 ab5a43e2f7e..23447fb295d 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 247c19e4c47..0e456b35c08 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 46c57c0ea67..e8381f53e52 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 f60caf0cf78..33355f0c4a7 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 */}
{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 */}
{title}{' '}
>
) : null,
diff --git a/superset-frontend/src/pages/AnnotationLayerList/index.tsx b/superset-frontend/src/pages/AnnotationLayerList/index.tsx
index d1f88ba6514..5871c1f1116 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 */}
{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 */}
{t('Annotation layer')}
>
),
diff --git a/superset-frontend/src/pages/AnnotationList/index.tsx b/superset-frontend/src/pages/AnnotationList/index.tsx
index 6e4b4169f8d..8947a40ff5a 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 */}
{t('Annotation')}
>
),
@@ -259,6 +261,8 @@ function AnnotationList({
},
buttonText: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('Annotation')}
>
),
diff --git a/superset-frontend/src/pages/ChartCreation/index.tsx b/superset-frontend/src/pages/ChartCreation/index.tsx
index 5cbce4954d7..d3d9ee5e5d8 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 */}
.
@@ -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 */}
.
diff --git a/superset-frontend/src/pages/ChartList/index.tsx b/superset-frontend/src/pages/ChartList/index.tsx
index 031722ab22c..3e962aaf999 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 */}
{t('Chart')}
>
),
diff --git a/superset-frontend/src/pages/CssTemplateList/index.tsx b/superset-frontend/src/pages/CssTemplateList/index.tsx
index c0948c949e3..fd75f3ef236 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 */}
{t('CSS template')}
>
),
diff --git a/superset-frontend/src/pages/DashboardList/index.tsx b/superset-frontend/src/pages/DashboardList/index.tsx
index 3e63bd4b911..6d5753e0160 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 */}
{t('Dashboard')}
>
),
diff --git a/superset-frontend/src/pages/DatabaseList/index.tsx b/superset-frontend/src/pages/DatabaseList/index.tsx
index 3e9471be74b..5e9f7a23740 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 */}
{t('Database')}{' '}
>
),
diff --git a/superset-frontend/src/pages/DatasetList/index.tsx b/superset-frontend/src/pages/DatasetList/index.tsx
index 8173456e97a..a2cac3b0369 100644
--- a/superset-frontend/src/pages/DatasetList/index.tsx
+++ b/superset-frontend/src/pages/DatasetList/index.tsx
@@ -624,6 +624,8 @@ const DatasetList: FunctionComponent = ({
buttonArr.push({
name: (
<>
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('Dataset')}{' '}
>
),
diff --git a/superset-frontend/src/pages/RowLevelSecurityList/index.tsx b/superset-frontend/src/pages/RowLevelSecurityList/index.tsx
index 9d263af14b5..f3b211f95d8 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 */}
{'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 */}
{t('Rule')}
>
),
diff --git a/superset-frontend/src/pages/SavedQueryList/index.tsx b/superset-frontend/src/pages/SavedQueryList/index.tsx
index 052815f6356..c68654a519c 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: (
+ {/* TODO: Remove fa-icon */}
+ {/* eslint-disable-next-line icons/no-fa-icons-usage */}
{t('Query')}
),
diff --git a/superset-frontend/src/pages/Tags/index.tsx b/superset-frontend/src/pages/Tags/index.tsx
index d7bda00ed43..138b1e8a44a 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 */}
{' '}
{'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 */}
{t('Tag')}
>
),
diff --git a/superset-frontend/src/preamble.ts b/superset-frontend/src/preamble.ts
index 54c3b15e4fc..d7aebc1c27d 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 63b65cb60b1..a16a13544ef 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';