You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2024/01/22 04:53:10 UTC

(superset) branch no-full-lodash created (now ac1c25e7b3)

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a change to branch no-full-lodash
in repository https://gitbox.apache.org/repos/asf/superset.git


      at ac1c25e7b3 fixing all the things

This branch includes the following new commits:

     new 81f4fd6348 first wave...
     new ac1c25e7b3 fixing all the things

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(superset) 02/02: fixing all the things

Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch no-full-lodash
in repository https://gitbox.apache.org/repos/asf/superset.git

commit ac1c25e7b397aef10f83ac11e38fcf69ce9e6a6a
Author: Evan Rusackas <ev...@rusackas.com>
AuthorDate: Sun Jan 21 21:52:59 2024 -0700

    fixing all the things
---
 .../generator-superset/generators/plugin-chart/index.js   | 15 +++++++++------
 .../src/components/CertifiedIconWithTooltip.tsx           |  2 +-
 .../src/components/InfoTooltipWithTrigger.tsx             |  2 +-
 .../src/operators/sortOperator.ts                         |  2 +-
 .../src/operators/utils/timeOffset.ts                     |  2 +-
 .../src/shared-controls/sharedControls.tsx                |  2 +-
 .../superset-ui-core/src/components/SafeMarkdown.tsx      |  3 ++-
 .../src/connection/callApi/parseResponse.ts               |  2 +-
 .../legacy-preset-chart-deckgl/src/DeckGLContainer.tsx    |  2 +-
 .../legacy-preset-chart-deckgl/src/Multi/Multi.tsx        |  2 +-
 .../plugins/legacy-preset-chart-deckgl/src/factory.tsx    |  2 +-
 .../src/layers/Screengrid/Screengrid.tsx                  |  2 +-
 .../plugins/legacy-preset-chart-deckgl/src/utils.ts       |  2 +-
 .../plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js       |  3 ++-
 .../src/MixedTimeseries/controlPanel.tsx                  |  2 +-
 .../src/MixedTimeseries/transformProps.ts                 |  2 +-
 .../plugin-chart-echarts/src/Timeseries/transformProps.ts |  2 +-
 .../plugins/plugin-chart-echarts/src/utils/annotation.ts  |  2 +-
 .../plugins/plugin-chart-echarts/src/utils/forecast.ts    |  2 +-
 .../plugins/plugin-chart-echarts/src/utils/series.ts      |  6 +++++-
 .../plugins/plugin-chart-echarts/src/utils/treeBuilder.ts |  4 +++-
 .../src/components/Handlebars/HandlebarsViewer.tsx        |  2 +-
 .../plugins/plugin-chart-handlebars/src/consts.ts         |  2 +-
 .../src/plugin/controls/orderBy.tsx                       |  2 +-
 .../plugin-chart-table/src/DataTable/DataTable.tsx        |  2 +-
 .../plugin-chart-word-cloud/src/chart/WordCloud.tsx       |  2 +-
 .../src/SqlLab/components/QueryAutoRefresh/index.tsx      |  2 +-
 .../src/SqlLab/components/SaveDatasetModal/index.tsx      |  3 ++-
 .../src/SqlLab/components/SqlEditor/index.tsx             |  3 ++-
 .../src/SqlLab/components/TableElement/index.tsx          |  2 +-
 .../src/SqlLab/components/TemplateParamsEditor/index.tsx  |  2 +-
 .../src/SqlLab/middlewares/persistSqlLabStateEnhancer.js  |  2 +-
 .../src/components/AlteredSliceTag/index.jsx              |  3 ++-
 superset-frontend/src/components/Button/index.tsx         |  2 +-
 superset-frontend/src/components/Chart/ChartRenderer.jsx  |  4 +++-
 .../src/components/Chart/DrillBy/DrillByModal.test.tsx    |  4 +++-
 .../components/Chart/DrillDetail/DrillDetailMenuItems.tsx |  2 +-
 .../src/components/Chart/DrillDetail/utils.ts             |  2 +-
 superset-frontend/src/components/Chart/chartReducer.ts    |  2 +-
 .../DropdownContainer/DropdownContainer.stories.tsx       |  2 +-
 superset-frontend/src/components/DynamicPlugins/index.tsx |  2 +-
 superset-frontend/src/components/Icons/index.tsx          |  2 +-
 superset-frontend/src/components/ListView/utils.ts        |  2 +-
 .../src/components/MetadataBar/MetadataBar.tsx            |  2 +-
 superset-frontend/src/components/Modal/Modal.tsx          |  2 +-
 superset-frontend/src/components/Select/AsyncSelect.tsx   |  3 ++-
 superset-frontend/src/components/Select/Select.tsx        |  4 +++-
 superset-frontend/src/dashboard/actions/dashboardInfo.ts  |  2 +-
 superset-frontend/src/dashboard/actions/nativeFilters.ts  |  2 +-
 .../src/dashboard/components/FiltersBadge/index.tsx       |  2 +-
 .../components/Header/HeaderActionsDropdown/index.jsx     |  2 +-
 .../src/dashboard/components/PropertiesModal/index.tsx    |  2 +-
 superset-frontend/src/dashboard/components/SliceAdder.jsx |  3 ++-
 .../src/dashboard/components/dnd/handleHover.js           |  2 +-
 .../src/dashboard/components/gridComponents/Chart.jsx     |  3 ++-
 .../FilterBar/FilterControls/FilterValue.tsx              |  3 ++-
 .../nativeFilters/FilterBar/FilterControls/utils.ts       |  2 +-
 .../components/nativeFilters/FilterBar/index.tsx          |  4 +++-
 .../FiltersConfigForm/FiltersConfigForm.tsx               |  2 +-
 .../FiltersConfigModal/FiltersConfigForm/utils.ts         |  2 +-
 .../FiltersConfigModal/FiltersConfigModal.tsx             |  6 +++++-
 superset-frontend/src/dashboard/reducers/datasources.ts   |  2 +-
 .../src/dashboard/util/activeDashboardFilters.js          |  2 +-
 superset-frontend/src/dashboard/util/crossFilters.ts      |  2 +-
 superset-frontend/src/dashboard/util/getDashboardUrl.ts   |  2 +-
 .../src/dashboard/util/getFilterScopeFromNodesTree.js     |  3 ++-
 .../src/dashboard/util/getFilterScopeNodesTree.js         |  2 +-
 .../src/dashboard/util/replaceUndefinedByNull.ts          |  2 +-
 superset-frontend/src/explore/actions/saveModalActions.js |  2 +-
 superset-frontend/src/explore/components/Control.tsx      |  2 +-
 .../src/explore/components/ControlPanelsContainer.tsx     |  2 +-
 .../DataTablesPane/components/DataTableControls.tsx       |  2 +-
 .../src/explore/components/DatasourcePanel/index.tsx      |  3 ++-
 .../src/explore/components/ExploreViewContainer/index.jsx |  3 ++-
 .../src/explore/components/controls/BoundsControl.tsx     |  2 +-
 .../components/controls/ColorSchemeControl/index.tsx      |  2 +-
 .../controls/ColumnConfigControl/ControlForm/index.tsx    |  2 +-
 .../components/controls/DatasourceControl/index.jsx       |  2 +-
 .../controls/DateFilterControl/components/CustomFrame.tsx |  2 +-
 .../controls/DndColumnSelectControl/DndColumnSelect.tsx   |  2 +-
 .../useAdvancedDataTypes.ts                               |  2 +-
 .../components/controls/MetricControl/MetricsControl.jsx  |  2 +-
 .../explore/components/controls/ViewQueryModalFooter.tsx  |  2 +-
 .../src/explore/controlUtils/standardizedFormData.ts      |  2 +-
 superset-frontend/src/explore/exploreUtils/formData.ts    |  2 +-
 .../DatabaseConnectionForm/CommonParameters.tsx           |  2 +-
 .../features/databases/DatabaseModal/SSHTunnelSwitch.tsx  |  2 +-
 .../src/features/databases/DatabaseModal/index.tsx        |  3 ++-
 superset-frontend/src/features/home/ChartTable.tsx        |  2 +-
 superset-frontend/src/features/home/DashboardTable.tsx    |  2 +-
 superset-frontend/src/features/home/Menu.tsx              |  2 +-
 superset-frontend/src/features/home/RightMenu.tsx         |  2 +-
 superset-frontend/src/features/home/SubMenu.tsx           |  2 +-
 .../reports/ReportModal/HeaderReportDropdown/index.tsx    |  2 +-
 .../src/features/reports/ReportModal/actions.js           |  2 +-
 .../src/features/reports/ReportModal/reducer.js           |  2 +-
 superset-frontend/src/hooks/apiResources/sqlEditorTabs.ts |  2 +-
 superset-frontend/src/pages/ChartList/index.tsx           |  2 +-
 superset-frontend/src/pages/Home/index.tsx                |  2 +-
 superset-frontend/src/pages/SqlLab/SqlLab.test.tsx        |  2 +-
 superset-frontend/src/preamble.ts                         |  2 +-
 superset-frontend/src/reduxUtils.ts                       | 14 ++++++--------
 superset-frontend/src/types/bootstrapTypes.ts             |  2 +-
 superset-frontend/src/utils/DebouncedMessageQueue.js      |  2 +-
 superset-frontend/src/utils/urlUtils.ts                   |  2 +-
 superset-frontend/src/views/CRUD/utils.tsx                |  2 +-
 106 files changed, 150 insertions(+), 118 deletions(-)

diff --git a/superset-frontend/packages/generator-superset/generators/plugin-chart/index.js b/superset-frontend/packages/generator-superset/generators/plugin-chart/index.js
index d704150554..4db2d87712 100644
--- a/superset-frontend/packages/generator-superset/generators/plugin-chart/index.js
+++ b/superset-frontend/packages/generator-superset/generators/plugin-chart/index.js
@@ -20,7 +20,10 @@
 /* eslint-disable sort-keys */
 
 const Generator = require('yeoman-generator');
