Skip to content

Commit

Permalink
[ML] Improve lodash imports for transform plugin.
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Sep 28, 2020
1 parent 9313f87 commit f503dd4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

// Prefer importing entire lodash library, e.g. import { get } from "lodash"
// eslint-disable-next-line no-restricted-imports
import isEqual from 'lodash/isEqual';
import { isEqual } from 'lodash';
import React, { memo, FC } from 'react';

import { EuiCodeEditor, EuiFormRow } from '@elastic/eui';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ import {
EuiSelectOption,
} from '@elastic/eui';

// Prefer importing entire lodash library, e.g. import { get } from "lodash"
// eslint-disable-next-line no-restricted-imports
import cloneDeep from 'lodash/cloneDeep';
import { cloneDeep } from 'lodash';
import { useUpdateEffect } from 'react-use';
import { AggName } from '../../../../../../common/types/aggregations';
import { dictionaryToArray } from '../../../../../../common/types/common';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

// Prefer importing entire lodash library, e.g. import { get } from "lodash"
// eslint-disable-next-line no-restricted-imports
import isEqual from 'lodash/isEqual';
import { isEqual } from 'lodash';

import { Dictionary } from '../../../../../../../common/types/common';
import { PivotSupportedAggs } from '../../../../../../../common/types/pivot_aggs';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
import React, { useCallback, useContext, useEffect, useState } from 'react';
import { EuiComboBox, EuiFormRow } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
// Prefer importing entire lodash library, e.g. import { get } from "lodash"
// eslint-disable-next-line no-restricted-imports
import debounce from 'lodash/debounce';
import { debounce } from 'lodash';
import { useUpdateEffect } from 'react-use';
import { i18n } from '@kbn/i18n';
import { isEsSearchResponse } from '../../../../../../../../../common/api_schemas/type_guards';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@
* you may not use this file except in compliance with the Elastic License.
*/

// Prefer importing entire lodash library, e.g. import { get } from "lodash"
// eslint-disable-next-line no-restricted-imports
import isEqual from 'lodash/isEqual';
// Prefer importing entire lodash library, e.g. import { get } from "lodash"
// eslint-disable-next-line no-restricted-imports
import merge from 'lodash/merge';
import { isEqual } from 'lodash';
import { merge } from 'lodash';

import { useReducer } from 'react';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@

import { useState } from 'react';
import { Direction, EuiBasicTableProps, EuiTableSortingType } from '@elastic/eui';
// Prefer importing entire lodash library, e.g. import { get } from "lodash"
// eslint-disable-next-line no-restricted-imports
import sortBy from 'lodash/sortBy';
// Prefer importing entire lodash library, e.g. import { get } from "lodash"
// eslint-disable-next-line no-restricted-imports
import get from 'lodash/get';
import { sortBy } from 'lodash';
import { get } from 'lodash';

const PAGE_SIZE = 10;
const PAGE_SIZE_OPTIONS = [10, 25, 50];
Expand Down

0 comments on commit f503dd4

Please sign in to comment.