help wantedmaintenance
Repository metrics
- Stars
- (3,624 stars)
- PR merge metrics
- (PR metrics pending)
Description
I have noticed that lodash library is used in 3 different ways within Kiali:
import _ from 'lodash';
import { isArray } from 'lodash';
import _isEqual from 'lodash/isEqual';
For best practices and maintenance, the code should be consistent and use always same pattern.
As we are using lodas-es that allows tree shaking (https://til.hashrocket.com/posts/dnzttruljf-prefer-lodash-es-when-using-webpack), IMO the best approach is to import just the lodash modules that we are going to use in the file:
import { isArray } from 'lodash-es';