-const _ = require('lodash');
+const kebabCase = require('lodash/kebabCase');
+const camelCase = require('lodash/camelCase');
+const upperFirst = require('lodash/upperFirst');
+const startCase = require('lodash/startCase');
 
 module.exports = class extends Generator {
   async prompting() {
@@ -32,15 +35,15 @@ module.exports = class extends Generator {
         name: 'packageName',
         message: 'Package name:',
         // Default to current folder name, e.g. superset-plugin-chart-hello-world
-        default: _.kebabCase(this.appname),
+        default: kebabCase(this.appname),
       },
       {
         type: 'input',
         name: 'pluginName',
         message: 'Plugin name:',
         // Hello World
-        default: _.startCase(
-          _.camelCase(this.appname.replace('superset plugin chart', '').trim()),
+        default: startCase(
+          camelCase(this.appname.replace('superset plugin chart', '').trim()),
         ),
       },
       {
@@ -48,7 +51,7 @@ module.exports = class extends Generator {
         name: 'description',
         message: 'Description:',
         // Superset Plugin Chart Hello World
-        default: _.upperFirst(_.startCase(this.appname)),
+        default: upperFirst(startCase(this.appname)),
       },
       {
         type: 'list',
@@ -70,7 +73,7 @@ module.exports = class extends Generator {
 
   writing() {
     // SupersetPluginChartHelloWorld
-    const packageLabel = _.upperFirst(_.camelCase(this.answers.packageName));
+    const packageLabel = upperFirst(camelCase(this.answers.packageName));
 
     const params = {
       ...this.answers,
diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx
index 07492a1818..ae20b91fd0 100644
--- a/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx
+++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/CertifiedIconWithTooltip.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 import React from 'react';
-import { kebabCase } from 'lodash';
+import kebabCase from 'lodash/kebabCase';
 import { t, useTheme, styled } from '@superset-ui/core';
 import Tooltip from './Tooltip';
 
diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/InfoTooltipWithTrigger.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/InfoTooltipWithTrigger.tsx
index 86a4a3d1d1..08cad5c564 100644
--- a/superset-frontend/packages/superset-ui-chart-controls/src/components/InfoTooltipWithTrigger.tsx
+++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/InfoTooltipWithTrigger.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 import React, { CSSProperties } from 'react';
-import { kebabCase } from 'lodash';
+import kebabCase from 'lodash/kebabCase';
 import { TooltipPlacement } from 'antd/lib/tooltip';
 import { t } from '@superset-ui/core';
 import { Tooltip, TooltipProps } from './Tooltip';
diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/operators/sortOperator.ts b/superset-frontend/packages/superset-ui-chart-controls/src/operators/sortOperator.ts
index 4d7b5deaf4..29608389cf 100644
--- a/superset-frontend/packages/superset-ui-chart-controls/src/operators/sortOperator.ts
+++ b/superset-frontend/packages/superset-ui-chart-controls/src/operators/sortOperator.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitationsxw
  * under the License.
  */
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import {
   ensureIsArray,
   getMetricLabel,
diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/timeOffset.ts b/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/timeOffset.ts
index b11572c6dd..01de7c3dd9 100644
--- a/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/timeOffset.ts
+++ b/superset-frontend/packages/superset-ui-chart-controls/src/operators/utils/timeOffset.ts
@@ -18,7 +18,7 @@
  * under the License.
  */
 import { JsonObject } from '@superset-ui/core';
-import { isString } from 'lodash';
+import isString from 'lodash/isString';
 
 export const hasTimeOffset = (
   series: JsonObject,
diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx
index a981c4422e..2eaa0722e6 100644
--- a/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx
+++ b/superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx
@@ -33,7 +33,7 @@
  * here's a list of the keys that are common to all controls, and as a result define the
  * control interface.
  */
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import {
   t,
   getCategoricalSchemeRegistry,
diff --git a/superset-frontend/packages/superset-ui-core/src/components/SafeMarkdown.tsx b/superset-frontend/packages/superset-ui-core/src/components/SafeMarkdown.tsx
index 2b36802d4b..4fd7dbc1d5 100644
--- a/superset-frontend/packages/superset-ui-core/src/components/SafeMarkdown.tsx
+++ b/superset-frontend/packages/superset-ui-core/src/components/SafeMarkdown.tsx
@@ -21,7 +21,8 @@ import ReactMarkdown from 'react-markdown';
 import rehypeSanitize, { defaultSchema } from 'rehype-sanitize';
 import rehypeRaw from 'rehype-raw';
 import remarkGfm from 'remark-gfm';
-import { mergeWith, isArray } from 'lodash';
+import isArray from 'lodash/isArray';
+import mergeWith from 'lodash/mergeWith';
 import { FeatureFlag, isFeatureEnabled } from '../utils';
 
 interface SafeMarkdownProps {
diff --git a/superset-frontend/packages/superset-ui-core/src/connection/callApi/parseResponse.ts b/superset-frontend/packages/superset-ui-core/src/connection/callApi/parseResponse.ts
index 15beca6e15..ad22f55b3d 100644
--- a/superset-frontend/packages/superset-ui-core/src/connection/callApi/parseResponse.ts
+++ b/superset-frontend/packages/superset-ui-core/src/connection/callApi/parseResponse.ts
@@ -17,7 +17,7 @@
  * under the License.
  */
 import JSONbig from 'json-bigint';
-import { cloneDeepWith } from 'lodash';
+import cloneDeepWith from 'lodash/cloneDeepWith';
 
 import { ParseMethod, TextResponse, JsonResponse } from '../types';
 
diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/DeckGLContainer.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/DeckGLContainer.tsx
index 7b8f61e18b..0b9bdb11ef 100644
--- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/DeckGLContainer.tsx
+++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/DeckGLContainer.tsx
@@ -29,7 +29,7 @@ import React, {
   useImperativeHandle,
   useState,
 } from 'react';
-import { isEqual } from 'lodash';
+import isEqual from 'lodash/isEqual';
 import { StaticMap } from 'react-map-gl';
 import DeckGL, { Layer } from 'deck.gl/typed';
 import { JsonObject, JsonValue, styled, usePrevious } from '@superset-ui/core';
diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.tsx
index 540b094219..6758c506a8 100644
--- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.tsx
+++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/Multi/Multi.tsx
@@ -20,7 +20,7 @@
  * under the License.
  */
 import React, { memo, useCallback, useEffect, useRef, useState } from 'react';
-import { isEqual } from 'lodash';
+import isEqual from 'lodash/isEqual';
 import {
   Datasource,
   HandlerFunction,
diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/factory.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/factory.tsx
index fb1255a2fd..c81af9ae6b 100644
--- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/factory.tsx
+++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/factory.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 import React, { memo, useCallback, useEffect, useRef, useState } from 'react';
-import { isEqual } from 'lodash';
+import isEqual from 'lodash/isEqual';
 import { Layer } from 'deck.gl/typed';
 import {
   Datasource,
diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/Screengrid.tsx b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/Screengrid.tsx
index 7e47cc9530..300dc300a8 100644
--- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/Screengrid.tsx
+++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/layers/Screengrid/Screengrid.tsx
@@ -23,7 +23,7 @@
 import React, { memo, useCallback, useEffect, useRef, useState } from 'react';
 import { ScreenGridLayer } from 'deck.gl/typed';
 import { JsonObject, JsonValue, QueryFormData, t } from '@superset-ui/core';
-import { noop } from 'lodash';
+import noop from 'lodash/noop';
 import sandboxedEval from '../../utils/sandbox';
 import { commonLayerProps } from '../common';
 import TooltipRow from '../../TooltipRow';
diff --git a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utils.ts b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utils.ts
index aac2a739e6..05fbc7ee27 100644
--- a/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utils.ts
+++ b/superset-frontend/plugins/legacy-preset-chart-deckgl/src/utils.ts
@@ -25,7 +25,7 @@ import {
   QueryFormData,
   SequentialScheme,
 } from '@superset-ui/core';
-import { isNumber } from 'lodash';
+import isNumber from 'lodash/isNumber';
 import { hexToRGB } from './utils/colors';
 
 const DEFAULT_NUM_BUCKETS = 10;
diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js
index 81287b18ec..9c18c16d47 100644
--- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js
+++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Vis.js
@@ -17,7 +17,8 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { kebabCase, throttle } from 'lodash';
+import kebabCase from 'lodash/kebabCase';
+import throttle from 'lodash/throttle';
 import d3 from 'd3';
 import moment from 'moment';
 import nv from 'nvd3-fork';
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/controlPanel.tsx b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/controlPanel.tsx
index d3fb1fc53e..ec6acd964e 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/controlPanel.tsx
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/controlPanel.tsx
@@ -18,7 +18,7 @@
  */
 import React from 'react';
 import { ensureIsArray, hasGenericChartAxes, t } from '@superset-ui/core';
-import { cloneDeep } from 'lodash';
+import cloneDeep from 'lodash/cloneDeep';
 import {
   ControlPanelConfig,
   ControlPanelSectionConfig,
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts
index 1d4eceb33f..96a4222af7 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/MixedTimeseries/transformProps.ts
@@ -17,7 +17,7 @@
  * under the License.
  */
 /* eslint-disable camelcase */
-import { invert } from 'lodash';
+import invert from 'lodash/invert';
 import {
   AnnotationLayer,
   buildCustomFormatters,
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
index 3bbe285aec..1e80cf3522 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/transformProps.ts
@@ -17,7 +17,7 @@
  * under the License.
  */
 /* eslint-disable camelcase */
-import { invert } from 'lodash';
+import invert from 'lodash/invert';
 import {
   AnnotationLayer,
   AxisType,
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/utils/annotation.ts b/superset-frontend/plugins/plugin-chart-echarts/src/utils/annotation.ts
index d3d858d979..921628004b 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/utils/annotation.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/utils/annotation.ts
@@ -17,7 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 
 import {
   Annotation,
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/utils/forecast.ts b/superset-frontend/plugins/plugin-chart-echarts/src/utils/forecast.ts
index 18b160b9c6..8668340e37 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/utils/forecast.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/utils/forecast.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { isNumber } from 'lodash';
+import isNumber from 'lodash/isNumber';
 import { DataRecord, DTTM_ALIAS, ValueFormatter } from '@superset-ui/core';
 import { OptionName } from 'echarts/types/src/util/types';
 import { TooltipMarker } from 'echarts/types/src/util/format';
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts
index 6a51e7cbf7..98d1f48c89 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts
@@ -35,7 +35,11 @@ import {
 } from '@superset-ui/core';
 import { SortSeriesType } from '@superset-ui/chart-controls';
 import { format, LegendComponentOption, SeriesOption } from 'echarts';
-import { maxBy, meanBy, minBy, orderBy, sumBy } from 'lodash';
+import maxBy from 'lodash/maxBy';
+import meanBy from 'lodash/meanBy';
+import minBy from 'lodash/minBy';
+import orderBy from 'lodash/orderBy';
+import sumBy from 'lodash/sumBy';
 import {
   NULL_STRING,
   StackControlsValue,
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/utils/treeBuilder.ts b/superset-frontend/plugins/plugin-chart-echarts/src/utils/treeBuilder.ts
index cda78da93a..38a9be1ae2 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/utils/treeBuilder.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/utils/treeBuilder.ts
@@ -17,7 +17,9 @@
  * under the License.
  */
 import { DataRecord, DataRecordValue } from '@superset-ui/core';
-import { groupBy as _groupBy, isNumber, transform } from 'lodash';
+import _groupBy from 'lodash/groupBy';
+import isNumber from 'lodash/isNumber';
+import transform from 'lodash/transform';
 
 export type TreeNode = {
   name: DataRecordValue;
diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx
index 371b4f48f9..c0e4fe6589 100644
--- a/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx
+++ b/superset-frontend/plugins/plugin-chart-handlebars/src/components/Handlebars/HandlebarsViewer.tsx
@@ -20,7 +20,7 @@ import { SafeMarkdown, styled, t } from '@superset-ui/core';
 import Handlebars from 'handlebars';
 import moment from 'moment';
 import React, { useMemo, useState } from 'react';
-import { isPlainObject } from 'lodash';
+import isPlainObject from 'lodash/isPlainObject';
 import Helpers from 'just-handlebars-helpers';
 
 export interface HandlebarsViewerProps {
diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/consts.ts b/superset-frontend/plugins/plugin-chart-handlebars/src/consts.ts
index e566fd66b2..5180208179 100644
--- a/superset-frontend/plugins/plugin-chart-handlebars/src/consts.ts
+++ b/superset-frontend/plugins/plugin-chart-handlebars/src/consts.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { debounce } from 'lodash';
+import debounce from 'lodash/debounce';
 import { formatSelectOptions } from '@superset-ui/chart-controls';
 import { SLOW_DEBOUNCE, t } from '@superset-ui/core';
 
diff --git a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/orderBy.tsx b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/orderBy.tsx
index d2f52e8e9b..70769d66db 100644
--- a/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/orderBy.tsx
+++ b/superset-frontend/plugins/plugin-chart-handlebars/src/plugin/controls/orderBy.tsx
@@ -18,7 +18,7 @@
  */
 import { ControlSetItem, Dataset } from '@superset-ui/chart-controls';
 import { t } from '@superset-ui/core';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import { isAggMode, isRawMode } from './shared';
 
 export const orderByControlSetItem: ControlSetItem = {
diff --git a/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx b/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
index 6c5123806f..4ccf9bf8f5 100644
--- a/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
+++ b/superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx
@@ -38,7 +38,7 @@ import {
 } from 'react-table';
 import { matchSorter, rankings } from 'match-sorter';
 import { typedMemo, usePrevious } from '@superset-ui/core';
-import { isEqual } from 'lodash';
+import isEqual from 'lodash/isEqual';
 import GlobalFilter, { GlobalFilterProps } from './components/GlobalFilter';
 import SelectPageSize, {
   SelectPageSizeProps,
diff --git a/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx b/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx
index 2cedd648aa..b924319ab9 100644
--- a/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx
+++ b/superset-frontend/plugins/plugin-chart-word-cloud/src/chart/WordCloud.tsx
@@ -31,7 +31,7 @@ import {
   seed,
   CategoricalColorScale,
 } from '@superset-ui/core';
-import { isEqual } from 'lodash';
+import isEqual from 'lodash/isEqual';
 
 const seedRandom = seed('superset-ui');
 export const ROTATION = {
diff --git a/superset-frontend/src/SqlLab/components/QueryAutoRefresh/index.tsx b/superset-frontend/src/SqlLab/components/QueryAutoRefresh/index.tsx
index f4808f52fd..e419dd3272 100644
--- a/superset-frontend/src/SqlLab/components/QueryAutoRefresh/index.tsx
+++ b/superset-frontend/src/SqlLab/components/QueryAutoRefresh/index.tsx
@@ -18,7 +18,7 @@
  */
 import { useRef } from 'react';
 import { useDispatch } from 'react-redux';
-import { isObject } from 'lodash';
+import isObject from 'lodash/isObject';
 import rison from 'rison';
 import {
   SupersetClient,
diff --git a/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx b/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
index 8e90f1c664..38853424ae 100644
--- a/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
+++ b/superset-frontend/src/SqlLab/components/SaveDatasetModal/index.tsx
@@ -48,7 +48,8 @@ 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';
-import { isEmpty, isString } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
+import isString from 'lodash/isString';
 
 interface QueryDatabase {
   id?: number;
diff --git a/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx b/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx
index 0881434487..cf9c50d6a3 100644
--- a/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx
+++ b/superset-frontend/src/SqlLab/components/SqlEditor/index.tsx
@@ -93,7 +93,8 @@ import {
 } from 'src/utils/localStorageHelpers';
 import { EmptyStateBig } from 'src/components/EmptyState';
 import getBootstrapData from 'src/utils/getBootstrapData';
-import { isBoolean, isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
+import isBoolean from 'lodash/isBoolean';
 import TemplateParamsEditor from '../TemplateParamsEditor';
 import SouthPane from '../SouthPane';
 import SaveQuery, { QueryPayload } from '../SaveQuery';
diff --git a/superset-frontend/src/SqlLab/components/TableElement/index.tsx b/superset-frontend/src/SqlLab/components/TableElement/index.tsx
index 7a21331d99..b694fb40b5 100644
--- a/superset-frontend/src/SqlLab/components/TableElement/index.tsx
+++ b/superset-frontend/src/SqlLab/components/TableElement/index.tsx
@@ -23,7 +23,7 @@ import Collapse from 'src/components/Collapse';
 import Card from 'src/components/Card';
 import ButtonGroup from 'src/components/ButtonGroup';
 import { css, t, styled, useTheme } from '@superset-ui/core';
-import { debounce } from 'lodash';
+import debounce from 'lodash/debounce';
 
 import {
   removeDataPreview,
diff --git a/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx b/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx
index 0aa5503861..39a194ea23 100644
--- a/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx
+++ b/superset-frontend/src/SqlLab/components/TemplateParamsEditor/index.tsx
@@ -19,7 +19,7 @@
 import React, { useState, useEffect } from 'react';
 import { t, styled } from '@superset-ui/core';
 import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
-import { debounce } from 'lodash';
+import debounce from 'lodash/debounce';
 
 import Badge from 'src/components/Badge';
 import ModalTrigger from 'src/components/ModalTrigger';
diff --git a/superset-frontend/src/SqlLab/middlewares/persistSqlLabStateEnhancer.js b/superset-frontend/src/SqlLab/middlewares/persistSqlLabStateEnhancer.js
index d1bec5e0c1..ede61afedd 100644
--- a/superset-frontend/src/SqlLab/middlewares/persistSqlLabStateEnhancer.js
+++ b/superset-frontend/src/SqlLab/middlewares/persistSqlLabStateEnhancer.js
@@ -18,7 +18,7 @@
  */
 // TODO: requires redux-localstorage > 1.0 for typescript support
 import persistState from 'redux-localstorage';
-import { pickBy } from 'lodash';
+import pickBy from 'lodash/pickBy';
 import { isFeatureEnabled, FeatureFlag } from '@superset-ui/core';
 import { filterUnsavedQueryEditorList } from 'src/SqlLab/components/EditorAutoSync';
 import {
diff --git a/superset-frontend/src/components/AlteredSliceTag/index.jsx b/superset-frontend/src/components/AlteredSliceTag/index.jsx
index 83458fc0a4..4b0b564c02 100644
--- a/superset-frontend/src/components/AlteredSliceTag/index.jsx
+++ b/superset-frontend/src/components/AlteredSliceTag/index.jsx
@@ -18,7 +18,8 @@
  */
 import React from 'react';
 import PropTypes from 'prop-types';
-import { isEqual, isEmpty } from 'lodash';
+import isEqual from 'lodash/isEqual';
+import isEmpty from 'lodash/isEmpty';
 import { styled, t } from '@superset-ui/core';
 import { sanitizeFormData } from 'src/explore/exploreUtils/formData';
 import getControlsForVizType from 'src/utils/getControlsForVizType';
diff --git a/superset-frontend/src/components/Button/index.tsx b/superset-frontend/src/components/Button/index.tsx
index 05a1a3ad79..14c71773e1 100644
--- a/superset-frontend/src/components/Button/index.tsx
+++ b/superset-frontend/src/components/Button/index.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 import React, { Children, ReactElement } from 'react';
-import { kebabCase } from 'lodash';
+import kebabCase from 'lodash/kebabCase';
 import { mix } from 'polished';
 import cx from 'classnames';
 import { AntdButton } from 'src/components';
diff --git a/superset-frontend/src/components/Chart/ChartRenderer.jsx b/superset-frontend/src/components/Chart/ChartRenderer.jsx
index 006dd54fcb..76b578135a 100644
--- a/superset-frontend/src/components/Chart/ChartRenderer.jsx
+++ b/superset-frontend/src/components/Chart/ChartRenderer.jsx
@@ -16,7 +16,9 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { snakeCase, isEqual, cloneDeep } from 'lodash';
+import snakeCase from 'lodash/snakeCase';
+import isEqual from 'lodash/isEqual';
+import cloneDeep from 'lodash/cloneDeep';
 import PropTypes from 'prop-types';
 import React from 'react';
 import {
diff --git a/superset-frontend/src/components/Chart/DrillBy/DrillByModal.test.tsx b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.test.tsx
index 95e2f6027f..465eaf9c24 100644
--- a/superset-frontend/src/components/Chart/DrillBy/DrillByModal.test.tsx
+++ b/superset-frontend/src/components/Chart/DrillBy/DrillByModal.test.tsx
@@ -19,7 +19,9 @@
 
 import React, { useState } from 'react';
 import fetchMock from 'fetch-mock';
-import { omit, isUndefined, omitBy } from 'lodash';
+import omit from 'lodash/omit';
+import isUndefined from 'lodash/isUndefined';
+import omitBy from 'lodash/omitBy';
 import userEvent from '@testing-library/user-event';
 import { waitFor, within } from '@testing-library/react';
 import { render, screen } from 'spec/helpers/testing-library';
diff --git a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.tsx b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.tsx
index 73f3a028e9..be6cdad12d 100644
--- a/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.tsx
+++ b/superset-frontend/src/components/Chart/DrillDetail/DrillDetailMenuItems.tsx
@@ -18,7 +18,7 @@
  */
 
 import React, { ReactNode, useCallback, useMemo, useState } from 'react';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import {
   Behavior,
   BinaryQueryObjectFilterClause,
diff --git a/superset-frontend/src/components/Chart/DrillDetail/utils.ts b/superset-frontend/src/components/Chart/DrillDetail/utils.ts
index 03494024a9..1332b2703c 100644
--- a/superset-frontend/src/components/Chart/DrillDetail/utils.ts
+++ b/superset-frontend/src/components/Chart/DrillDetail/utils.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { omit } from 'lodash';
+import omit from 'lodash/omit';
 import {
   ensureIsArray,
   QueryFormData,
diff --git a/superset-frontend/src/components/Chart/chartReducer.ts b/superset-frontend/src/components/Chart/chartReducer.ts
index d91d77c49a..4cb21ec642 100644
--- a/superset-frontend/src/components/Chart/chartReducer.ts
+++ b/superset-frontend/src/components/Chart/chartReducer.ts
@@ -18,7 +18,7 @@
  */
 /* eslint camelcase: 0 */
 import { t } from '@superset-ui/core';
-import { omit } from 'lodash';
+import omit from 'lodash/omit';
 import { HYDRATE_DASHBOARD } from 'src/dashboard/actions/hydrate';
 import { DatasourcesAction } from 'src/dashboard/actions/datasources';
 import { ChartState } from 'src/explore/types';
diff --git a/superset-frontend/src/components/DropdownContainer/DropdownContainer.stories.tsx b/superset-frontend/src/components/DropdownContainer/DropdownContainer.stories.tsx
index 4aeaa03a16..bb39758e37 100644
--- a/superset-frontend/src/components/DropdownContainer/DropdownContainer.stories.tsx
+++ b/superset-frontend/src/components/DropdownContainer/DropdownContainer.stories.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 import React, { useCallback, useState } from 'react';
-import { isEqual } from 'lodash';
+import isEqual from 'lodash/isEqual';
 import { css } from '@superset-ui/core';
 import Select from '../Select/Select';
 import Button from '../Button';
diff --git a/superset-frontend/src/components/DynamicPlugins/index.tsx b/superset-frontend/src/components/DynamicPlugins/index.tsx
index 9134e73fda..95ad906133 100644
--- a/superset-frontend/src/components/DynamicPlugins/index.tsx
+++ b/superset-frontend/src/components/DynamicPlugins/index.tsx
@@ -26,7 +26,7 @@ import {
   logging,
   makeApi,
 } from '@superset-ui/core';
-import { omitBy } from 'lodash';
+import omitBy from 'lodash/omitBy';
 
 const metadataRegistry = getChartMetadataRegistry();
 
diff --git a/superset-frontend/src/components/Icons/index.tsx b/superset-frontend/src/components/Icons/index.tsx
index fcf03df25b..86247a9d07 100644
--- a/superset-frontend/src/components/Icons/index.tsx
+++ b/superset-frontend/src/components/Icons/index.tsx
@@ -18,7 +18,7 @@
  */
 
 import React from 'react';
-import { startCase } from 'lodash';
+import startCase from 'lodash/startCase';
 import AntdEnhancedIcons from './AntdEnhanced';
 import Icon from './Icon';
 import IconType from './IconType';
diff --git a/superset-frontend/src/components/ListView/utils.ts b/superset-frontend/src/components/ListView/utils.ts
index 31a9368a1a..7db366cc69 100644
--- a/superset-frontend/src/components/ListView/utils.ts
+++ b/superset-frontend/src/components/ListView/utils.ts
@@ -34,7 +34,7 @@ import {
 } from 'use-query-params';
 
 import rison from 'rison';
-import { isEqual } from 'lodash';
+import isEqual from 'lodash/isEqual';
 import {
   FetchDataConfig,
   Filter,
diff --git a/superset-frontend/src/components/MetadataBar/MetadataBar.tsx b/superset-frontend/src/components/MetadataBar/MetadataBar.tsx
index a05e4574cd..1bc46aaa61 100644
--- a/superset-frontend/src/components/MetadataBar/MetadataBar.tsx
+++ b/superset-frontend/src/components/MetadataBar/MetadataBar.tsx
@@ -18,7 +18,7 @@
  */
 import React, { useCallback, useEffect, useRef, useState } from 'react';
 import { useResizeDetector } from 'react-resize-detector';
-import { uniqWith } from 'lodash';
+import uniqWith from 'lodash/uniqWith';
 import { styled } from '@superset-ui/core';
 import { Tooltip, TooltipPlacement } from 'src/components/Tooltip';
 import { ContentType } from './ContentType';
diff --git a/superset-frontend/src/components/Modal/Modal.tsx b/superset-frontend/src/components/Modal/Modal.tsx
index fc9b821683..17904e5b37 100644
--- a/superset-frontend/src/components/Modal/Modal.tsx
+++ b/superset-frontend/src/components/Modal/Modal.tsx
@@ -23,7 +23,7 @@ import React, {
   useRef,
   useState,
 } from 'react';
-import { isNil } from 'lodash';
+import isNil from 'lodash/isNil';
 import { ModalFuncProps } from 'antd/lib/modal';
 import { styled, t } from '@superset-ui/core';
 import { css } from '@emotion/react';
diff --git a/superset-frontend/src/components/Select/AsyncSelect.tsx b/superset-frontend/src/components/Select/AsyncSelect.tsx
index 015a12cb96..6f548295d6 100644
--- a/superset-frontend/src/components/Select/AsyncSelect.tsx
+++ b/superset-frontend/src/components/Select/AsyncSelect.tsx
@@ -32,7 +32,8 @@ import React, {
 import { ensureIsArray, t, usePrevious } from '@superset-ui/core';
 import { LabeledValue as AntdLabeledValue } from 'antd/lib/select';
 import debounce from 'lodash/debounce';
-import { isEqual, uniq } from 'lodash';
+import isEqual from 'lodash/isEqual';
+import uniq from 'lodash/uniq';
 import Icons from 'src/components/Icons';
 import { getClientErrorObject } from 'src/utils/getClientErrorObject';
 import { FAST_DEBOUNCE, SLOW_DEBOUNCE } from 'src/constants';
diff --git a/superset-frontend/src/components/Select/Select.tsx b/superset-frontend/src/components/Select/Select.tsx
index f4f9565abb..e6c58c24be 100644
--- a/superset-frontend/src/components/Select/Select.tsx
+++ b/superset-frontend/src/components/Select/Select.tsx
@@ -34,7 +34,9 @@ import {
   usePrevious,
 } from '@superset-ui/core';
 import AntdSelect, { LabeledValue as AntdLabeledValue } from 'antd/lib/select';
-import { debounce, isEqual, uniq } from 'lodash';
+import debounce from 'lodash/debounce';
+import isEqual from 'lodash/isEqual';
+import uniq from 'lodash/uniq';
 import { FAST_DEBOUNCE } from 'src/constants';
 import {
   getValue,
diff --git a/superset-frontend/src/dashboard/actions/dashboardInfo.ts b/superset-frontend/src/dashboard/actions/dashboardInfo.ts
index 472f945b54..b22b81f975 100644
--- a/superset-frontend/src/dashboard/actions/dashboardInfo.ts
+++ b/superset-frontend/src/dashboard/actions/dashboardInfo.ts
@@ -18,7 +18,7 @@
  */
 import { Dispatch } from 'redux';
 import { makeApi, CategoricalColorNamespace, t } from '@superset-ui/core';
-import { isString } from 'lodash';
+import isString from 'lodash/isString';
 import { getErrorText } from 'src/utils/getClientErrorObject';
 import { addDangerToast } from 'src/components/MessageToasts/actions';
 import {
diff --git a/superset-frontend/src/dashboard/actions/nativeFilters.ts b/superset-frontend/src/dashboard/actions/nativeFilters.ts
index 968805dbb7..4b93a987fc 100644
--- a/superset-frontend/src/dashboard/actions/nativeFilters.ts
+++ b/superset-frontend/src/dashboard/actions/nativeFilters.ts
@@ -18,7 +18,7 @@
  */
 import { FilterConfiguration, Filters, makeApi } from '@superset-ui/core';
 import { Dispatch } from 'redux';
-import { cloneDeep } from 'lodash';
+import cloneDeep from 'lodash/cloneDeep';
 import {
   SET_DATA_MASK_FOR_FILTER_CONFIG_FAIL,
   setDataMaskForFilterConfigComplete,
diff --git a/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx b/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx
index 6dba29c661..bd6bc79fb2 100644
--- a/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx
+++ b/superset-frontend/src/dashboard/components/FiltersBadge/index.tsx
@@ -18,7 +18,7 @@
  */
 import React, { useCallback, useEffect, useMemo, useState } from 'react';
 import { useDispatch, useSelector } from 'react-redux';
-import { uniqWith } from 'lodash';
+import uniqWith from 'lodash/uniqWith';
 import cx from 'classnames';
 import {
   DataMaskStateWithId,
diff --git a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx
index f1a3f59039..02389808ce 100644
--- a/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx
+++ b/superset-frontend/src/dashboard/components/Header/HeaderActionsDropdown/index.jsx
@@ -18,7 +18,7 @@
  */
 import React from 'react';
 import PropTypes from 'prop-types';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import { SupersetClient, t } from '@superset-ui/core';
 import { Menu } from 'src/components/Menu';
 import { URL_PARAMS } from 'src/constants';
diff --git a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
index 3a1421e380..e0f54ae909 100644
--- a/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
+++ b/superset-frontend/src/dashboard/components/PropertiesModal/index.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 import React, { useCallback, useEffect, useMemo, useState } from 'react';
-import { omit } from 'lodash';
+import omit from 'lodash/omit';
 import { Input } from 'src/components/Input';
 import { FormItem } from 'src/components/Form';
 import jsonStringify from 'json-stringify-pretty-compact';
diff --git a/superset-frontend/src/dashboard/components/SliceAdder.jsx b/superset-frontend/src/dashboard/components/SliceAdder.jsx
index 617fd32e8f..f8201aea83 100644
--- a/superset-frontend/src/dashboard/components/SliceAdder.jsx
+++ b/superset-frontend/src/dashboard/components/SliceAdder.jsx
@@ -42,7 +42,8 @@ import {
   NEW_COMPONENTS_SOURCE_ID,
 } from 'src/dashboard/util/constants';
 import { slicePropShape } from 'src/dashboard/util/propShapes';
-import { debounce, pickBy } from 'lodash';
+import debounce from 'lodash/debounce';
+import pickBy from 'lodash/pickBy';
 import Checkbox from 'src/components/Checkbox';
 import { InfoTooltipWithTrigger } from '@superset-ui/chart-controls';
 import AddSliceCard from './AddSliceCard';
diff --git a/superset-frontend/src/dashboard/components/dnd/handleHover.js b/superset-frontend/src/dashboard/components/dnd/handleHover.js
index e709b6e3e5..4c631bcbf0 100644
--- a/superset-frontend/src/dashboard/components/dnd/handleHover.js
+++ b/superset-frontend/src/dashboard/components/dnd/handleHover.js
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { throttle } from 'lodash';
+import throttle from 'lodash/throttle';
 import { DASHBOARD_ROOT_TYPE } from 'src/dashboard/util/componentTypes';
 import getDropPosition from 'src/dashboard/util/getDropPosition';
 import handleScroll from './handleScroll';
diff --git a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx
index a604653914..b1496f1712 100644
--- a/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx
+++ b/superset-frontend/src/dashboard/components/gridComponents/Chart.jsx
@@ -20,7 +20,8 @@ import cx from 'classnames';
 import React from 'react';
 import PropTypes from 'prop-types';
 import { styled, t, logging } from '@superset-ui/core';
-import { debounce, isEqual } from 'lodash';
+import debounce from 'lodash/debounce';
+import isEqual from 'lodash/isEqual';
 import { withRouter } from 'react-router-dom';
 
 import { exportChart, mountExploreUrl } from 'src/explore/exploreUtils';
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx
index f44a1a1df6..e2b4c9172e 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterValue.tsx
@@ -37,7 +37,8 @@ import {
   t,
 } from '@superset-ui/core';
 import { useDispatch, useSelector } from 'react-redux';
-import { isEqual, isEqualWith } from 'lodash';
+import isEqual from 'lodash/isEqual';
+import isEqualWith from 'lodash/isEqualWith';
 import { getChartDataRequest } from 'src/components/Chart/chartAction';
 import Loading from 'src/components/Loading';
 import BasicErrorAlert from 'src/components/ErrorMessage/BasicErrorAlert';
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/utils.ts
index 5e0e159d11..49f7f6ccff 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/utils.ts
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/utils.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { debounce } from 'lodash';
+import debounce from 'lodash/debounce';
 import { Dispatch } from 'react';
 import {
   setFocusedNativeFilter,
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
index f41f9bc3aa..d1a08d3435 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
@@ -39,7 +39,9 @@ import {
 import { useHistory } from 'react-router-dom';
 import { updateDataMask, clearDataMask } from 'src/dataMask/actions';
 import { useImmer } from 'use-immer';
-import { isEmpty, isEqual, debounce } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
+import isEqual from 'lodash/isEqual';
+import debounce from 'lodash/debounce';
 import { getInitialDataMask } from 'src/dataMask/reducer';
 import { URL_PARAMS } from 'src/constants';
 import { getUrlParam } from 'src/utils/urlUtils';
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
index e9c0f52cc6..e2e3e32232 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
@@ -38,7 +38,7 @@ import {
   SupersetApiError,
   t,
 } from '@superset-ui/core';
-import { isEqual } from 'lodash';
+import isEqual from 'lodash/isEqual';
 import React, {
   forwardRef,
   useCallback,
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts
index b7aa2cab39..dff1268bdf 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/utils.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { flatMapDeep } from 'lodash';
+import flatMapDeep from 'lodash/flatMapDeep';
 import { FormInstance } from 'src/components';
 import React from 'react';
 import { CustomControlItem, Dataset } from '@superset-ui/chart-controls';
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx
index a1e600ad20..2d661f95fe 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx
@@ -23,7 +23,11 @@ import React, {
   useState,
   useRef,
 } from 'react';
-import { uniq, isEqual, sortBy, debounce, isEmpty } from 'lodash';
+import uniq from 'lodash/uniq';
+import isEqual from 'lodash/isEqual';
+import sortBy from 'lodash/sortBy';
+import debounce from 'lodash/debounce';
+import isEmpty from 'lodash/isEmpty';
 import {
   Filter,
   FilterConfiguration,
diff --git a/superset-frontend/src/dashboard/reducers/datasources.ts b/superset-frontend/src/dashboard/reducers/datasources.ts
index 864641645e..e31fd60060 100644
--- a/superset-frontend/src/dashboard/reducers/datasources.ts
+++ b/superset-frontend/src/dashboard/reducers/datasources.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { keyBy } from 'lodash';
+import keyBy from 'lodash/keyBy';
 import { DatasourcesState } from 'src/dashboard/types';
 import {
   DatasourcesActionPayload,
diff --git a/superset-frontend/src/dashboard/util/activeDashboardFilters.js b/superset-frontend/src/dashboard/util/activeDashboardFilters.js
index ef6fd7f5e1..af681a66d8 100644
--- a/superset-frontend/src/dashboard/util/activeDashboardFilters.js
+++ b/superset-frontend/src/dashboard/util/activeDashboardFilters.js
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import { mapValues, flow, keyBy } from 'lodash/fp';
 import {
   getChartIdAndColumnFromFilterKey,
diff --git a/superset-frontend/src/dashboard/util/crossFilters.ts b/superset-frontend/src/dashboard/util/crossFilters.ts
index 8e1a706286..ac84faed11 100644
--- a/superset-frontend/src/dashboard/util/crossFilters.ts
+++ b/superset-frontend/src/dashboard/util/crossFilters.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { cloneDeep } from 'lodash';
+import cloneDeep from 'lodash/cloneDeep';
 import {
   Behavior,
   FeatureFlag,
diff --git a/superset-frontend/src/dashboard/util/getDashboardUrl.ts b/superset-frontend/src/dashboard/util/getDashboardUrl.ts
index bade710936..b773165b50 100644
--- a/superset-frontend/src/dashboard/util/getDashboardUrl.ts
+++ b/superset-frontend/src/dashboard/util/getDashboardUrl.ts
@@ -17,7 +17,7 @@
  * under the License.
  */
 import { JsonObject } from '@superset-ui/core';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import { URL_PARAMS } from 'src/constants';
 import { getUrlParam } from 'src/utils/urlUtils';
 import serializeActiveFilterValues from './serializeActiveFilterValues';
diff --git a/superset-frontend/src/dashboard/util/getFilterScopeFromNodesTree.js b/superset-frontend/src/dashboard/util/getFilterScopeFromNodesTree.js
index 1ecaa2b9ba..4efdb05181 100644
--- a/superset-frontend/src/dashboard/util/getFilterScopeFromNodesTree.js
+++ b/superset-frontend/src/dashboard/util/getFilterScopeFromNodesTree.js
@@ -17,7 +17,8 @@
  * under the License.
  */
 import { flow, keyBy, mapValues } from 'lodash/fp';
-import { flatMap, isEmpty } from 'lodash';
+import flatMap from 'lodash/flatMap';
+import isEmpty from 'lodash/isEmpty';
 
 import { CHART_TYPE, TAB_TYPE } from './componentTypes';
 import { getChartIdAndColumnFromFilterKey } from './getDashboardFilterKey';
diff --git a/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.js b/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.js
index aed133b1f3..44d3f9e457 100644
--- a/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.js
+++ b/superset-frontend/src/dashboard/util/getFilterScopeNodesTree.js
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import { t } from '@superset-ui/core';
 
 import { DASHBOARD_ROOT_ID } from './constants';
diff --git a/superset-frontend/src/dashboard/util/replaceUndefinedByNull.ts b/superset-frontend/src/dashboard/util/replaceUndefinedByNull.ts
index bcf5004b3e..70907a68ec 100644
--- a/superset-frontend/src/dashboard/util/replaceUndefinedByNull.ts
+++ b/superset-frontend/src/dashboard/util/replaceUndefinedByNull.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { cloneDeep } from 'lodash';
+import cloneDeep from 'lodash/cloneDeep';
 
 function processObject(object: Object) {
   const result = object;
diff --git a/superset-frontend/src/explore/actions/saveModalActions.js b/superset-frontend/src/explore/actions/saveModalActions.js
index 53c8952082..0cc948da9d 100644
--- a/superset-frontend/src/explore/actions/saveModalActions.js
+++ b/superset-frontend/src/explore/actions/saveModalActions.js
@@ -19,7 +19,7 @@
 import rison from 'rison';
 import { SupersetClient, t } from '@superset-ui/core';
 import { addSuccessToast } from 'src/components/MessageToasts/actions';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import { buildV1ChartDataPayload } from '../exploreUtils';
 import { Operators } from '../constants';
 
diff --git a/superset-frontend/src/explore/components/Control.tsx b/superset-frontend/src/explore/components/Control.tsx
index b7a1587dd8..c4fa7a84ca 100644
--- a/superset-frontend/src/explore/components/Control.tsx
+++ b/superset-frontend/src/explore/components/Control.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 import React, { ReactNode, useCallback, useState, useEffect } from 'react';
-import { isEqual } from 'lodash';
+import isEqual from 'lodash/isEqual';
 import {
   ControlType,
   ControlComponentProps as BaseControlComponentProps,
diff --git a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx
index 04f10511ef..6afc5aceb0 100644
--- a/superset-frontend/src/explore/components/ControlPanelsContainer.tsx
+++ b/superset-frontend/src/explore/components/ControlPanelsContainer.tsx
@@ -52,7 +52,7 @@ import {
 } from '@superset-ui/chart-controls';
 import { useSelector } from 'react-redux';
 import { rgba } from 'emotion-rgba';
-import { kebabCase } from 'lodash';
+import kebabCase from 'lodash/kebabCase';
 
 import Collapse from 'src/components/Collapse';
 import Tabs from 'src/components/Tabs';
diff --git a/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx b/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx
index c898988c90..693964dfcb 100644
--- a/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx
+++ b/superset-frontend/src/explore/components/DataTablesPane/components/DataTableControls.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 import React, { useMemo } from 'react';
-import { zip } from 'lodash';
+import zip from 'lodash/zip';
 import { css, GenericDataType, styled } from '@superset-ui/core';
 import {
   CopyToClipboardButton,
diff --git a/superset-frontend/src/explore/components/DatasourcePanel/index.tsx b/superset-frontend/src/explore/components/DatasourcePanel/index.tsx
index 99f6b48b89..8adbd6ed1b 100644
--- a/superset-frontend/src/explore/components/DatasourcePanel/index.tsx
+++ b/superset-frontend/src/explore/components/DatasourcePanel/index.tsx
@@ -28,7 +28,8 @@ import {
 
 import { ControlConfig } from '@superset-ui/chart-controls';
 
-import { debounce, isArray } from 'lodash';
+import debounce from 'lodash/debounce';
+import isArray from 'lodash/isArray';
 import { matchSorter, rankings } from 'match-sorter';
 import Collapse from 'src/components/Collapse';
 import Alert from 'src/components/Alert';
diff --git a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx
index 0550ba2b29..c52c382d2d 100644
--- a/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx
+++ b/superset-frontend/src/explore/components/ExploreViewContainer/index.jsx
@@ -31,7 +31,8 @@ import {
   useComponentDidMount,
   usePrevious,
 } from '@superset-ui/core';
-import { debounce, pick } from 'lodash';
+import debounce from 'lodash/debounce';
+import pick from 'lodash/pick';
 import { Resizable } from 're-resizable';
 import { usePluginContext } from 'src/components/DynamicPlugins';
 import { Global } from '@emotion/react';
diff --git a/superset-frontend/src/explore/components/controls/BoundsControl.tsx b/superset-frontend/src/explore/components/controls/BoundsControl.tsx
index 97fd26e283..755683a27c 100644
--- a/superset-frontend/src/explore/components/controls/BoundsControl.tsx
+++ b/superset-frontend/src/explore/components/controls/BoundsControl.tsx
@@ -19,7 +19,7 @@
 import React, { useEffect, useRef, useState } from 'react';
 import { InputNumber } from 'src/components/Input';
 import { t, styled } from '@superset-ui/core';
-import { debounce } from 'lodash';
+import debounce from 'lodash/debounce';
 import ControlHeader from 'src/explore/components/ControlHeader';
 
 type ValueType = (number | null)[];
diff --git a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx
index 2faa08d8ee..8ae851dea9 100644
--- a/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx
+++ b/superset-frontend/src/explore/components/controls/ColorSchemeControl/index.tsx
@@ -18,7 +18,7 @@
  */
 import React, { useMemo } from 'react';
 import { ColorScheme, SequentialScheme, styled, t } from '@superset-ui/core';
-import { isFunction } from 'lodash';
+import isFunction from 'lodash/isFunction';
 import { Select } from 'src/components';
 import ControlHeader from 'src/explore/components/ControlHeader';
 import { Tooltip } from 'src/components/Tooltip';
diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx
index 4f4f739b85..257e405b23 100644
--- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx
+++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ControlForm/index.tsx
@@ -23,7 +23,7 @@ import {
   JsonValue,
   useTheme,
 } from '@superset-ui/core';
-import { debounce } from 'lodash';
+import debounce from 'lodash/debounce';
 import { ControlFormItemNode } from './ControlFormItem';
 
 export * from './ControlFormItem';
diff --git a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
index d72fe5f9e0..9b3c6e2591 100644
--- a/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
+++ b/superset-frontend/src/explore/components/controls/DatasourceControl/index.jsx
@@ -51,7 +51,7 @@ import ViewQueryModalFooter from 'src/explore/components/controls/ViewQueryModal
 import ViewQuery from 'src/explore/components/controls/ViewQuery';
 import { SaveDatasetModal } from 'src/SqlLab/components/SaveDatasetModal';
 import { safeStringify } from 'src/utils/safeStringify';
-import { isString } from 'lodash';
+import isString from 'lodash/isString';
 import { Link } from 'react-router-dom';
 
 const propTypes = {
diff --git a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx
index a75f064dae..a08065b72e 100644
--- a/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx
+++ b/superset-frontend/src/explore/components/controls/DateFilterControl/components/CustomFrame.tsx
@@ -20,7 +20,7 @@ import React from 'react';
 import { useSelector } from 'react-redux';
 import { t } from '@superset-ui/core';
 import { Moment } from 'moment';
-import { isInteger } from 'lodash';
+import isInteger from 'lodash/isInteger';
 // @ts-ignore
 import { locales } from 'antd/dist/antd-with-locales';
 import { Col, Row } from 'src/components';
diff --git a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
index ef6d394868..619f0daa1e 100644
--- a/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
+++ b/superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
@@ -25,7 +25,7 @@ import {
   isAdhocColumn,
 } from '@superset-ui/core';
 import { ColumnMeta, isColumnMeta } from '@superset-ui/chart-controls';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import DndSelectLabel from 'src/explore/components/controls/DndColumnSelectControl/DndSelectLabel';
 import OptionWrapper from 'src/explore/components/controls/DndColumnSelectControl/OptionWrapper';
 import { OptionSelector } from 'src/explore/components/controls/DndColumnSelectControl/utils';
diff --git a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts
index 8440b1416d..dca549191e 100644
--- a/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts
+++ b/superset-frontend/src/explore/components/controls/FilterControl/AdhocFilterEditPopoverSimpleTabContent/useAdvancedDataTypes.ts
@@ -18,7 +18,7 @@
  */
 import { useCallback, useState } from 'react';
 import { ensureIsArray, SupersetClient, t } from '@superset-ui/core';
-import { debounce } from 'lodash';
+import debounce from 'lodash/debounce';
 import rison from 'rison';
 import { AdvancedDataTypesState, Props } from './index';
 
diff --git a/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.jsx b/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.jsx
index 62005910cb..60fb573957 100644
--- a/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.jsx
+++ b/superset-frontend/src/explore/components/controls/MetricControl/MetricsControl.jsx
@@ -19,7 +19,7 @@
 import React, { useCallback, useEffect, useMemo, useState } from 'react';
 import PropTypes from 'prop-types';
 import { ensureIsArray, t, useTheme, usePrevious } from '@superset-ui/core';
-import { isEqual } from 'lodash';
+import isEqual from 'lodash/isEqual';
 import ControlHeader from 'src/explore/components/ControlHeader';
 import Icons from 'src/components/Icons';
 import {
diff --git a/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx b/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx
index 27b0fd371e..05e2389c51 100644
--- a/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx
+++ b/superset-frontend/src/explore/components/controls/ViewQueryModalFooter.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 import React from 'react';
-import { isObject } from 'lodash';
+import isObject from 'lodash/isObject';
 import { t, SupersetClient } from '@superset-ui/core';
 import Button from 'src/components/Button';
 import { useHistory } from 'react-router-dom';
diff --git a/superset-frontend/src/explore/controlUtils/standardizedFormData.ts b/superset-frontend/src/explore/controlUtils/standardizedFormData.ts
index 082ff6c91d..f0b6d3e345 100644
--- a/superset-frontend/src/explore/controlUtils/standardizedFormData.ts
+++ b/superset-frontend/src/explore/controlUtils/standardizedFormData.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { omit } from 'lodash';
+import omit from 'lodash/omit';
 import {
   ensureIsArray,
   getChartControlPanelRegistry,
diff --git a/superset-frontend/src/explore/exploreUtils/formData.ts b/superset-frontend/src/explore/exploreUtils/formData.ts
index 36de6640a5..5965276590 100644
--- a/superset-frontend/src/explore/exploreUtils/formData.ts
+++ b/superset-frontend/src/explore/exploreUtils/formData.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { omit } from 'lodash';
+import omit from 'lodash/omit';
 import { SupersetClient, JsonObject } from '@superset-ui/core';
 
 type Payload = {
diff --git a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx
index 7b52eab26c..02a4e35e8e 100644
--- a/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx
+++ b/superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx
@@ -17,7 +17,7 @@
  * under the License.
  */
 import React from 'react';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import { SupersetTheme, t } from '@superset-ui/core';
 import { AntdSwitch } from 'src/components';
 import InfoTooltip from 'src/components/InfoTooltip';
diff --git a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx
index a3cc38ca37..404c387c9c 100644
--- a/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx
+++ b/superset-frontend/src/features/databases/DatabaseModal/SSHTunnelSwitch.tsx
@@ -20,7 +20,7 @@ import React from 'react';
 import { t, SupersetTheme, SwitchProps } from '@superset-ui/core';
 import { AntdSwitch } from 'src/components';
 import InfoTooltip from 'src/components/InfoTooltip';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import { ActionType } from '.';
 import { infoTooltip, toggleStyle } from './styles';
 
diff --git a/superset-frontend/src/features/databases/DatabaseModal/index.tsx b/superset-frontend/src/features/databases/DatabaseModal/index.tsx
index 18c93f2bf4..fdcc41f864 100644
--- a/superset-frontend/src/features/databases/DatabaseModal/index.tsx
+++ b/superset-frontend/src/features/databases/DatabaseModal/index.tsx
@@ -57,7 +57,8 @@ import {
 } from 'src/views/CRUD/hooks';
 import { useCommonConf } from 'src/features/databases/state';
 import Loading from 'src/components/Loading';
-import { isEmpty, pick } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
+import pick from 'lodash/pick';
 import {
   DatabaseObject,
   DatabaseForm,
diff --git a/superset-frontend/src/features/home/ChartTable.tsx b/superset-frontend/src/features/home/ChartTable.tsx
index c84a0c81c2..606e9211b9 100644
--- a/superset-frontend/src/features/home/ChartTable.tsx
+++ b/superset-frontend/src/features/home/ChartTable.tsx
@@ -18,7 +18,7 @@
  */
 import React, { useEffect, useMemo, useState } from 'react';
 import { t } from '@superset-ui/core';
-import { filter } from 'lodash';
+import filter from 'lodash/filter';
 import {
   useChartEditModal,
   useFavoriteStatus,
diff --git a/superset-frontend/src/features/home/DashboardTable.tsx b/superset-frontend/src/features/home/DashboardTable.tsx
index 36ea29e955..26ee9381c3 100644
--- a/superset-frontend/src/features/home/DashboardTable.tsx
+++ b/superset-frontend/src/features/home/DashboardTable.tsx
@@ -18,7 +18,7 @@
  */
 import React, { useEffect, useMemo, useState } from 'react';
 import { SupersetClient, t } from '@superset-ui/core';
-import { filter } from 'lodash';
+import filter from 'lodash/filter';
 import { useFavoriteStatus, useListViewResource } from 'src/views/CRUD/hooks';
 import { Dashboard, DashboardTableProps, TableTab } from 'src/views/CRUD/types';
 import handleResourceExport from 'src/utils/export';
diff --git a/superset-frontend/src/features/home/Menu.tsx b/superset-frontend/src/features/home/Menu.tsx
index 67b72fc515..87561c375c 100644
--- a/superset-frontend/src/features/home/Menu.tsx
+++ b/superset-frontend/src/features/home/Menu.tsx
@@ -18,7 +18,7 @@
  */
 import React, { useState, useEffect } from 'react';
 import { styled, css, useTheme, SupersetTheme } from '@superset-ui/core';
-import { debounce } from 'lodash';
+import debounce from 'lodash/debounce';
 import { Global } from '@emotion/react';
 import { getUrlParam } from 'src/utils/urlUtils';
 import { Row, Col, Grid } from 'src/components';
diff --git a/superset-frontend/src/features/home/RightMenu.tsx b/superset-frontend/src/features/home/RightMenu.tsx
index 20e1d525b3..eeee35f556 100644
--- a/superset-frontend/src/features/home/RightMenu.tsx
+++ b/superset-frontend/src/features/home/RightMenu.tsx
@@ -21,7 +21,7 @@ import rison from 'rison';
 import { useSelector } from 'react-redux';
 import { Link } from 'react-router-dom';
 import { useQueryParams, BooleanParam } from 'use-query-params';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 
 import {
   t,
diff --git a/superset-frontend/src/features/home/SubMenu.tsx b/superset-frontend/src/features/home/SubMenu.tsx
index f03396de8d..67d3b16a81 100644
--- a/superset-frontend/src/features/home/SubMenu.tsx
+++ b/superset-frontend/src/features/home/SubMenu.tsx
@@ -21,7 +21,7 @@ import { Link, useHistory } from 'react-router-dom';
 import { styled, SupersetTheme, css, t } from '@superset-ui/core';
 import cx from 'classnames';
 import { Tooltip } from 'src/components/Tooltip';
-import { debounce } from 'lodash';
+import debounce from 'lodash/debounce';
 import { Row } from 'src/components';
 import { Menu, MenuMode, MainNav as DropdownMenu } from 'src/components/Menu';
 import Button, { OnClickHandler } from 'src/components/Button';
diff --git a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx
index 84d19bae69..40d306c0ae 100644
--- a/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx
+++ b/superset-frontend/src/features/reports/ReportModal/HeaderReportDropdown/index.tsx
@@ -18,7 +18,7 @@
  */
 import React, { useState, useEffect } from 'react';
 import { useSelector, useDispatch } from 'react-redux';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import {
   t,
   SupersetTheme,
diff --git a/superset-frontend/src/features/reports/ReportModal/actions.js b/superset-frontend/src/features/reports/ReportModal/actions.js
index 45edc90129..e60d0893ed 100644
--- a/superset-frontend/src/features/reports/ReportModal/actions.js
+++ b/superset-frontend/src/features/reports/ReportModal/actions.js
@@ -23,7 +23,7 @@ import {
   addDangerToast,
   addSuccessToast,
 } from 'src/components/MessageToasts/actions';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 
 export const SET_REPORT = 'SET_REPORT';
 export function setReport(report, resourceId, creationMethod, filterField) {
diff --git a/superset-frontend/src/features/reports/ReportModal/reducer.js b/superset-frontend/src/features/reports/ReportModal/reducer.js
index 0c53dbc600..95877cfe6b 100644
--- a/superset-frontend/src/features/reports/ReportModal/reducer.js
+++ b/superset-frontend/src/features/reports/ReportModal/reducer.js
@@ -18,7 +18,7 @@
  */
 /* eslint-disable camelcase */
 // eslint-disable-next-line import/no-extraneous-dependencies
-import { omit } from 'lodash';
+import omit from 'lodash/omit';
 import { SET_REPORT, ADD_REPORT, EDIT_REPORT, DELETE_REPORT } from './actions';
 
 export default function reportsReducer(state = {}, action) {
diff --git a/superset-frontend/src/hooks/apiResources/sqlEditorTabs.ts b/superset-frontend/src/hooks/apiResources/sqlEditorTabs.ts
index 71e0cf2936..e4ae1adf7d 100644
--- a/superset-frontend/src/hooks/apiResources/sqlEditorTabs.ts
+++ b/superset-frontend/src/hooks/apiResources/sqlEditorTabs.ts
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { pickBy } from 'lodash';
+import pickBy from 'lodash/pickBy';
 import { QueryEditor, LatestQueryEditorVersion } from 'src/SqlLab/types';
 import { api, JsonResponse } from './queryApi';
 
diff --git a/superset-frontend/src/pages/ChartList/index.tsx b/superset-frontend/src/pages/ChartList/index.tsx
index bfd945ea18..052b5ff13a 100644
--- a/superset-frontend/src/pages/ChartList/index.tsx
+++ b/superset-frontend/src/pages/ChartList/index.tsx
@@ -28,7 +28,7 @@ import {
 } from '@superset-ui/core';
 import React, { useState, useMemo, useCallback } from 'react';
 import rison from 'rison';
-import { uniqBy } from 'lodash';
+import uniqBy from 'lodash/uniqBy';
 import { useSelector } from 'react-redux';
 import {
   createErrorHandler,
diff --git a/superset-frontend/src/pages/Home/index.tsx b/superset-frontend/src/pages/Home/index.tsx
index c61d15e2ab..4e3a335dd5 100644
--- a/superset-frontend/src/pages/Home/index.tsx
+++ b/superset-frontend/src/pages/Home/index.tsx
@@ -28,7 +28,7 @@ import {
 import rison from 'rison';
 import Collapse from 'src/components/Collapse';
 import { User } from 'src/types/bootstrapTypes';
-import { reject } from 'lodash';
+import reject from 'lodash/reject';
 import {
   dangerouslyGetItemDoNotUse,
   dangerouslySetItemDoNotUse,
diff --git a/superset-frontend/src/pages/SqlLab/SqlLab.test.tsx b/superset-frontend/src/pages/SqlLab/SqlLab.test.tsx
index 0eec7156d1..399db18295 100644
--- a/superset-frontend/src/pages/SqlLab/SqlLab.test.tsx
+++ b/superset-frontend/src/pages/SqlLab/SqlLab.test.tsx
@@ -18,7 +18,7 @@
  */
 import fetchMock from 'fetch-mock';
 import React from 'react';
-import { omit } from 'lodash';
+import omit from 'lodash/omit';
 import {
   render,
   act,
diff --git a/superset-frontend/src/preamble.ts b/superset-frontend/src/preamble.ts
index 52fa959905..b122d6242b 100644
--- a/superset-frontend/src/preamble.ts
+++ b/superset-frontend/src/preamble.ts
@@ -26,7 +26,7 @@ import {
   supersetTheme,
   initFeatureFlags,
 } from '@superset-ui/core';
-import { merge } from 'lodash';
+import merge from 'lodash/merge';
 import setupClient from './setup/setupClient';
 import setupColors from './setup/setupColors';
 import setupFormatters from './setup/setupFormatters';
diff --git a/superset-frontend/src/reduxUtils.ts b/superset-frontend/src/reduxUtils.ts
index 8e744b48dc..120c9fcac3 100644
--- a/superset-frontend/src/reduxUtils.ts
+++ b/superset-frontend/src/reduxUtils.ts
@@ -19,14 +19,12 @@
 import shortid from 'shortid';
 import { compose } from 'redux';
 import persistState, { StorageAdapter } from 'redux-localstorage';
-import {
-  isEqual,
-  omitBy,
-  omit,
-  isUndefined,
-  isNull,
-  isEqualWith,
-} from 'lodash';
+import isEqual from 'lodash/isEqual';
+import omitBy from 'lodash/omitBy';
+import omit from 'lodash/omit';
+import isUndefined from 'lodash/isUndefined';
+import isNull from 'lodash/isNull';
+import isEqualWith from 'lodash/isEqualWith';
 import { ensureIsArray } from '@superset-ui/core';
 
 export function addToObject(
diff --git a/superset-frontend/src/types/bootstrapTypes.ts b/superset-frontend/src/types/bootstrapTypes.ts
index 80570f5d22..275033f292 100644
--- a/superset-frontend/src/types/bootstrapTypes.ts
+++ b/superset-frontend/src/types/bootstrapTypes.ts
@@ -7,7 +7,7 @@ import {
   SequentialSchemeConfig,
 } from '@superset-ui/core';
 import { FormatLocaleDefinition } from 'd3-format';
-import { isPlainObject } from 'lodash';
+import isPlainObject from 'lodash/isPlainObject';
 import { Languages } from 'src/features/home/LanguagePicker';
 import { FlashMessage } from '../components/FlashProvider';
 
diff --git a/superset-frontend/src/utils/DebouncedMessageQueue.js b/superset-frontend/src/utils/DebouncedMessageQueue.js
index 6fd6c5b778..07d2789037 100644
--- a/superset-frontend/src/utils/DebouncedMessageQueue.js
+++ b/superset-frontend/src/utils/DebouncedMessageQueue.js
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-import { debounce } from 'lodash';
+import debounce from 'lodash/debounce';
 
 class DebouncedMessageQueue {
   constructor({
diff --git a/superset-frontend/src/utils/urlUtils.ts b/superset-frontend/src/utils/urlUtils.ts
index 91c0ae801c..7c4c75ad2a 100644
--- a/superset-frontend/src/utils/urlUtils.ts
+++ b/superset-frontend/src/utils/urlUtils.ts
@@ -23,7 +23,7 @@ import {
   SupersetClient,
 } from '@superset-ui/core';
 import rison from 'rison';
-import { isEmpty } from 'lodash';
+import isEmpty from 'lodash/isEmpty';
 import {
   RESERVED_CHART_URL_PARAMS,
   RESERVED_DASHBOARD_URL_PARAMS,
diff --git a/superset-frontend/src/views/CRUD/utils.tsx b/superset-frontend/src/views/CRUD/utils.tsx
index 514a39964e..67a255b1ec 100644
--- a/superset-frontend/src/views/CRUD/utils.tsx
+++ b/superset-frontend/src/views/CRUD/utils.tsx
@@ -27,7 +27,7 @@ import {
   t,
 } from '@superset-ui/core';
 import Chart from 'src/types/Chart';
-import { intersection } from 'lodash';
+import intersection from 'lodash/intersection';
 import rison from 'rison';
 import { getClientErrorObject } from 'src/utils/getClientErrorObject';
 import { FetchDataConfig, FilterValue } from 'src/components/ListView';


(superset) 01/02: first wave...

Posted by ru...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch no-full-lodash
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 81f4fd6348509da82b9412fe8d19d7f21399df3a
Author: Evan Rusackas <ev...@rusackas.com>
AuthorDate: Sun Jan 21 21:09:28 2024 -0700

    first wave...
---
 superset-frontend/.eslintrc.js                     |  2 ++
 superset-frontend/package-lock.json                | 25 ++++++++++++++++++++++
 superset-frontend/package.json                     |  1 +
 .../plugin-chart-echarts/src/utils/treeBuilder.ts  |  8 +++----
 superset-frontend/src/components/Icons/index.tsx   |  4 ++--
 superset-websocket/.eslintrc.js                    |  2 ++
 superset-websocket/package-lock.json               | 25 ++++++++++++++++++++++
 superset-websocket/package.json                    |  1 +
 superset-websocket/src/config.ts                   |  4 ++--
 9 files changed, 64 insertions(+), 8 deletions(-)

diff --git a/superset-frontend/.eslintrc.js b/superset-frontend/.eslintrc.js
index 6eebb0d2df..aac891a205 100644
--- a/superset-frontend/.eslintrc.js
+++ b/superset-frontend/.eslintrc.js
@@ -71,6 +71,7 @@ module.exports = {
     'prettier',
     'react',
     'file-progress',
+    'lodash',
     'theme-colors',
     'translation-vars',
   ],
@@ -241,6 +242,7 @@ module.exports = {
     'jsx-a11y/anchor-is-valid': 1,
     'jsx-a11y/click-events-have-key-events': 0, // re-enable up for discussion
     'jsx-a11y/mouse-events-have-key-events': 0, // re-enable up for discussion
+    'lodash/import-scope': [2, 'method'],
     'new-cap': 0,
     'no-bitwise': 0,
     'no-continue': 0,
diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json
index 7b8073e986..a620eecc61 100644
--- a/superset-frontend/package-lock.json
+++ b/superset-frontend/package-lock.json
@@ -234,6 +234,7 @@
         "eslint-plugin-jest": "^24.7.0",
         "eslint-plugin-jest-dom": "^3.6.5",
         "eslint-plugin-jsx-a11y": "^6.4.1",
+        "eslint-plugin-lodash": "^7.4.0",
         "eslint-plugin-no-only-tests": "^2.4.0",
         "eslint-plugin-prettier": "^4.0.0",
         "eslint-plugin-react": "^7.22.0",
@@ -31043,6 +31044,21 @@
       "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==",
       "dev": true
     },
+    "node_modules/eslint-plugin-lodash": {
+      "version": "7.4.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-lodash/-/eslint-plugin-lodash-7.4.0.tgz",
+      "integrity": "sha512-Tl83UwVXqe1OVeBRKUeWcfg6/pCW1GTRObbdnbEJgYwjxp5Q92MEWQaH9+dmzbRt6kvYU1Mp893E79nJiCSM8A==",
+      "dev": true,
+      "dependencies": {
+        "lodash": "^4.17.21"
+      },
+      "engines": {
+        "node": ">=10"
+      },
+      "peerDependencies": {
+        "eslint": ">=2"
+      }
+    },
     "node_modules/eslint-plugin-no-only-tests": {
       "version": "2.4.0",
       "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.4.0.tgz",
@@ -88797,6 +88813,15 @@
         }
       }
     },
+    "eslint-plugin-lodash": {
+      "version": "7.4.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-lodash/-/eslint-plugin-lodash-7.4.0.tgz",
+      "integrity": "sha512-Tl83UwVXqe1OVeBRKUeWcfg6/pCW1GTRObbdnbEJgYwjxp5Q92MEWQaH9+dmzbRt6kvYU1Mp893E79nJiCSM8A==",
+      "dev": true,
+      "requires": {
+        "lodash": "^4.17.21"
+      }
+    },
     "eslint-plugin-no-only-tests": {
       "version": "2.4.0",
       "resolved": "https://registry.npmjs.org/eslint-plugin-no-only-tests/-/eslint-plugin-no-only-tests-2.4.0.tgz",
diff --git a/superset-frontend/package.json b/superset-frontend/package.json
index 8abd9dd955..f7b6550b86 100644
--- a/superset-frontend/package.json
+++ b/superset-frontend/package.json
@@ -300,6 +300,7 @@
     "eslint-plugin-jest": "^24.7.0",
     "eslint-plugin-jest-dom": "^3.6.5",
     "eslint-plugin-jsx-a11y": "^6.4.1",
+    "eslint-plugin-lodash": "^7.4.0",
     "eslint-plugin-no-only-tests": "^2.4.0",
     "eslint-plugin-prettier": "^4.0.0",
     "eslint-plugin-react": "^7.22.0",
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/utils/treeBuilder.ts b/superset-frontend/plugins/plugin-chart-echarts/src/utils/treeBuilder.ts
index 97916997d4..cda78da93a 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/utils/treeBuilder.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/utils/treeBuilder.ts
@@ -17,7 +17,7 @@
  * under the License.
  */
 import { DataRecord, DataRecordValue } from '@superset-ui/core';
-import _ from 'lodash';
+import { groupBy as _groupBy, isNumber, transform } from 'lodash';
 
 export type TreeNode = {
   name: DataRecordValue;
@@ -28,7 +28,7 @@ export type TreeNode = {
 };
 
 function getMetricValue(datum: DataRecord, metric: string) {
-  return _.isNumber(datum[metric]) ? (datum[metric] as number) : 0;
+  return isNumber(datum[metric]) ? (datum[metric] as number) : 0;
 }
 
 export function treeBuilder(
@@ -38,8 +38,8 @@ export function treeBuilder(
   secondaryMetric?: string,
 ): TreeNode[] {
   const [curGroupBy, ...restGroupby] = groupBy;
-  const curData = _.groupBy(data, curGroupBy);
-  return _.transform(
+  const curData = _groupBy(data, curGroupBy);
+  return transform(
     curData,
     (result, value, key) => {
       const name = curData[key][0][curGroupBy]!;
diff --git a/superset-frontend/src/components/Icons/index.tsx b/superset-frontend/src/components/Icons/index.tsx
index 29ccb1dd36..fcf03df25b 100644
--- a/superset-frontend/src/components/Icons/index.tsx
+++ b/superset-frontend/src/components/Icons/index.tsx
@@ -18,7 +18,7 @@
  */
 
 import React from 'react';
-import _ from 'lodash';
+import { startCase } from 'lodash';
 import AntdEnhancedIcons from './AntdEnhanced';
 import Icon from './Icon';
 import IconType from './IconType';
@@ -168,7 +168,7 @@ const IconFileNames = [
 
 const iconOverrides: Record<string, React.FC<IconType>> = {};
 IconFileNames.forEach(fileName => {
-  const keyName = _.startCase(fileName).replace(/ /g, '');
+  const keyName = startCase(fileName).replace(/ /g, '');
   iconOverrides[keyName] = (props: IconType) => (
     <Icon fileName={fileName} {...props} />
   );
diff --git a/superset-websocket/.eslintrc.js b/superset-websocket/.eslintrc.js
index f1aaa4512c..6476fd010e 100644
--- a/superset-websocket/.eslintrc.js
+++ b/superset-websocket/.eslintrc.js
@@ -25,6 +25,7 @@ module.exports = {
   },
   plugins: [
     '@typescript-eslint',
+    'lodash',
   ],
   extends: [
     'eslint:recommended',
@@ -32,6 +33,7 @@ module.exports = {
     'prettier',
   ],
   rules: {
+    "lodash/import-scope": [2, "method"],
     "@typescript-eslint/explicit-module-boundary-types": 0,
     "@typescript-eslint/no-var-requires": 0,
   },
diff --git a/superset-websocket/package-lock.json b/superset-websocket/package-lock.json
index 3266cd9deb..68d2c5f085 100644
--- a/superset-websocket/package-lock.json
+++ b/superset-websocket/package-lock.json
@@ -31,6 +31,7 @@
         "@typescript-eslint/parser": "^5.62.0",
         "eslint": "^8.56.0",
         "eslint-config-prettier": "^9.1.0",
+        "eslint-plugin-lodash": "^7.4.0",
         "jest": "^27.3.1",
         "prettier": "^3.0.3",
         "ts-jest": "^27.0.7",
@@ -2670,6 +2671,21 @@
         "eslint": ">=7.0.0"
       }
     },
+    "node_modules/eslint-plugin-lodash": {
+      "version": "7.4.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-lodash/-/eslint-plugin-lodash-7.4.0.tgz",
+      "integrity": "sha512-Tl83UwVXqe1OVeBRKUeWcfg6/pCW1GTRObbdnbEJgYwjxp5Q92MEWQaH9+dmzbRt6kvYU1Mp893E79nJiCSM8A==",
+      "dev": true,
+      "dependencies": {
+        "lodash": "^4.17.21"
+      },
+      "engines": {
+        "node": ">=10"
+      },
+      "peerDependencies": {
+        "eslint": ">=2"
+      }
+    },
     "node_modules/eslint-scope": {
       "version": "5.1.1",
       "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
@@ -8347,6 +8363,15 @@
       "dev": true,
       "requires": {}
     },
+    "eslint-plugin-lodash": {
+      "version": "7.4.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-lodash/-/eslint-plugin-lodash-7.4.0.tgz",
+      "integrity": "sha512-Tl83UwVXqe1OVeBRKUeWcfg6/pCW1GTRObbdnbEJgYwjxp5Q92MEWQaH9+dmzbRt6kvYU1Mp893E79nJiCSM8A==",
+      "dev": true,
+      "requires": {
+        "lodash": "^4.17.21"
+      }
+    },
     "eslint-scope": {
       "version": "5.1.1",
       "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
diff --git a/superset-websocket/package.json b/superset-websocket/package.json
index 07ada42282..a215e02a50 100644
--- a/superset-websocket/package.json
+++ b/superset-websocket/package.json
@@ -38,6 +38,7 @@
     "@typescript-eslint/parser": "^5.62.0",
     "eslint": "^8.56.0",
     "eslint-config-prettier": "^9.1.0",
+    "eslint-plugin-lodash": "^7.4.0",
     "jest": "^27.3.1",
     "prettier": "^3.0.3",
     "ts-jest": "^27.0.7",
diff --git a/superset-websocket/src/config.ts b/superset-websocket/src/config.ts
index 7c25048928..7bdb4853bf 100644
--- a/superset-websocket/src/config.ts
+++ b/superset-websocket/src/config.ts
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-import * as _ from 'lodash';
+import _merge from 'lodash/merge';
 
 export interface RedisConfig {
   port: number;
@@ -142,6 +142,6 @@ function applyEnvOverrides(config: ConfigType): ConfigType {
 }
 
 export function buildConfig(): ConfigType {
-  const config = _.merge(defaultConfig(), configFromFile());
+  const config = _merge(defaultConfig(), configFromFile());
   return applyEnvOverrides(config);
 }