Skip to content

Commit

Permalink
changing lodash
Browse files Browse the repository at this point in the history
  • Loading branch information
brittanyjoiner15 committed Aug 6, 2020
1 parent c655f50 commit fbdae3f
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 13 deletions.
8 changes: 3 additions & 5 deletions STYLEGUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ possible (which is almost everywhere):
```js
// good
import { mapValues } from 'lodash';
import mapValues from 'lodash/mapValues';
export mapValues;

// bad
Expand Down Expand Up @@ -608,10 +608,8 @@ import './component.scss';
// All other imports below the SASS import

export const Component = () => {
return (
<div className="plgComponent" />
);
}
return <div className="plgComponent" />;
};
```
```scss
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { mapValues } from 'lodash';
import mapValues from 'lodash/mapValues';
import {
AnyExpressionFunctionDefinition,
ExpressionFunctionDefinition,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/

import { mapValues } from 'lodash';
import mapValues from 'lodash/mapValues';
import { AnyExpressionFunctionDefinition } from '../../types';
import { ExecutionContext } from '../../../execution/types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { mapValues } from 'lodash';
import mapValues from 'lodash/mapValues';

// It takes a function spec and passes in default args into the spec fn
export const functionWrapper = (fnSpec, mockReduxStore) => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/canvas/public/lib/keymap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import { mapValues } from 'lodash';
import mapValues from 'lodash/mapValues';

import { ShortcutMap, ShortcutNameSpace } from '../../types/shortcuts';
import { ShortcutStrings as strings } from '../../i18n/shortcuts';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
EuiHorizontalRule,
EuiEmptyPrompt,
} from '@elastic/eui';
import { mapValues } from 'lodash';
import mapValues from 'lodash/mapValues';
import { i18n } from '@kbn/i18n';
import { FormattedMessage } from '@kbn/i18n/react';
import { ToastsStart } from 'src/core/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import expect from '@kbn/expect';
import { mapValues } from 'lodash';
import mapValues from 'lodash/mapValues';
import { FtrProviderContext } from '../../common/ftr_provider_context';
import { UICapabilitiesService } from '../../common/services/ui_capabilities';
import { UserAtSpaceScenarios } from '../scenarios';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import expect from '@kbn/expect';
import { mapValues } from 'lodash';
import mapValues from 'lodash/mapValues';
import { FtrProviderContext } from '../../common/ftr_provider_context';
import { UICapabilitiesService } from '../../common/services/ui_capabilities';
import { UserScenarios } from '../scenarios';
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/ui_capabilities/spaces_only/tests/catalogue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import expect from '@kbn/expect';
import { mapValues } from 'lodash';
import mapValues from 'lodash/mapValues';
import { FtrProviderContext } from '../../common/ftr_provider_context';
import { UICapabilitiesService } from '../../common/services/ui_capabilities';
import { SpaceScenarios } from '../scenarios';
Expand Down

0 comments on commit fbdae3f

Please sign in to comment.