diff --git a/.eslintrc.js b/.eslintrc.js index f5813fb00ab..6cce1c492d6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -66,6 +66,13 @@ module.exports = { "react/self-closing-comp": "error", "react/jsx-no-undef": ["error", { allowGlobals: true }], + "no-restricted-imports": [ + "error", + { + name: "lodash", + message: "Please use 'lodash-es' instead." + } + ], /*Possible Errors */ "no-console": "off", "no-inner-declarations": [1, "functions"], diff --git a/lib/Map/Vector/Protomaps/ProtomapsGeojsonSource.ts b/lib/Map/Vector/Protomaps/ProtomapsGeojsonSource.ts index ae6f43ed325..b69b33902b0 100644 --- a/lib/Map/Vector/Protomaps/ProtomapsGeojsonSource.ts +++ b/lib/Map/Vector/Protomaps/ProtomapsGeojsonSource.ts @@ -4,7 +4,7 @@ import booleanIntersects from "@turf/boolean-intersects"; import circle from "@turf/circle"; import { Feature, featureCollection } from "@turf/helpers"; import geojsonvt from "geojson-vt"; -import { cloneDeep } from "lodash"; +import { cloneDeep } from "lodash-es"; import { makeObservable, observable, runInAction } from "mobx"; import { Bbox, diff --git a/lib/Models/Catalog/CatalogItems/ApiTableCatalogItem.ts b/lib/Models/Catalog/CatalogItems/ApiTableCatalogItem.ts index ddf310d99bd..1476c391123 100644 --- a/lib/Models/Catalog/CatalogItems/ApiTableCatalogItem.ts +++ b/lib/Models/Catalog/CatalogItems/ApiTableCatalogItem.ts @@ -1,5 +1,5 @@ import dateFormat from "dateformat"; -import { get as _get, map as _map } from "lodash"; +import { get as _get, map as _map } from "lodash-es"; import { computed, observable, runInAction, makeObservable } from "mobx"; import URI from "urijs"; import isDefined from "../../../Core/isDefined"; diff --git a/lib/Models/Catalog/CatalogItems/GeoJsonCatalogItem.ts b/lib/Models/Catalog/CatalogItems/GeoJsonCatalogItem.ts index caadf8f8bf4..752f9552181 100644 --- a/lib/Models/Catalog/CatalogItems/GeoJsonCatalogItem.ts +++ b/lib/Models/Catalog/CatalogItems/GeoJsonCatalogItem.ts @@ -1,6 +1,6 @@ import { featureCollection, FeatureCollection } from "@turf/helpers"; import i18next from "i18next"; -import { get as _get, set as _set } from "lodash"; +import { get as _get, set as _set } from "lodash-es"; import { computed, makeObservable, toJS } from "mobx"; import filterOutUndefined from "../../../Core/filterOutUndefined"; import { diff --git a/lib/ReactViews/Workbench/Controls/ViewingControls.tsx b/lib/ReactViews/Workbench/Controls/ViewingControls.tsx index 05cf56d496a..e3899e28603 100644 --- a/lib/ReactViews/Workbench/Controls/ViewingControls.tsx +++ b/lib/ReactViews/Workbench/Controls/ViewingControls.tsx @@ -1,4 +1,4 @@ -import { sortBy, uniqBy } from "lodash"; +import { sortBy, uniqBy } from "lodash-es"; import { action, computed, runInAction, makeObservable } from "mobx"; import { observer } from "mobx-react"; import React from "react";