-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ban use of lodash.template #100277
Ban use of lodash.template #100277
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
import createContainer from 'constate'; | ||
import { useCallback, useState } from 'react'; | ||
import { useDebounce } from 'react-use'; | ||
import useDebounce from 'react-use/lib/useDebounce'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR fixes an eslint rule that should have been firing, but wasn't. I've updated this import to comply with the fixed rule. |
||
import { esQuery, IIndexPattern, Query } from '../../../../../../../src/plugins/data/public'; | ||
|
||
type ParsedQuery = ReturnType<typeof esQuery.buildEsQuery>; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
import equal from 'fast-deep-equal'; | ||
import { useCallback, useMemo, useState } from 'react'; | ||
import { useAsync } from 'react-use'; | ||
import useAsync from 'react-use/lib/useAsync'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR fixes an eslint rule that should have been firing, but wasn't. I've updated this import to comply with the fixed rule. |
||
import { ObjectEntries } from '../../../../common/utility_types'; | ||
import { ChildFormValidationError, GenericValidationError } from './validation_errors'; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
*/ | ||
|
||
import React, { useCallback, useMemo, useState } from 'react'; | ||
import { useThrottle } from 'react-use'; | ||
import useThrottle from 'react-use/lib/useThrottle'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR fixes an eslint rule that should have been firing, but wasn't. I've updated this import to comply with the fixed rule. |
||
import { FormattedMessage } from '@kbn/i18n/react'; | ||
import { i18n } from '@kbn/i18n'; | ||
import { EuiFieldSearch } from '@elastic/eui'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
import React, { useState } from 'react'; | ||
|
||
import { useDebounce } from 'react-use'; | ||
import useDebounce from 'react-use/lib/useDebounce'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR fixes an eslint rule that should have been firing, but wasn't. I've updated this import to comply with the fixed rule. |
||
import { useValuesList } from '../../../hooks/use_values_list'; | ||
import { FieldValueSelection } from './field_value_selection'; | ||
import { FieldValueSuggestionsProps } from './types'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
import { capitalize, union } from 'lodash'; | ||
import { useEffect, useState } from 'react'; | ||
import { useDebounce } from 'react-use'; | ||
import useDebounce from 'react-use/lib/useDebounce'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR fixes an eslint rule that should have been firing, but wasn't. I've updated this import to comply with the fixed rule. |
||
import { IndexPattern } from '../../../../../src/plugins/data/common'; | ||
import { ESFilter } from '../../../../../typings/elasticsearch'; | ||
import { createEsParams, useEsSearch } from './use_es_search'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ import { find } from 'lodash/fp'; | |
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'; | ||
import { EuiComboBox, EuiHealth, EuiHighlight, EuiSpacer } from '@elastic/eui'; | ||
|
||
import { useDebounce } from 'react-use'; | ||
import useDebounce from 'react-use/lib/useDebounce'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR fixes an eslint rule that should have been firing, but wasn't. I've updated this import to comply with the fixed rule. |
||
import { useAllAgents } from './use_all_agents'; | ||
import { useAgentGroups } from './use_agent_groups'; | ||
import { useOsqueryPolicies } from './use_osquery_policies'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
*/ | ||
|
||
import React, { useCallback, useState } from 'react'; | ||
import { useDebounce } from 'react-use'; | ||
import useDebounce from 'react-use/lib/useDebounce'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This PR fixes an eslint rule that should have been firing, but wasn't. I've updated this import to comply with the fixed rule. |
||
import { useDispatch } from 'react-redux'; | ||
import { Query } from 'src/plugins/data/common'; | ||
import { useGetUrlParams, useUpdateKueryString, useUrlParams } from '../../../hooks'; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this rule because it prevented the other
no-restricted-imports
rule above from firing. Even combining them together did not fix the problem. This is apparently desired behavior: eslint/eslint#14220I opted to remove this rule in favor of the definition above because the other definitions are security-related, which is [subjectively] much more important.