ESLint pluginRulesprefer-no-lodash-clone-deepOn this pageprefer-no-lodash-clone-deepDetects all usages of cloneDeep from Lodash.RationaleLodash's cloneDeep is a very costly operation and should be used only when it is really needed.Examples❌ Examples of incorrect code for this ruleimport { cloneDeep } from 'lodash-es';const clone = cloneDeep(orig);✅ Examples of correct code for this rule// see: https://developer.mozilla.org/en-US/docs/Web/API/structuredCloneconst clone = structuredClone(original);type T = { prop: string; arr: { x: number; y: number }[];};const shallowClone: T = { ...orig };const deepClone: T = { ...orig, arr: orig.arr.map((item) => ({ ...item })) };import { cloneDeep } from './utils';const clone = cloneDeep(orig);