diff --git a/.eslintrc.js b/.eslintrc.js index ad9de04251e4c..5ac1a79d03274 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -863,7 +863,8 @@ module.exports = { 'no-shadow-restricted-names': 'error', 'no-sparse-arrays': 'error', 'no-this-before-super': 'error', - 'no-undef': 'error', + // rely on typescript + 'no-undef': 'off', 'no-unreachable': 'error', 'no-unsafe-finally': 'error', 'no-useless-call': 'error', @@ -998,7 +999,8 @@ module.exports = { 'no-shadow-restricted-names': 'error', 'no-sparse-arrays': 'error', 'no-this-before-super': 'error', - 'no-undef': 'error', + // rely on typescript + 'no-undef': 'off', 'no-unreachable': 'error', 'no-unsafe-finally': 'error', 'no-useless-call': 'error', diff --git a/examples/state_containers_examples/public/todo/todo.tsx b/examples/state_containers_examples/public/todo/todo.tsx index b6f4f6550026b..fe597042d38c7 100644 --- a/examples/state_containers_examples/public/todo/todo.tsx +++ b/examples/state_containers_examples/public/todo/todo.tsx @@ -313,7 +313,7 @@ export const TodoAppPage: React.FC<{ function withDefaultState( stateContainer: BaseStateContainer, - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow defaultState: State ): INullableBaseStateContainer { return { diff --git a/examples/state_containers_examples/public/with_data_services/components/app.tsx b/examples/state_containers_examples/public/with_data_services/components/app.tsx index d007cfd97edca..8f444b96524c1 100644 --- a/examples/state_containers_examples/public/with_data_services/components/app.tsx +++ b/examples/state_containers_examples/public/with_data_services/components/app.tsx @@ -180,6 +180,7 @@ function useGlobalStateSyncing( }, [query, kbnUrlStateStorage]); } +// eslint-disable-next-line @typescript-eslint/no-shadow function useAppStateSyncing( appStateContainer: BaseStateContainer, query: DataPublicPluginStart['query'], diff --git a/package.json b/package.json index a2c085c0424b1..2f1e59cc6b96b 100644 --- a/package.json +++ b/package.json @@ -567,8 +567,8 @@ "@types/xml2js": "^0.4.5", "@types/yauzl": "^2.9.1", "@types/zen-observable": "^0.8.0", - "@typescript-eslint/eslint-plugin": "^3.10.0", - "@typescript-eslint/parser": "^3.10.0", + "@typescript-eslint/eslint-plugin": "^4.8.1", + "@typescript-eslint/parser": "^4.8.1", "@welldone-software/why-did-you-render": "^5.0.0", "@yarnpkg/lockfile": "^1.1.0", "abab": "^1.0.4", @@ -644,7 +644,7 @@ "eslint-plugin-prefer-object-spread": "^1.2.1", "eslint-plugin-prettier": "^3.1.4", "eslint-plugin-react": "^7.20.3", - "eslint-plugin-react-hooks": "^4.0.4", + "eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-react-perf": "^3.2.3", "expose-loader": "^0.7.5", "faker": "1.1.0", diff --git a/packages/elastic-eslint-config-kibana/typescript.js b/packages/elastic-eslint-config-kibana/typescript.js index d3e80b7448151..b439f5297032b 100644 --- a/packages/elastic-eslint-config-kibana/typescript.js +++ b/packages/elastic-eslint-config-kibana/typescript.js @@ -189,6 +189,11 @@ module.exports = { '@typescript-eslint/no-extra-non-null-assertion': 'error', '@typescript-eslint/no-misused-new': 'error', '@typescript-eslint/no-namespace': 'error', + '@typescript-eslint/no-shadow': 'error', + // rely on typescript + '@typescript-eslint/no-undef': 'off', + 'no-undef': 'off', + '@typescript-eslint/triple-slash-reference': ['error', { path: 'never', types: 'never', @@ -218,7 +223,6 @@ module.exports = { 'no-eval': 'error', 'no-new-wrappers': 'error', 'no-script-url': 'error', - 'no-shadow': 'error', 'no-throw-literal': 'error', 'no-undef-init': 'error', 'no-unsafe-finally': 'error', diff --git a/src/core/public/utils/crypto/sha256.ts b/src/core/public/utils/crypto/sha256.ts index eaa057d604689..13e0d405a706b 100644 --- a/src/core/public/utils/crypto/sha256.ts +++ b/src/core/public/utils/crypto/sha256.ts @@ -130,7 +130,7 @@ type BufferEncoding = | 'binary' | 'hex'; -/* eslint-disable no-bitwise, no-shadow */ +/* eslint-disable no-bitwise, @typescript-eslint/no-shadow */ export class Sha256 { private _a: number; private _b: number; diff --git a/src/core/server/http/router/validator/validator.ts b/src/core/server/http/router/validator/validator.ts index babca87495a4e..be7781fdacbe0 100644 --- a/src/core/server/http/router/validator/validator.ts +++ b/src/core/server/http/router/validator/validator.ts @@ -143,8 +143,8 @@ export type RouteValidatorFullConfig = RouteValidatorConfig & * @internal */ export class RouteValidator

{ - public static from

( - opts: RouteValidator | RouteValidatorFullConfig + public static from<_P = {}, _Q = {}, _B = {}>( + opts: RouteValidator<_P, _Q, _B> | RouteValidatorFullConfig<_P, _Q, _B> ) { if (opts instanceof RouteValidator) { return opts; diff --git a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts index f4f13a698ee30..eb67842bff833 100644 --- a/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts +++ b/src/plugins/es_ui_shared/static/forms/hook_form_lib/hooks/use_field.ts @@ -118,16 +118,16 @@ export const useField = ( * updating the "value" state. */ const formatInputValue = useCallback( - (inputValue: unknown): T => { + (inputValue: unknown): U => { const isEmptyString = typeof inputValue === 'string' && inputValue.trim() === ''; if (isEmptyString || !formatters) { - return inputValue as T; + return inputValue as U; } const formData = __getFormData$().value; - return formatters.reduce((output, formatter) => formatter(output, formData), inputValue) as T; + return formatters.reduce((output, formatter) => formatter(output, formData), inputValue) as U; }, [formatters, __getFormData$] ); diff --git a/src/plugins/kibana_utils/common/state_containers/create_state_container_react_helpers.test.tsx b/src/plugins/kibana_utils/common/state_containers/create_state_container_react_helpers.test.tsx index 81101f3180738..48e5ee3c87e37 100644 --- a/src/plugins/kibana_utils/common/state_containers/create_state_container_react_helpers.test.tsx +++ b/src/plugins/kibana_utils/common/state_containers/create_state_container_react_helpers.test.tsx @@ -97,11 +97,11 @@ test('context receives stateContainer', () => { const { Provider, context } = createStateContainerReactHelpers(); ReactDOM.render( - /* eslint-disable no-shadow */ + /* eslint-disable @typescript-eslint/no-shadow */ {(stateContainer) => stateContainer.get().foo} , - /* eslint-enable no-shadow */ + /* eslint-enable @typescript-eslint/no-shadow */ container ); @@ -116,7 +116,7 @@ describe('hooks', () => { const stateContainer = createStateContainer({ foo: 'bar' }); const { Provider, useContainer } = createStateContainerReactHelpers(); const Demo: React.FC<{}> = () => { - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow const stateContainer = useContainer(); return <>{stateContainer.get().foo}; }; diff --git a/src/plugins/kibana_utils/demos/state_sync/url.ts b/src/plugins/kibana_utils/demos/state_sync/url.ts index e8e63eefe866c..f7a66e79b8170 100644 --- a/src/plugins/kibana_utils/demos/state_sync/url.ts +++ b/src/plugins/kibana_utils/demos/state_sync/url.ts @@ -56,9 +56,9 @@ export const result = Promise.resolve() }); function withDefaultState( - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow stateContainer: BaseStateContainer, - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow defaultState: State ): INullableBaseStateContainer { return { diff --git a/src/plugins/kibana_utils/public/state_sync/state_sync.test.ts b/src/plugins/kibana_utils/public/state_sync/state_sync.test.ts index 4b2b2bd99911b..f96c243e82f89 100644 --- a/src/plugins/kibana_utils/public/state_sync/state_sync.test.ts +++ b/src/plugins/kibana_utils/public/state_sync/state_sync.test.ts @@ -354,7 +354,7 @@ describe('state_sync', () => { function withDefaultState( stateContainer: BaseStateContainer, - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow defaultState: State ): INullableBaseStateContainer { return { diff --git a/src/plugins/vis_default_editor/public/components/controls/has_extended_bounds.tsx b/src/plugins/vis_default_editor/public/components/controls/has_extended_bounds.tsx index ae3da8e203a57..a316a087c8bcb 100644 --- a/src/plugins/vis_default_editor/public/components/controls/has_extended_bounds.tsx +++ b/src/plugins/vis_default_editor/public/components/controls/has_extended_bounds.tsx @@ -38,7 +38,6 @@ function HasExtendedBoundsParamEditor(props: AggParamEditorProps) { setValue(value && agg.params.min_doc_count); } - /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [agg.params.min_doc_count, setValue, value]); return ( diff --git a/src/plugins/visualizations/public/vis.ts b/src/plugins/visualizations/public/vis.ts index cae9058071b6c..75c889af3d5c9 100644 --- a/src/plugins/visualizations/public/vis.ts +++ b/src/plugins/visualizations/public/vis.ts @@ -97,13 +97,13 @@ export class Vis { public readonly uiState: PersistedState; constructor(visType: string, visState: SerializedVis = {} as any) { - this.type = this.getType(visType); + this.type = this.getType(visType); this.params = this.getParams(visState.params); this.uiState = new PersistedState(visState.uiState); this.id = visState.id; } - private getType(visType: string) { + private getType(visType: string) { const type = getTypes().get(visType); if (!type) { const errorMessage = i18n.translate('visualizations.visualizationTypeInvalidMessage', { diff --git a/tsconfig.base.json b/tsconfig.base.json index 0aad8d6b9c124..111c9dbc949de 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -53,7 +53,6 @@ "types": [ "node", "jest", - "react", "flot", "jest-styled-components", "@testing-library/jest-dom" diff --git a/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/index.tsx b/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/index.tsx index 1c42f146b867a..4f94f255a4e4c 100644 --- a/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/index.tsx +++ b/x-pack/plugins/apm/public/components/app/Settings/AgentConfigurations/AgentConfigurationCreateEdit/index.tsx @@ -81,7 +81,6 @@ export function AgentConfigurationCreateEdit({ ..._newConfig, settings: existingConfig?.settings || {}, })); - /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [existingConfig]); // update newConfig when existingConfig has loaded diff --git a/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx b/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx index 4a548b44cf361..3f72f07b2a7d2 100644 --- a/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx +++ b/x-pack/plugins/apm/public/components/shared/TransactionActionMenu/TransactionActionMenu.tsx @@ -65,7 +65,6 @@ export function TransactionActionMenu({ transaction }: Props) { { key: 'transaction.name', value: transaction?.transaction.name }, { key: 'transaction.type', value: transaction?.transaction.type }, ].filter((filter): filter is Filter => typeof filter.value === 'string'), - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [transaction] ); diff --git a/x-pack/plugins/apm/typings/common.d.ts b/x-pack/plugins/apm/typings/common.d.ts index 9133315c4c16a..fd5b5c8ea0876 100644 --- a/x-pack/plugins/apm/typings/common.d.ts +++ b/x-pack/plugins/apm/typings/common.d.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - +import type { UnwrapPromise } from '@kbn/utility-types'; import '../../../typings/rison_node'; import '../../infra/types/eui'; // EUIBasicTable @@ -21,8 +21,6 @@ type AllowUnknownObjectProperties = T extends object } : T; -export type PromiseValueType = Value extends Promise - ? Value - : Value; +export type PromiseValueType> = UnwrapPromise; export type Maybe = T | null | undefined; diff --git a/x-pack/plugins/canvas/shareable_runtime/components/__tests__/app.test.tsx b/x-pack/plugins/canvas/shareable_runtime/components/__tests__/app.test.tsx index eaf45db0a0b93..755f6907a4d5b 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/__tests__/app.test.tsx +++ b/x-pack/plugins/canvas/shareable_runtime/components/__tests__/app.test.tsx @@ -39,7 +39,7 @@ jest.mock('../../supported_renderers'); jest.mock('@elastic/eui/lib/components/portal/portal', () => { // Local constants are not supported in Jest mocks-- they must be // imported within the mock. - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow const React = jest.requireActual('react'); return { EuiPortal: (props: any) =>

{props.children}
, diff --git a/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/settings.test.tsx b/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/settings.test.tsx index 28aa6ef90aedb..a4f2aca9bd79c 100644 --- a/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/settings.test.tsx +++ b/x-pack/plugins/canvas/shareable_runtime/components/footer/settings/__tests__/settings.test.tsx @@ -25,7 +25,7 @@ jest.mock('@elastic/eui/lib/services/accessibility', () => { }; }); jest.mock('@elastic/eui/lib/components/portal/portal', () => { - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow const React = jest.requireActual('react'); return { EuiPortal: (props: any) =>
{props.children}
, diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_config.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_config.tsx index 177354dad14dc..75000ad7e1d3b 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_config.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_config.tsx @@ -47,6 +47,7 @@ export const PackagePolicyInputConfig: React.FunctionComponent<{ const hasErrors = forceShowErrors && validationHasErrors(inputVarsValidationResults); const requiredVars: RegistryVarsEntry[] = []; + // eslint-disable-next-line react-hooks/exhaustive-deps const advancedVars: RegistryVarsEntry[] = []; if (packageInputVars) { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_stream.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_stream.tsx index 963d0da50ce7f..11d11ed33d5d9 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_stream.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/components/package_policy_input_stream.tsx @@ -49,6 +49,7 @@ export const PackagePolicyInputStreamConfig: React.FunctionComponent<{ const hasErrors = forceShowErrors && validationHasErrors(inputStreamValidationResults); const requiredVars: RegistryVarsEntry[] = []; + // eslint-disable-next-line react-hooks/exhaustive-deps const advancedVars: RegistryVarsEntry[] = []; if (packageInputStream.vars && packageInputStream.vars.length) { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx index 525a224146994..9c94bb939cdf8 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agent_policy/create_package_policy_page/step_select_agent_policy.tsx @@ -91,6 +91,7 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ sortOrder: 'asc', full: true, }); + // eslint-disable-next-line react-hooks/exhaustive-deps const agentPolicies = agentPoliciesData?.items || []; const agentPoliciesById = agentPolicies.reduce( (acc: { [key: string]: GetAgentPoliciesResponseItem }, policy) => { @@ -131,6 +132,7 @@ export const StepSelectAgentPolicy: React.FunctionComponent<{ } }, [selectedPolicyId, agentPolicy, updateAgentPolicy, setIsLoadingSecondStep]); + // eslint-disable-next-line react-hooks/exhaustive-deps const agentPolicyOptions: Array> = packageInfoData ? agentPolicies.map((agentConf) => { const alreadyHasLimitedPackage = diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx index d46d2aa442745..1d08a1f791976 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/agent_list_page/index.tsx @@ -278,6 +278,7 @@ export const AgentListPage: React.FunctionComponent<{}> = () => { perPage: 1000, }); + // eslint-disable-next-line react-hooks/exhaustive-deps const agentPolicies = agentPoliciesRequest.data ? agentPoliciesRequest.data.items : []; const agentPoliciesIndexedById = useMemo(() => { return agentPolicies.reduce((acc, agentPolicy) => { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_reassign_policy_flyout/index.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_reassign_policy_flyout/index.tsx index 20c1eb8ff9c50..46e291e73fa78 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_reassign_policy_flyout/index.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/agents/components/agent_reassign_policy_flyout/index.tsx @@ -49,6 +49,7 @@ export const AgentReassignAgentPolicyFlyout: React.FunctionComponent = ({ page: 1, perPage: 1000, }); + // eslint-disable-next-line react-hooks/exhaustive-deps const agentPolicies = agentPoliciesRequest.data ? agentPoliciesRequest.data.items : []; useEffect(() => { if (!selectedAgentPolicyId && agentPolicies[0]) { diff --git a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_list_grid.tsx b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_list_grid.tsx index ef3b94081b1d8..b96fda2c23af1 100644 --- a/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_list_grid.tsx +++ b/x-pack/plugins/fleet/public/applications/fleet/sections/epm/components/package_list_grid.tsx @@ -37,7 +37,7 @@ export function PackageListGrid({ isLoading, controls, title, list }: ListProps) const localSearchRef = useLocalSearch(list); const onQueryChange = ({ - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow query, queryText: userInput, error, diff --git a/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx b/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx index 8e84abb5ce495..2fc0a260103f7 100644 --- a/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx +++ b/x-pack/plugins/index_management/public/application/components/template_form/template_form.tsx @@ -105,6 +105,7 @@ export const TemplateForm = ({ aliases: true, }); + // eslint-disable-next-line react-hooks/exhaustive-deps const indexTemplate = defaultValue ?? { name: '', indexPatterns: [], diff --git a/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx b/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx index 097e0f1f1690b..e16b2aeaacac4 100644 --- a/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx +++ b/x-pack/plugins/infra/public/alerting/inventory/components/expression.tsx @@ -147,7 +147,6 @@ export const Expressions: React.FC = (props) => { timeUnit: timeUnit ?? defaultExpression.timeUnit, }); setAlertParams('criteria', exp); - /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [setAlertParams, alertParams.criteria, timeSize, timeUnit]); const removeExpression = useCallback( diff --git a/x-pack/plugins/infra/public/alerting/inventory/components/metric.tsx b/x-pack/plugins/infra/public/alerting/inventory/components/metric.tsx index 2dd2938dfd55a..dac9f91c9bd29 100644 --- a/x-pack/plugins/infra/public/alerting/inventory/components/metric.tsx +++ b/x-pack/plugins/infra/public/alerting/inventory/components/metric.tsx @@ -91,6 +91,7 @@ export const MetricExpression = ({ const [selectedOption, setSelectedOption] = useState(metric?.value); const [fieldDisplayedCustomLabel, setFieldDisplayedCustomLabel] = useState(customMetric?.label); + // eslint-disable-next-line react-hooks/exhaustive-deps const firstFieldOption = { text: i18n.translate('xpack.infra.metrics.alertFlyout.expression.metric.selectFieldLabel', { defaultMessage: 'Select a metric', @@ -106,16 +107,11 @@ export const MetricExpression = ({ [fields, customMetric?.field] ); - const expressionDisplayValue = useMemo( - () => { - return customMetricTabOpen - ? customMetric?.field && getCustomMetricLabel(customMetric) - : metric?.text || firstFieldOption.text; - }, - // The ?s are confusing eslint here, so... - // eslint-disable-next-line react-hooks/exhaustive-deps - [customMetricTabOpen, metric, customMetric, firstFieldOption] - ); + const expressionDisplayValue = useMemo(() => { + return customMetricTabOpen + ? customMetric?.field && getCustomMetricLabel(customMetric) + : metric?.text || firstFieldOption.text; + }, [customMetricTabOpen, metric, customMetric, firstFieldOption]); const onChangeTab = useCallback( (id) => { diff --git a/x-pack/plugins/infra/public/alerting/log_threshold/components/expression_editor/editor.tsx b/x-pack/plugins/infra/public/alerting/log_threshold/components/expression_editor/editor.tsx index 48639f3095d3d..662b7f68f8fec 100644 --- a/x-pack/plugins/infra/public/alerting/log_threshold/components/expression_editor/editor.tsx +++ b/x-pack/plugins/infra/public/alerting/log_threshold/components/expression_editor/editor.tsx @@ -157,7 +157,6 @@ export const Editor: React.FC = (props) => { } else { return []; } - /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [sourceStatus]); const groupByFields = useMemo(() => { @@ -168,7 +167,6 @@ export const Editor: React.FC = (props) => { } else { return []; } - /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [sourceStatus]); const updateThreshold = useCallback( diff --git a/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx b/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx index 92c0172703423..48e15e0026ff6 100644 --- a/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx +++ b/x-pack/plugins/infra/public/alerting/metric_threshold/components/expression.tsx @@ -96,7 +96,6 @@ export const Expressions: React.FC = (props) => { aggregation: 'avg', }; } - /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [alertsContext.metadata]); const updateParams = useCallback( @@ -116,7 +115,6 @@ export const Expressions: React.FC = (props) => { timeUnit: timeUnit ?? defaultExpression.timeUnit, }); setAlertParams('criteria', exp); - /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [setAlertParams, alertParams.criteria, timeSize, timeUnit]); const removeExpression = useCallback( @@ -127,7 +125,6 @@ export const Expressions: React.FC = (props) => { setAlertParams('criteria', exp); } }, - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [setAlertParams, alertParams.criteria] ); @@ -172,7 +169,6 @@ export const Expressions: React.FC = (props) => { setTimeSize(ts || undefined); setAlertParams('criteria', criteria); }, - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [alertParams.criteria, setAlertParams] ); @@ -186,7 +182,6 @@ export const Expressions: React.FC = (props) => { setTimeUnit(tu as Unit); setAlertParams('criteria', criteria); }, - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [alertParams.criteria, setAlertParams] ); diff --git a/x-pack/plugins/infra/public/components/header/header.tsx b/x-pack/plugins/infra/public/components/header/header.tsx index 47ee1857da591..32ee6658ff1a8 100644 --- a/x-pack/plugins/infra/public/components/header/header.tsx +++ b/x-pack/plugins/infra/public/components/header/header.tsx @@ -17,6 +17,7 @@ interface HeaderProps { export const Header = ({ breadcrumbs = [], readOnlyBadge = false }: HeaderProps) => { const chrome = useKibana().services.chrome; + // eslint-disable-next-line react-hooks/exhaustive-deps const badge = readOnlyBadge ? { text: i18n.translate('xpack.infra.header.badge.readOnly.text', { @@ -31,12 +32,10 @@ export const Header = ({ breadcrumbs = [], readOnlyBadge = false }: HeaderProps) const setBreadcrumbs = useCallback(() => { return chrome?.setBreadcrumbs(breadcrumbs || []); - /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [breadcrumbs, chrome]); const setBadge = useCallback(() => { return chrome?.setBadge(badge); - /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [badge, chrome]); useEffect(() => { diff --git a/x-pack/plugins/infra/public/components/saved_views/view_list_modal.tsx b/x-pack/plugins/infra/public/components/saved_views/view_list_modal.tsx index 4015d64e1097f..374ba23f690e3 100644 --- a/x-pack/plugins/infra/public/components/saved_views/view_list_modal.tsx +++ b/x-pack/plugins/infra/public/components/saved_views/view_list_modal.tsx @@ -60,7 +60,7 @@ export function SavedViewListModal diff --git a/x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts b/x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts index d5a43c0d6cffa..7c903f59002dc 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_filter/log_filter_state.ts @@ -82,7 +82,6 @@ export const useLogFilterState: (props: { } return true; - /* eslint-disable-next-line react-hooks/exhaustive-deps */ }, [filterQueryDraft]); const serializedFilterQuery = useMemo(() => (filterQuery ? filterQuery.serializedQuery : null), [ diff --git a/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts b/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts index 75c328b829397..f430e6b5e4d90 100644 --- a/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts +++ b/x-pack/plugins/infra/public/containers/logs/log_source/log_source.ts @@ -91,7 +91,6 @@ export const useLogSource = ({ sourceId, fetch }: { sourceId: string; fetch: Htt fields: sourceStatus?.logIndexFields ?? [], title: sourceConfiguration?.configuration.name ?? 'unknown', }), - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [sourceConfiguration, sourceStatus] ); diff --git a/x-pack/plugins/infra/public/containers/source/use_source_via_http.ts b/x-pack/plugins/infra/public/containers/source/use_source_via_http.ts index 54d565d9ee223..94e2537a67a2a 100644 --- a/x-pack/plugins/infra/public/containers/source/use_source_via_http.ts +++ b/x-pack/plugins/infra/public/containers/source/use_source_via_http.ts @@ -76,7 +76,6 @@ export const useSourceViaHttp = ({ title: pickIndexPattern(response?.source, indexType), }; }, - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [response, type] ); diff --git a/x-pack/plugins/infra/public/hooks/use_bulk_get_saved_object.tsx b/x-pack/plugins/infra/public/hooks/use_bulk_get_saved_object.tsx index cfa9a711f7743..2a70edc9b9a57 100644 --- a/x-pack/plugins/infra/public/hooks/use_bulk_get_saved_object.tsx +++ b/x-pack/plugins/infra/public/hooks/use_bulk_get_saved_object.tsx @@ -35,7 +35,6 @@ export const useBulkGetSavedObject = (type: string) => { }; fetchData(); }, - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [type, kibana.services.savedObjects] ); diff --git a/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx b/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx index 0efb862ad2eb4..8313d496a0651 100644 --- a/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx +++ b/x-pack/plugins/infra/public/hooks/use_create_saved_object.tsx @@ -40,7 +40,6 @@ export const useCreateSavedObject = (type: string) => { }; save(); }, - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [type, kibana.services.savedObjects] ); diff --git a/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx b/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx index e353a79b19073..3f2d15b3b86aa 100644 --- a/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx +++ b/x-pack/plugins/infra/public/hooks/use_delete_saved_object.tsx @@ -29,7 +29,6 @@ export const useDeleteSavedObject = (type: string) => { }; dobj(); }, - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [type, kibana.services.savedObjects] ); diff --git a/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx b/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx index 8aead6adfd0ab..7c179875442d1 100644 --- a/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx +++ b/x-pack/plugins/infra/public/hooks/use_find_saved_object.tsx @@ -37,7 +37,6 @@ export const useFindSavedObject = }; fetchData(); }, - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [type, kibana.services.savedObjects] ); diff --git a/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx b/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx index 4c1e9ef7a6136..f5b51ee869fb7 100644 --- a/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx +++ b/x-pack/plugins/infra/public/hooks/use_update_saved_object.tsx @@ -40,7 +40,6 @@ export const useUpdateSavedObject = (type: string) => { }; save(); }, - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [type, kibana.services.savedObjects] ); diff --git a/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_results_content.tsx b/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_results_content.tsx index 740fc8b7bafcd..98367335d9c2d 100644 --- a/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_results_content.tsx +++ b/x-pack/plugins/infra/public/pages/logs/log_entry_categories/page_results_content.tsx @@ -77,7 +77,6 @@ export const LogEntryCategoriesResultsContent: React.FunctionComponent { const availableFields = useMemo( () => sourceStatus?.logIndexFields.map((field) => field.name) ?? [], - /* eslint-disable-next-line react-hooks/exhaustive-deps */ [sourceStatus] ); diff --git a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/overlay.tsx b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/overlay.tsx index dd0060f773b49..27b5245cc7938 100644 --- a/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/overlay.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/inventory_view/components/node_details/overlay.tsx @@ -34,6 +34,7 @@ export const NodeContextPopover = ({ options, onClose, }: Props) => { + // eslint-disable-next-line react-hooks/exhaustive-deps const tabConfigs = [MetricsTab, LogsTab, ProcessesTab, PropertiesTab]; const tabs = useMemo(() => { diff --git a/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx b/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx index 88e7c0c08e441..4c75003616117 100644 --- a/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx +++ b/x-pack/plugins/infra/public/pages/metrics/metric_detail/components/sub_section.tsx @@ -23,7 +23,6 @@ export const SubSection: FunctionComponent = ({ isLiveStreaming, stopLiveStreaming, }) => { - /* eslint-disable-next-line react-hooks/exhaustive-deps */ const metric = useMemo(() => metrics?.find((m) => m.id === id), [id, metrics]); if (!children || !metric) { diff --git a/x-pack/plugins/lens/public/app_plugin/app.test.tsx b/x-pack/plugins/lens/public/app_plugin/app.test.tsx index 831dd58c373a7..a211416472f48 100644 --- a/x-pack/plugins/lens/public/app_plugin/app.test.tsx +++ b/x-pack/plugins/lens/public/app_plugin/app.test.tsx @@ -44,7 +44,7 @@ import { KibanaContextProvider } from '../../../../../src/plugins/kibana_react/p jest.mock('../editor_frame_service/editor_frame/expression_helpers'); jest.mock('src/core/public'); jest.mock('../../../../../src/plugins/saved_objects/public', () => { - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow const { SavedObjectSaveModal, SavedObjectSaveModalOrigin } = jest.requireActual( '../../../../../src/plugins/saved_objects/public' ); diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx index 97165a8513078..913b396622518 100644 --- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx +++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/suggestion_panel.tsx @@ -273,6 +273,7 @@ export function SuggestionPanel({ return (props: ReactExpressionRendererProps) => ( ); + // eslint-disable-next-line react-hooks/exhaustive-deps }, [plugins.data.query.timefilter.timefilter, context]); const [lastSelectedSuggestion, setLastSelectedSuggestion] = useState(-1); diff --git a/x-pack/plugins/observability/public/application/index.tsx b/x-pack/plugins/observability/public/application/index.tsx index 57a7bba8502d1..585a45cf5279c 100644 --- a/x-pack/plugins/observability/public/application/index.tsx +++ b/x-pack/plugins/observability/public/application/index.tsx @@ -39,6 +39,7 @@ function App() { const Wrapper = () => { const { core } = usePluginContext(); + // eslint-disable-next-line react-hooks/exhaustive-deps const breadcrumb = [observabilityLabelBreadcrumb, ...route.breadcrumb]; useEffect(() => { core.chrome.setBreadcrumbs(breadcrumb); diff --git a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/index.ts b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/index.ts index 0217c48668fb9..84a5d868c34a9 100644 --- a/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/index.ts +++ b/x-pack/plugins/security_solution/common/search_strategy/security_solution/matrix_histogram/index.ts @@ -60,7 +60,7 @@ export interface MatrixHistogramSchema { buildDsl: (options: MatrixHistogramRequestOptions) => {}; aggName: string; parseKey: string; - parser?: (data: MatrixHistogramParseData, keyBucket: string) => MatrixHistogramData[]; + parser?: (data: MatrixHistogramParseData, keyBucket: string) => MatrixHistogramData[]; } export type MatrixHistogramParseData = T extends MatrixHistogramType.alerts diff --git a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper_hover_content.tsx b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper_hover_content.tsx index 8c68551ddd981..f0eae407eedce 100644 --- a/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper_hover_content.tsx +++ b/x-pack/plugins/security_solution/public/common/components/drag_and_drop/draggable_wrapper_hover_content.tsx @@ -99,7 +99,6 @@ const DraggableWrapperHoverContentComponent: React.FC = ({ onFilterAdded(); } } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [closePopOver, field, value, filterManager, onFilterAdded]); const filterOutValue = useCallback(() => { @@ -117,7 +116,6 @@ const DraggableWrapperHoverContentComponent: React.FC = ({ onFilterAdded(); } } - // eslint-disable-next-line react-hooks/exhaustive-deps }, [closePopOver, field, value, filterManager, onFilterAdded]); const handleGoGetTimelineId = useCallback(() => { diff --git a/x-pack/plugins/security_solution/public/common/components/header_page/types.ts b/x-pack/plugins/security_solution/public/common/components/header_page/types.ts index 3c16af83585e9..3c45886e3c702 100644 --- a/x-pack/plugins/security_solution/public/common/components/header_page/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/header_page/types.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - +import type React from 'react'; export type TitleProp = string | React.ReactNode; export interface DraggableArguments { diff --git a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts index 828cadd90bb13..327c2fa64997d 100644 --- a/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts +++ b/x-pack/plugins/security_solution/public/common/components/matrix_histogram/types.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - +import type React from 'react'; import { EuiTitleSize } from '@elastic/eui'; import { ScaleType, Position, TickFormatter } from '@elastic/charts'; import { ActionCreator } from 'redux'; diff --git a/x-pack/plugins/security_solution/public/common/components/toasters/utils.ts b/x-pack/plugins/security_solution/public/common/components/toasters/utils.ts index 47c5588a12830..78509669443ab 100644 --- a/x-pack/plugins/security_solution/public/common/components/toasters/utils.ts +++ b/x-pack/plugins/security_solution/public/common/components/toasters/utils.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - +import type React from 'react'; import uuid from 'uuid'; import { isError } from 'lodash/fp'; diff --git a/x-pack/plugins/security_solution/public/common/store/types.ts b/x-pack/plugins/security_solution/public/common/store/types.ts index 6903567c752bc..189aa05b91f4b 100644 --- a/x-pack/plugins/security_solution/public/common/store/types.ts +++ b/x-pack/plugins/security_solution/public/common/store/types.ts @@ -158,7 +158,7 @@ export type CreateStructuredSelector = < >( selectorMap: SelectorMap ) => ( - state: SelectorMap[keyof SelectorMap] extends (state: infer State) => unknown ? State : never + state: SelectorMap[keyof SelectorMap] extends (state: infer S) => unknown ? S : never ) => { [Key in keyof SelectorMap]: ReturnType; }; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_histogram_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_histogram_panel/index.tsx index c96ef570c7e09..8900aa118d1cd 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_histogram_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_histogram_panel/index.tsx @@ -171,7 +171,6 @@ export const AlertsHistogramPanel = memo( value: bucket.key, })) : NO_LEGEND_DATA, - // eslint-disable-next-line react-hooks/exhaustive-deps [alertsData, selectedStackByOption.value, timelineId] ); diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx index 0315d513ee260..fcef88b3f189a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/timeline_actions/alert_context_menu.tsx @@ -203,6 +203,7 @@ const AlertContextMenuComponent: React.FC = ({ setEventsLoading, ]); + // eslint-disable-next-line react-hooks/exhaustive-deps const openAlertActionComponent = ( = ({ setEventsLoading, ]); + // eslint-disable-next-line react-hooks/exhaustive-deps const closeAlertActionComponent = ( = ({ setEventsLoading, ]); + // eslint-disable-next-line react-hooks/exhaustive-deps const inProgressAlertActionComponent = ( = ({ setOpenAddExceptionModal('endpoint'); }, [closePopover]); + // eslint-disable-next-line react-hooks/exhaustive-deps const addEndpointExceptionComponent = ( = ({ return !isMlRule(ruleType) && !isThresholdRule(ruleType); }, [ecsRowData]); + // eslint-disable-next-line react-hooks/exhaustive-deps const addExceptionComponent = ( { let isSubscribed = true; const abortCtrl = new AbortController(); @@ -96,8 +97,7 @@ export const useRules = ({ filterOptions.filter, filterOptions.sortField, filterOptions.sortOrder, - // eslint-disable-next-line react-hooks/exhaustive-deps - filterOptions.tags?.sort().join(), + filterTags, filterOptions.showCustomRules, filterOptions.showElasticRules, refetchPrePackagedRulesStatus, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/reducer.ts b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/reducer.ts index d603e5791f5ce..89fa34856a3f9 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/reducer.ts +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/all/reducer.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - +import type React from 'react'; import { EuiBasicTable } from '@elastic/eui'; import { FilterOptions, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx index 54aae5c41bd5f..d7cc389507463 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/rules/details/index.tsx @@ -281,7 +281,6 @@ export const RuleDetailsPageComponent: FC = ({ date={rule?.last_failure_at} /> ) : null, - // eslint-disable-next-line react-hooks/exhaustive-deps [rule, ruleDetailTab] ); diff --git a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx index 25b012ed68625..a37f256e359b9 100644 --- a/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx +++ b/x-pack/plugins/security_solution/public/management/pages/endpoint_hosts/view/index.tsx @@ -492,6 +492,7 @@ export const EndpointList = () => { ], }, ]; + // eslint-disable-next-line react-hooks/exhaustive-deps }, [formatUrl, queryParams, search, agentPolicies, services?.application?.getUrlForApp]); const renderTableOrEmptyState = useMemo(() => { diff --git a/x-pack/plugins/security_solution/public/overview/components/types.ts b/x-pack/plugins/security_solution/public/overview/components/types.ts index e260f2843692d..6aabf78788df0 100644 --- a/x-pack/plugins/security_solution/public/overview/components/types.ts +++ b/x-pack/plugins/security_solution/public/overview/components/types.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - +import type React from 'react'; export type OverviewStatId = | 'auditbeatAuditd' | 'auditbeatFIM' diff --git a/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts b/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts index 505e6cfc3ee72..a79ffda0bcce9 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/data/selectors.ts @@ -103,9 +103,8 @@ export const terminatedProcesses = createSelector(resolverTreeResponse, function * A function that given an entity id returns a boolean indicating if the id is in the set of terminated processes. */ export const isProcessTerminated = createSelector(terminatedProcesses, function ( - /* eslint-disable no-shadow */ + // eslint-disable-next-line @typescript-eslint/no-shadow terminatedProcesses - /* eslint-enable no-shadow */ ) { return (entityID: string) => { return terminatedProcesses.has(entityID); @@ -137,9 +136,8 @@ export const graphableProcesses = createSelector(resolverTreeResponse, function * The 'indexed process tree' contains the tree data, indexed in helpful ways. Used for O(1) access to stuff during graph layout. */ export const tree = createSelector(graphableProcesses, function indexedTree( - /* eslint-disable no-shadow */ + // eslint-disable-next-line @typescript-eslint/no-shadow graphableProcesses - /* eslint-enable no-shadow */ ) { return indexedProcessTreeModel.factory(graphableProcesses); }); @@ -248,9 +246,8 @@ export const relatedEventsByCategory: ( ) => (node: string, eventCategory: string) => SafeResolverEvent[] = createSelector( relatedEventsByEntityId, function ( - /* eslint-disable no-shadow */ + // eslint-disable-next-line @typescript-eslint/no-shadow relatedEventsByEntityId - /* eslint-enable no-shadow */ ) { // A map of nodeID -> event category -> SafeResolverEvent[] const nodeMap: Map> = new Map(); @@ -351,10 +348,9 @@ export const layout: (state: DataState) => IsometricTaxiLayout = createSelector( tree, originID, function processNodePositionsAndEdgeLineSegments( - /* eslint-disable no-shadow */ indexedProcessTree, + // eslint-disable-next-line @typescript-eslint/no-shadow originID - /* eslint-enable no-shadow */ ) { // use the isometric taxi layout as a base const taxiLayout = isometricTaxiLayoutModel.isometricTaxiLayoutFactory(indexedProcessTree); @@ -650,7 +646,7 @@ export const relatedEventCountOfTypeForNode: ( export const panelViewAndParameters = createSelector( (state: DataState) => state.locationSearch, resolverComponentInstanceID, - /* eslint-disable-next-line no-shadow */ + // eslint-disable-next-line @typescript-eslint/no-shadow (locationSearch, resolverComponentInstanceID) => { return panelViewAndParametersFromLocationSearchAndResolverComponentInstanceID({ locationSearch, @@ -670,7 +666,7 @@ export const nodeEventsInCategory = (state: DataState) => { export const lastRelatedEventResponseContainsCursor = createSelector( (state: DataState) => state.nodeEventsInCategory, panelViewAndParameters, - /* eslint-disable-next-line no-shadow */ + // eslint-disable-next-line @typescript-eslint/no-shadow function (nodeEventsInCategory, panelViewAndParameters) { if ( nodeEventsInCategory !== undefined && @@ -689,7 +685,7 @@ export const lastRelatedEventResponseContainsCursor = createSelector( export const hadErrorLoadingNodeEventsInCategory = createSelector( (state: DataState) => state.nodeEventsInCategory, panelViewAndParameters, - /* eslint-disable-next-line no-shadow */ + // eslint-disable-next-line @typescript-eslint/no-shadow function (nodeEventsInCategory, panelViewAndParameters) { if ( nodeEventsInCategory !== undefined && @@ -708,7 +704,7 @@ export const hadErrorLoadingNodeEventsInCategory = createSelector( export const isLoadingNodeEventsInCategory = createSelector( (state: DataState) => state.nodeEventsInCategory, panelViewAndParameters, - /* eslint-disable-next-line no-shadow */ + // eslint-disable-next-line @typescript-eslint/no-shadow function (nodeEventsInCategory, panelViewAndParameters) { const { panelView } = panelViewAndParameters; return panelView === 'nodeEventsInCategory' && nodeEventsInCategory === undefined; @@ -718,7 +714,7 @@ export const isLoadingNodeEventsInCategory = createSelector( export const isLoadingMoreNodeEventsInCategory = createSelector( (state: DataState) => state.nodeEventsInCategory, panelViewAndParameters, - /* eslint-disable-next-line no-shadow */ + // eslint-disable-next-line @typescript-eslint/no-shadow function (nodeEventsInCategory, panelViewAndParameters) { if ( nodeEventsInCategory !== undefined && diff --git a/x-pack/plugins/security_solution/public/resolver/store/selectors.ts b/x-pack/plugins/security_solution/public/resolver/store/selectors.ts index e805c16ed9c28..9a2ab53458a9c 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/selectors.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/selectors.ts @@ -257,10 +257,10 @@ export const relatedEventTotalForProcess = composeSelectors( * animated. So in order to get the currently visible entities, we need to pass in time. */ export const visibleNodesAndEdgeLines = createSelector(nodesAndEdgelines, boundingBox, function ( - /* eslint-disable no-shadow */ + /* eslint-disable @typescript-eslint/no-shadow */ nodesAndEdgelines, boundingBox - /* eslint-enable no-shadow */ + /* eslint-enable @typescript-eslint/no-shadow */ ) { // `boundingBox` and `nodesAndEdgelines` are each memoized. return (time: number) => nodesAndEdgelines(boundingBox(time)); diff --git a/x-pack/plugins/security_solution/public/resolver/store/ui/selectors.ts b/x-pack/plugins/security_solution/public/resolver/store/ui/selectors.ts index 6f185db4bd8b6..c60f92e4ba119 100644 --- a/x-pack/plugins/security_solution/public/resolver/store/ui/selectors.ts +++ b/x-pack/plugins/security_solution/public/resolver/store/ui/selectors.ts @@ -16,7 +16,7 @@ import { parameterName } from '../parameter_name'; */ export const ariaActiveDescendant = createSelector( (uiState: ResolverUIState) => uiState, - /* eslint-disable no-shadow */ + // eslint-disable-next-line @typescript-eslint/no-shadow ({ ariaActiveDescendant }) => { return ariaActiveDescendant; } @@ -27,7 +27,7 @@ export const ariaActiveDescendant = createSelector( */ export const selectedNode = createSelector( (uiState: ResolverUIState) => uiState, - /* eslint-disable no-shadow */ + // eslint-disable-next-line @typescript-eslint/no-shadow ({ selectedNode }: ResolverUIState) => { return selectedNode; } @@ -83,6 +83,7 @@ export const relatedEventsRelativeHrefs: ( ) => ( categories: Record | undefined, nodeID: string + // eslint-disable-next-line @typescript-eslint/no-shadow ) => Map = createSelector(relativeHref, (relativeHref) => { return (categories: Record | undefined, nodeID: string) => { const hrefsByCategory = new Map(); diff --git a/x-pack/plugins/security_solution/public/resolver/types.ts b/x-pack/plugins/security_solution/public/resolver/types.ts index 7129e3a47120a..6cb25861a7b58 100644 --- a/x-pack/plugins/security_solution/public/resolver/types.ts +++ b/x-pack/plugins/security_solution/public/resolver/types.ts @@ -5,7 +5,7 @@ */ /* eslint-disable no-duplicate-imports */ - +import type React from 'react'; import { Store } from 'redux'; import { Middleware, Dispatch } from 'redux'; import { BBox } from 'rbush'; diff --git a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts index 769a0a1658a46..4e7e99a5d3e49 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/open_timeline/types.ts @@ -4,7 +4,7 @@ * you may not use this file except in compliance with the Elastic License. */ -import { SetStateAction, Dispatch } from 'react'; +import type React from 'react'; import { AllTimelinesVariables } from '../../containers/all'; import { TimelineModel } from '../../store/timeline/model'; import { NoteResult } from '../../../graphql/types'; @@ -93,7 +93,9 @@ export type OnOpenTimeline = ({ }) => void; export type OnOpenDeleteTimelineModal = (selectedItem: OpenTimelineResult) => void; -export type SetActionTimeline = Dispatch>; +export type SetActionTimeline = React.Dispatch< + React.SetStateAction +>; export type EnableExportTimelineDownloader = (selectedItem: OpenTimelineResult) => void; /** Invoked when the user presses enters to submit the text in the search input */ export type OnQueryChange = (query: EuiSearchBarQuery) => void; diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.tsx b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.tsx index d4d77d6fd40a0..3ea7b8d471a44 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/helpers.tsx @@ -31,7 +31,7 @@ export const eventHasNotes = (noteIds: string[]): boolean => !isEmpty(noteIds); export const getPinTooltip = ({ isPinned, - // eslint-disable-next-line no-shadow + // eslint-disable-next-line @typescript-eslint/no-shadow eventHasNotes, timelineType, }: { diff --git a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts index c462841f7ea38..7efae14d58a97 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts +++ b/x-pack/plugins/security_solution/public/timelines/components/timeline/body/renderers/column_renderer.ts @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ - +import type React from 'react'; import { TimelineNonEcsData } from '../../../../../../common/search_strategy/timeline'; import { ColumnHeaderOptions } from '../../../../../timelines/store/timeline/model'; diff --git a/x-pack/plugins/stack_alerts/public/alert_types/geo_threshold/query_builder/expressions/boundary_index_expression.tsx b/x-pack/plugins/stack_alerts/public/alert_types/geo_threshold/query_builder/expressions/boundary_index_expression.tsx index 55dfc82bdbdb8..6433845370ff7 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/geo_threshold/query_builder/expressions/boundary_index_expression.tsx +++ b/x-pack/plugins/stack_alerts/public/alert_types/geo_threshold/query_builder/expressions/boundary_index_expression.tsx @@ -36,10 +36,12 @@ export const BoundaryIndexExpression: FunctionComponent = ({ setBoundaryGeoField, setBoundaryNameField, }) => { + // eslint-disable-next-line react-hooks/exhaustive-deps const BOUNDARY_NAME_ENTITY_TYPES = ['string', 'number', 'ip']; const { dataUi, dataIndexPatterns, http } = alertsContext; const IndexPatternSelect = (dataUi && dataUi.IndexPatternSelect) || null; const { boundaryGeoField } = alertParams; + // eslint-disable-next-line react-hooks/exhaustive-deps const nothingSelected: IFieldType = { name: '', type: 'string', diff --git a/x-pack/plugins/stack_alerts/public/alert_types/geo_threshold/query_builder/expressions/entity_by_expression.tsx b/x-pack/plugins/stack_alerts/public/alert_types/geo_threshold/query_builder/expressions/entity_by_expression.tsx index f519ad882802c..0cff207e674e5 100644 --- a/x-pack/plugins/stack_alerts/public/alert_types/geo_threshold/query_builder/expressions/entity_by_expression.tsx +++ b/x-pack/plugins/stack_alerts/public/alert_types/geo_threshold/query_builder/expressions/entity_by_expression.tsx @@ -28,6 +28,7 @@ export const EntityByExpression: FunctionComponent = ({ indexFields, isInvalid, }) => { + // eslint-disable-next-line react-hooks/exhaustive-deps const ENTITY_TYPES = ['string', 'number', 'ip']; const usePrevious = (value: T): T | undefined => { diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_modal.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_modal.tsx index de27256bf566c..a2a2d1234dbcd 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_modal.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/connector_add_modal.tsx @@ -57,6 +57,7 @@ export const ConnectorAddModal = ({ consumer, }: ConnectorAddModalProps) => { let hasErrors = false; + // eslint-disable-next-line react-hooks/exhaustive-deps const initialConnector = { actionTypeId: actionType.id, config: {}, diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.tsx index 89deb4b26f012..741cbadb07070 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/alert_form/alert_add.tsx @@ -36,6 +36,7 @@ export const AlertAdd = ({ alertTypeId, initialValues, }: AlertAddProps) => { + // eslint-disable-next-line react-hooks/exhaustive-deps const initialAlert = ({ params: {}, consumer, diff --git a/x-pack/test/saved_object_api_integration/common/lib/saved_object_test_utils.ts b/x-pack/test/saved_object_api_integration/common/lib/saved_object_test_utils.ts index 511d183145a30..c9d84d9819c6f 100644 --- a/x-pack/test/saved_object_api_integration/common/lib/saved_object_test_utils.ts +++ b/x-pack/test/saved_object_api_integration/common/lib/saved_object_test_utils.ts @@ -332,7 +332,7 @@ export const getTestScenarios = (modifiers?: T[]) => { }, ]; if (modifiers) { - const addModifier = (list: T[]) => + const addModifier = (list: U[]) => list.map((x) => modifiers.map((modifier) => ({ ...x, modifier }))).flat(); spaces = addModifier(spaces); security = addModifier(security); diff --git a/yarn.lock b/yarn.lock index f2b4147fc3c9b..bab1c0dbbf3cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4587,11 +4587,6 @@ "@types/cheerio" "*" "@types/react" "*" -"@types/eslint-visitor-keys@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" - integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== - "@types/eslint@^6.1.3": version "6.1.3" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-6.1.3.tgz#ec2a66e445a48efaa234020eb3b6e8f06afc9c61" @@ -5965,26 +5960,28 @@ resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.0.tgz#8b63ab7f1aa5321248aad5ac890a485656dcea4d" integrity sha512-te5lMAWii1uEJ4FwLjzdlbw3+n0FZNOvFXHxQDKeT0dilh7HOzdMzV2TrJVUzq8ep7J4Na8OUYPRLSQkJHAlrg== -"@typescript-eslint/eslint-plugin@^3.10.0": - version "3.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.10.0.tgz#40fd53e81639c0d1a515b44e5fdf4c03dfd3cd39" - integrity sha512-Bbeg9JAnSzZ85Y0gpInZscSpifA6SbEgRryaKdP5ZlUjhTKsvZS4GUIE6xAZCjhNTrf4zXXsySo83ZdHL7it0w== +"@typescript-eslint/eslint-plugin@^4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.8.1.tgz#b362abe0ee478a6c6d06c14552a6497f0b480769" + integrity sha512-d7LeQ7dbUrIv5YVFNzGgaW3IQKMmnmKFneRWagRlGYOSfLJVaRbj/FrBNOBC1a3tVO+TgNq1GbHvRtg1kwL0FQ== dependencies: - "@typescript-eslint/experimental-utils" "3.10.0" + "@typescript-eslint/experimental-utils" "4.8.1" + "@typescript-eslint/scope-manager" "4.8.1" debug "^4.1.1" functional-red-black-tree "^1.0.1" regexpp "^3.0.0" semver "^7.3.2" tsutils "^3.17.1" -"@typescript-eslint/experimental-utils@3.10.0": - version "3.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-3.10.0.tgz#f97a669a84a78319ab324cd51169d0c52853a360" - integrity sha512-e5ZLSTuXgqC/Gq3QzK2orjlhTZVXzwxDujQmTBOM1NIVBZgW3wiIZjaXuVutk9R4UltFlwC9UD2+bdxsA7yyNg== +"@typescript-eslint/experimental-utils@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.8.1.tgz#27275c20fa4336df99ebcf6195f7d7aa7aa9f22d" + integrity sha512-WigyLn144R3+lGATXW4nNcDJ9JlTkG8YdBWHkDlN0lC3gUGtDi7Pe3h5GPvFKMcRz8KbZpm9FJV9NTW8CpRHpg== dependencies: "@types/json-schema" "^7.0.3" - "@typescript-eslint/types" "3.10.0" - "@typescript-eslint/typescript-estree" "3.10.0" + "@typescript-eslint/scope-manager" "4.8.1" + "@typescript-eslint/types" "4.8.1" + "@typescript-eslint/typescript-estree" "4.8.1" eslint-scope "^5.0.0" eslint-utils "^2.0.0" @@ -6000,16 +5997,15 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" -"@typescript-eslint/parser@^3.10.0": - version "3.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-3.10.0.tgz#820322d990a82265a78f4c1fc9aae03ce95b76ac" - integrity sha512-iJyf3f2HVwscvJR7ySGMXw2DJgIAPKEz8TeU17XVKzgJRV4/VgCeDFcqLzueRe7iFI2gv+Tln4AV88ZOnsCNXg== +"@typescript-eslint/parser@^4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.8.1.tgz#4fe2fbdbb67485bafc4320b3ae91e34efe1219d1" + integrity sha512-QND8XSVetATHK9y2Ltc/XBl5Ro7Y62YuZKnPEwnNPB8E379fDsvzJ1dMJ46fg/VOmk0hXhatc+GXs5MaXuL5Uw== dependencies: - "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "3.10.0" - "@typescript-eslint/types" "3.10.0" - "@typescript-eslint/typescript-estree" "3.10.0" - eslint-visitor-keys "^1.1.0" + "@typescript-eslint/scope-manager" "4.8.1" + "@typescript-eslint/types" "4.8.1" + "@typescript-eslint/typescript-estree" "4.8.1" + debug "^4.1.1" "@typescript-eslint/scope-manager@4.3.0": version "4.3.0" @@ -6019,29 +6015,23 @@ "@typescript-eslint/types" "4.3.0" "@typescript-eslint/visitor-keys" "4.3.0" -"@typescript-eslint/types@3.10.0": - version "3.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.0.tgz#b81906674eca94a884345ba0bc1aaf6cd4da912a" - integrity sha512-ktUWSa75heQNwH85GRM7qP/UUrXqx9d6yIdw0iLO9/uE1LILW+i+3+B64dUodUS2WFWLzKTlwfi9giqrODibWg== +"@typescript-eslint/scope-manager@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.8.1.tgz#e343c475f8f1d15801b546cb17d7f309b768fdce" + integrity sha512-r0iUOc41KFFbZdPAdCS4K1mXivnSZqXS5D9oW+iykQsRlTbQRfuFRSW20xKDdYiaCoH+SkSLeIF484g3kWzwOQ== + dependencies: + "@typescript-eslint/types" "4.8.1" + "@typescript-eslint/visitor-keys" "4.8.1" "@typescript-eslint/types@4.3.0": version "4.3.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.3.0.tgz#1f0b2d5e140543e2614f06d48fb3ae95193c6ddf" integrity sha512-Cx9TpRvlRjOppGsU6Y6KcJnUDOelja2NNCX6AZwtVHRzaJkdytJWMuYiqi8mS35MRNA3cJSwDzXePfmhU6TANw== -"@typescript-eslint/typescript-estree@3.10.0": - version "3.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-3.10.0.tgz#65df13579a5e53c12afb4f1c5309589e3855a5de" - integrity sha512-yjuY6rmVHRhcUKgXaSPNVloRueGWpFNhxR5EQLzxXfiFSl1U/+FBqHhbaGwtPPEgCSt61QNhZgiFjWT27bgAyw== - dependencies: - "@typescript-eslint/types" "3.10.0" - "@typescript-eslint/visitor-keys" "3.10.0" - debug "^4.1.1" - glob "^7.1.6" - is-glob "^4.0.1" - lodash "^4.17.15" - semver "^7.3.2" - tsutils "^3.17.1" +"@typescript-eslint/types@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.8.1.tgz#23829c73c5fc6f4fcd5346a7780b274f72fee222" + integrity sha512-ave2a18x2Y25q5K05K/U3JQIe2Av4+TNi/2YuzyaXLAsDx6UZkz1boZ7nR/N6Wwae2PpudTZmHFXqu7faXfHmA== "@typescript-eslint/typescript-estree@4.3.0": version "4.3.0" @@ -6057,6 +6047,20 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.8.1.tgz#7307e3f2c9e95df7daa8dc0a34b8c43b7ec0dd32" + integrity sha512-bJ6Fn/6tW2g7WIkCWh3QRlaSU7CdUUK52shx36/J7T5oTQzANvi6raoTsbwGM11+7eBbeem8hCCKbyvAc0X3sQ== + dependencies: + "@typescript-eslint/types" "4.8.1" + "@typescript-eslint/visitor-keys" "4.8.1" + debug "^4.1.1" + globby "^11.0.1" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/typescript-estree@^1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz#5d6d49be936e96fb0f859673480f89b070a5dd9b" @@ -6065,13 +6069,6 @@ lodash.unescape "4.0.1" semver "5.5.0" -"@typescript-eslint/visitor-keys@3.10.0": - version "3.10.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-3.10.0.tgz#6c0cac867e705a42e2c71b359bf6a10a88a28985" - integrity sha512-g4qftk8lWb/rHZe9uEp8oZSvsJhUvR2cfp7F7qE6DyUD2SsovEs8JDQTRP1xHzsD+pERsEpYNqkDgQXW6+ob5A== - dependencies: - eslint-visitor-keys "^1.1.0" - "@typescript-eslint/visitor-keys@4.3.0": version "4.3.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.3.0.tgz#0e5ab0a09552903edeae205982e8521e17635ae0" @@ -6080,6 +6077,14 @@ "@typescript-eslint/types" "4.3.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.8.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.8.1.tgz#794f68ee292d1b2e3aa9690ebedfcb3a8c90e3c3" + integrity sha512-3nrwXFdEYALQh/zW8rFwP4QltqsanCDz4CwWMPiIZmwlk9GlvBeueEIbq05SEq4ganqM0g9nh02xXgv5XI3PeQ== + dependencies: + "@typescript-eslint/types" "4.8.1" + eslint-visitor-keys "^2.0.0" + "@webassemblyjs/ast@1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" @@ -12800,10 +12805,10 @@ eslint-plugin-prettier@^3.1.4: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-react-hooks@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.0.4.tgz#aed33b4254a41b045818cacb047b81e6df27fa58" - integrity sha512-equAdEIsUETLFNCmmCkiCGq6rkSK5MoJhXFPFYeUebcjKgBmWWcgVOqZyQC8Bv1BwVCnTq9tBxgJFgAJTWoJtA== +eslint-plugin-react-hooks@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.2.0.tgz#8c229c268d468956334c943bb45fc860280f5556" + integrity sha512-623WEiZJqxR7VdxFCKLI6d6LLpwJkGPYKODnkH3D7WpOG5KM8yWueBd8TLsNAetEJNF5iJmolaAKO3F8yzyVBQ== eslint-plugin-react-perf@^3.2.3: version "3.2.3"