Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 1.19 KB

no-direct-lodash-import.md

File metadata and controls

13 lines (9 loc) · 1.19 KB

lodash-imports/no-direct-lodash-import

🔧 This rule is automatically fixable by the --fix CLI option.

For example:

Import Result
import { isEqual as equal, get, memoize } from 'lodash'; import equal from 'lodash/isEqual';
import get from 'lodash/get';
import memoize from 'lodash/memoize';
import _ from 'lodash';

_.isEqual('a', 'b');
_.get({}, 'a.b');
import isEqual from 'lodash/isEqual';
import get from 'lodash/get';

isEqual('a', 'b');
get({}, 'a.b');
import isEqual from 'lodash.isequal'; import isEqual from 'lodash/isEqual';