Skip to content

Commit

Permalink
more linted files
Browse files Browse the repository at this point in the history
  • Loading branch information
rshen91 committed Feb 13, 2023
1 parent d109c07 commit 0ef4850
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 13 deletions.
1 change: 1 addition & 0 deletions src/plugins/kibana_react/public/router/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import React, { useMemo } from 'react';
import {
// eslint-disable-next-line no-restricted-imports
Route as ReactRouterRoute,
RouteComponentProps,
RouteProps,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

import React, { Fragment } from 'react';
// eslint-disable-next-line no-restricted-imports
import { Route } from 'react-router-dom';
import { FormattedMessage } from '@kbn/i18n-react';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import React, { Component, Fragment } from 'react';
import { i18n } from '@kbn/i18n';
import { METRIC_TYPE } from '@kbn/analytics';
import { FormattedMessage } from '@kbn/i18n-react';
// eslint-disable-next-line no-restricted-imports
import { Route } from 'react-router-dom';
import qs from 'query-string';

Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/infra/public/apps/logs_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import { History } from 'history';
import { CoreStart } from '@kbn/core/public';
import React from 'react';
import ReactDOM from 'react-dom';
import { Route, Router, Switch } from 'react-router-dom';
import { Router, Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { AppMountParameters } from '@kbn/core/public';
import { Storage } from '@kbn/kibana-utils-plugin/public';
import '../index.scss';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import { render, waitFor } from '@testing-library/react';
import { createMemoryHistory } from 'history';
import React from 'react';
import { Route, Router, Switch } from 'react-router-dom';
import { Router, Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { httpServiceMock } from '@kbn/core/public/mocks';
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
import { KibanaPageTemplate } from '@kbn/shared-ux-page-kibana-template';
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/infra/public/pages/link_to/link_to_logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
*/

import React from 'react';
import { match as RouteMatch, Redirect, Route, Switch } from 'react-router-dom';
import { match as RouteMatch, Redirect, Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';

import { RedirectToLogs } from './redirect_to_logs';
import { RedirectToNodeLogs } from './redirect_to_node_logs';
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/infra/public/pages/logs/page_content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import { EuiHeaderLink, EuiHeaderLinks } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React, { useContext } from 'react';
import { Route, Switch } from 'react-router-dom';
import { Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { HeaderMenuPortal, useLinkProps } from '@kbn/observability-plugin/public';
import { AlertDropdown } from '../../alerting/log_threshold';
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/infra/public/pages/metrics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import { i18n } from '@kbn/i18n';

import React, { useContext } from 'react';
import { Route, RouteComponentProps, Switch } from 'react-router-dom';
import { RouteComponentProps, Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';

import { EuiErrorBoundary, EuiHeaderLinks, EuiHeaderLink } from '@elastic/eui';
import { useKibana } from '@kbn/kibana-react-plugin/public';
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/license_management/public/application/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import React, { useEffect } from 'react';
import { FormattedMessage } from '@kbn/i18n-react';
import { LicenseDashboard, UploadLicense } from './sections';
import { Switch, Route } from 'react-router-dom';
import { Switch } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { APP_PERMISSION } from '../../common/constants';
import { SectionLoading, useExecutionContext } from '../shared_imports';
import {
Expand Down
3 changes: 2 additions & 1 deletion x-pack/plugins/logstash/public/application/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

import React from 'react';
import ReactDOM from 'react-dom';
import { Router, Route, Switch, Redirect } from 'react-router-dom';
import { Router, Switch, Redirect } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { Observable } from 'rxjs';
import { first } from 'rxjs/operators';

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

import React, { useEffect } from 'react';
import { act, renderHook } from '@testing-library/react-hooks';
import { Route, Router } from 'react-router-dom';
import { Router } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { render } from '@testing-library/react';
import { UrlStorageContextProvider, useSeriesStorage, reportTypeKey } from './use_series_storage';
import { getHistoryFromUrl } from '../rtl_helpers';
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/remote_clusters/public/application/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
// eslint-disable-next-line no-restricted-imports
import { Switch, Route, Redirect, Router } from 'react-router-dom';

import { UIM_APP_LOAD } from './constants';
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/rollup/public/crud_app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
// eslint-disable-next-line no-restricted-imports
import { Router, Switch, Route, Redirect, withRouter } from 'react-router-dom';

import { UIM_APP_LOAD } from '../../common';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@

import React from 'react';
import { render, unmountComponentAtNode } from 'react-dom';
import { Route, Router, useParams } from 'react-router-dom';
import { Router, useParams } from 'react-router-dom';

import type { StartServicesAccessor } from '@kbn/core/public';
import { i18n } from '@kbn/i18n';
import { KibanaContextProvider, KibanaThemeProvider } from '@kbn/kibana-react-plugin/public';
import type { RegisterManagementAppArgs } from '@kbn/management-plugin/public';
import { Route } from '@kbn/shared-ux-router';

import {
Breadcrumb,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { defaultCore, WrappedHelper } from '../../../utils/testing/rtl_helpers';
import { renderHook } from '@testing-library/react-hooks';
import { useMonitorName } from './use_monitor_name';

// eslint-disable-next-line no-restricted-imports
import * as reactRouter from 'react-router-dom';

const mockRouter = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import React from 'react';
import moment from 'moment';
import { screen } from '@testing-library/react';
import { render } from '../../lib/helper/rtl_helpers';
// eslint-disable-next-line no-restricted-imports
import * as reactRouterDom from 'react-router-dom';

import { Ping } from '../../../../common/runtime_types';
import { MonitorPageTitle, MonitorPageTitleContent } from './monitor_title';

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

import { ChromeBreadcrumb } from '@kbn/core/public';
import React from 'react';
import { Route } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';

import { of } from 'rxjs';
import { render } from '../../../../lib/helper/rtl_helpers';
import { useMonitorBreadcrumb } from './use_monitor_breadcrumb';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
*/

import React from 'react';
import ReactRouterDom, { Route } from 'react-router-dom';
import ReactRouterDom from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { fireEvent, screen } from '@testing-library/dom';
import { renderHook, act as hooksAct } from '@testing-library/react-hooks';
import { createMemoryHistory } from 'history';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { ChromeBreadcrumb } from '@kbn/core/public';
import React from 'react';
import { Route } from 'react-router-dom';
import { Route } from '@kbn/shared-ux-router';
import { mountWithRouter } from '../lib';
import { OVERVIEW_ROUTE } from '../../../common/constants';
import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import moment from 'moment';
import { Moment } from 'moment-timezone';
import * as redux from 'react-redux';
// eslint-disable-next-line no-restricted-imports
import * as reactRouterDom from 'react-router-dom';

export function mockMoment() {
Expand Down

0 comments on commit 0ef4850

Please sign in to comment.