Skip to content

Commit

Permalink
chore: run linter through the all ui
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyNenashev committed Oct 3, 2023
1 parent 949cfed commit 5580f1f
Show file tree
Hide file tree
Showing 229 changed files with 339 additions and 349 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { type AppTabItem, AppTabs } from 'components/shared/elements';
import { type ActivityCountInfo, ActivityType } from 'generated-sources';
import { useQueryParams } from 'lib/hooks';
import {
type ActivityQuery,
defaultActivityQuery,
} from 'components/shared/elements/Activity/common';
import { useTranslation } from 'react-i18next';

interface ActivityTabsProps {
counts: ActivityCountInfo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Grid, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { Button } from 'components/shared/elements';
import { fetchDataSourcesList, fetchNamespaceList } from 'redux/thunks';
import { useAppDispatch, useAppSelector } from 'redux/lib/hooks';
Expand All @@ -15,7 +16,6 @@ import {
type ActivityQuery,
defaultActivityQuery,
} from 'components/shared/elements/Activity/common';
import { useTranslation } from 'react-i18next';
import * as S from './FiltersStyles';

const Filters: React.FC = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { toolbarHeight } from 'lib/constants';
import styled from 'styled-components';
import { toolbarHeight } from 'lib/constants';

export const Container = styled('div')(({ theme }) => ({
padding: theme.spacing(2, 1, 1.5, 1),
Expand Down
2 changes: 1 addition & 1 deletion odd-platform-ui/src/components/Alerts/Alerts.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { useAppDispatch, useAppSelector } from 'redux/lib/hooks';
import { fetchAlertsTotals } from 'redux/thunks';
import { getAlertsTotals, getOwnership } from 'redux/selectors';
import { ListLayout } from 'components/shared/elements';
import { useTranslation } from 'react-i18next';
import AlertsTabs from './AlertsTabs/AlertsTabs';
import AlertsRoutes from './AlertsRoutes/AlertsRoutes';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { Collapse, Grid, Typography } from '@mui/material';
import type { Alert } from 'redux/interfaces';
import { AlertStatus, Permission, PermissionResourceType } from 'generated-sources';
import { useAppDispatch, useAppSelector } from 'redux/lib/hooks';
import { fetchResourcePermissions, updateAlertStatus } from 'redux/thunks';
import { useAppDateTime, useAppPaths } from 'lib/hooks';
import { Collapse, Grid, Typography } from '@mui/material';
import { GearIcon, UserIcon } from 'components/shared/icons';
import { AlertStatusItem, Button, EntityClassItem } from 'components/shared/elements';
import { alertTitlesMap } from 'lib/constants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import InfiniteScroll from 'react-infinite-scroll-component';
import { Grid } from '@mui/material';
import { type AsyncThunk } from '@reduxjs/toolkit';
import {
type AlertApiGetAllAlertsRequest,
type AlertApiGetAssociatedUserAlertsRequest,
Expand All @@ -16,8 +18,6 @@ import {
getAlerts,
} from 'redux/selectors';
import { AppErrorPage, EmptyContentPlaceholder } from 'components/shared/elements';
import { Grid } from '@mui/material';
import { type AsyncThunk } from '@reduxjs/toolkit';
import { useAppDispatch, useAppSelector } from 'redux/lib/hooks';
import type { AlertsResponse } from 'redux/interfaces';
import DataEntityAlertsSkeleton from '../../DataEntityDetails/DataEntityAlerts/DataEntityAlertItem/DataEntityAlertsSkeleton';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { type AppTabItem, AppTabs } from 'components/shared/elements';
import { changeAlertsFilterAction } from 'redux/slices/alerts.slice';
import { useAppParams, useAppPaths } from 'lib/hooks';
import { useAppDispatch } from 'redux/lib/hooks';
import type { AlertTotals } from 'generated-sources';
import { useTranslation } from 'react-i18next';

interface AlertsTabsProps {
totals: AlertTotals;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { useNavigate } from 'react-router-dom';
import { useAppDispatch, useAppSelector } from 'redux/lib/hooks';
import {
getDataEntityMessage,
Expand All @@ -9,7 +10,6 @@ import {
} from 'redux/selectors';
import { fetchRelatedMessages, messagesListSize as size } from 'redux/thunks';
import { useAppParams, useAppPaths } from 'lib/hooks';
import { useNavigate } from 'react-router-dom';
import { clearThreadState } from 'redux/slices/dataCollaboration.slice';
import ThreadContent from './ThreadContent/ThreadContent';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { Grid, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { AppAvatar, Button, WithFeature } from 'components/shared/elements';
import { type Message } from 'redux/interfaces';
import { Feature } from 'generated-sources';
import { useTranslation } from 'react-i18next';
import * as S from './MainThreadMessageStyles';

interface MainThreadMessageProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import { type Message } from 'redux/interfaces';
import { Grid, Typography } from '@mui/material';
import InfiniteScroll from 'react-infinite-scroll-component';
import { useTranslation } from 'react-i18next';
import { type Message } from 'redux/interfaces';
import { Button, EmptyContentPlaceholder } from 'components/shared/elements';
import { ClearIcon } from 'components/shared/icons';
import { useAppPaths } from 'lib/hooks';
import InfiniteScroll from 'react-infinite-scroll-component';
import { useTranslation } from 'react-i18next';
import ThreadMessage from './ThreadMessage/ThreadMessage';
import MainThreadMessage from './MainThreadMessage/MainThreadMessage';
import ThreadMessageSkeleton from './ThreadMessage/ThreadMessageSkeleton';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Grid, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { Button } from 'components/shared/elements';
import { ActivityEventType } from 'generated-sources';
import {
Expand All @@ -12,7 +13,6 @@ import {
type ActivityQuery,
defaultActivityQuery,
} from 'components/shared/elements/Activity/common';
import { useTranslation } from 'react-i18next';
import * as S from './FiltersStyles';

const Filters: React.FC = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Grid } from '@mui/material';
import { activitySidebarWidth } from 'lib/constants';
import styled from 'styled-components';
import { activitySidebarWidth } from 'lib/constants';

export const Container = styled(Grid)(({ theme }) => ({
width: '100%',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react';
import { Collapse, Grid, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import type { Alert } from 'redux/interfaces';
import { AlertStatus, Permission } from 'generated-sources';
import { useAppDateTime, useAppParams } from 'lib/hooks';
import { updateAlertStatus } from 'redux/thunks';
import { useAppDispatch } from 'redux/lib/hooks';
import { Collapse, Grid, Typography } from '@mui/material';
import { AlertStatusItem, Button } from 'components/shared/elements';
import { WithPermissions } from 'components/shared/contexts';
import { GearIcon, UserIcon } from 'components/shared/icons';
import { alertTitlesMap } from 'lib/constants';
import { useTranslation } from 'react-i18next';
import * as S from './DataEntityAlertItemStyles';

interface DataEntityAlertItemProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React from 'react';
import { Grid } from '@mui/material';
import InfiniteScroll from 'react-infinite-scroll-component';
import { useTranslation } from 'react-i18next';
import { Permission } from 'generated-sources';
import { useAppDispatch, useAppSelector } from 'redux/lib/hooks';
import {
Expand All @@ -16,8 +18,6 @@ import {
import { WithPermissions } from 'components/shared/contexts';
import { fetchDataEntityAlerts } from 'redux/thunks';
import { useAppParams } from 'lib/hooks';
import InfiniteScroll from 'react-infinite-scroll-component';
import { useTranslation } from 'react-i18next';
import DataEntityAlertsSkeleton from './DataEntityAlertItem/DataEntityAlertsSkeleton';
import NotificationSettings from './NotificationSettings/NotificationSettings';
import DataEntityAlertItem from './DataEntityAlertItem/DataEntityAlertItem';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { FormControlLabel, Grid, RadioGroup, Typography } from '@mui/material';
import { Button, AppRadio, AppSwitch } from 'components/shared/elements';
import { useController, type UseControllerProps } from 'react-hook-form';
import { Button, AppRadio, AppSwitch } from 'components/shared/elements';
import { useAppSelector } from 'redux/lib/hooks';
import { getDataEntityAlertConfig } from 'redux/selectors';
import { useAppDateTime, useAppParams } from 'lib/hooks';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import React from 'react';
import { useForm } from 'react-hook-form';
import { Grid, Typography } from '@mui/material';
import { useAppDispatch, useAppSelector } from 'redux/lib/hooks';
import { useAppParams } from 'lib/hooks';
import { type DataEntityApiUpdateAlertConfigRequest } from 'generated-sources';
Expand All @@ -7,9 +9,7 @@ import {
getDataEntityAlertsConfigUpdatingError,
getDataEntityAlertsConfigUpdatingStatus,
} from 'redux/selectors';
import { useForm } from 'react-hook-form';
import { fetchDataEntityAlertsConfig, updateDataEntityAlertsConfig } from 'redux/thunks';
import { Grid, Typography } from '@mui/material';
import { Button, AppCircularProgress, DialogWrapper } from 'components/shared/elements';
import type { SerializeDateToNumber } from 'redux/interfaces';
import AlertTypeRange from './AlertTypeRange/AlertTypeRange';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Grid, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import {
Button,
EntityClassItem,
Expand All @@ -15,7 +16,6 @@ import { AddIcon, EditIcon, SlackIcon, TimeGapIcon } from 'components/shared/ico
import { useAppDateTime } from 'lib/hooks';
import { useAppSelector } from 'redux/lib/hooks';
import { getIsDataEntityBelongsToClass, getIsEntityStatusDeleted } from 'redux/selectors';
import { useTranslation } from 'react-i18next';
import DataEntityGroupForm from '../DataEntityGroup/DataEntityGroupForm/DataEntityGroupForm';
import CreateMessageForm from '../DataCollaboration/CreateMessageForm/CreateMessageForm';
import InternalNameFormDialog from '../InternalNameFormDialog/InternalNameFormDialog';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { maxContentWidthWithoutSidebar } from 'lib/constants';
import styled from 'styled-components';
import { maxContentWidthWithoutSidebar } from 'lib/constants';

export const Container = styled('div')(({ theme }) => ({
margin: '0 auto',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { type AppTabItem, AppTabs } from 'components/shared/elements';
import { useAppParams, useAppPaths, useQueryParams } from 'lib/hooks';
import {
Expand All @@ -13,7 +14,6 @@ import {
type ActivityQuery,
defaultActivityQuery,
} from 'components/shared/elements/Activity/common';
import { useTranslation } from 'react-i18next';
import { defaultLineageQuery } from '../Lineage/HierarchyLineage/lineageLib/constants';
import { defaultDEGLineageQuery } from '../Lineage/DEGLineage/lib/constants';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { type FC } from 'react';
import { useAtom } from 'jotai';
import { useAppParams, useQueryParams } from 'lib/hooks';
import { useAppSelector } from 'redux/lib/hooks';
import { getDatasetVersions } from 'redux/selectors';
Expand All @@ -9,7 +10,6 @@ import {
EmptyContentPlaceholder,
} from 'components/shared/elements';
import type { ErrorState } from 'redux/interfaces';
import { useAtom } from 'jotai';
import { showOnlyChangesAtom } from './lib/atoms';
import DatasetStructureCompareList from './DatasetStructureCompareList/DatasetStructureCompareList';
import type { StructureCompareQueryParams } from './lib/interfaces';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { type FC, useCallback } from 'react';
import type { SelectChangeEvent } from '@mui/material';
import { Box, FormControlLabel, Grid, Typography } from '@mui/material';
import { useNavigate } from 'react-router-dom';
import { useAtom } from 'jotai';
import { Button, Checkbox, AppMenuItem, AppSelect } from 'components/shared/elements';
import { useAppDateTime, useAppParams, useAppPaths, useQueryParams } from 'lib/hooks';
import { useNavigate } from 'react-router-dom';
import type { DataSetVersion } from 'generated-sources';
import { useAtom } from 'jotai';
import { showOnlyChangesAtom } from '../lib/atoms';
import { defaultStructureCompareQuery } from '../lib/constants';
import type { StructureCompareQueryParams } from '../lib/interfaces';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useEffect } from 'react';
import { Box } from '@mui/material';
import { useNavigate } from 'react-router-dom';
import { fetchDataSetStructure, fetchDataSetStructureLatest } from 'redux/thunks';
import {
getDatasetStats,
Expand All @@ -14,7 +15,6 @@ import {
import { AppErrorPage, EmptyContentPlaceholder } from 'components/shared/elements';
import { useAppParams, useAppPaths } from 'lib/hooks';
import { useAppDispatch, useAppSelector } from 'redux/lib/hooks';
import { useNavigate } from 'react-router-dom';
import DatasetStructureOverviewProvider from './lib/DatasetStructureOverviewProvider';
import DatasetStructureSkeleton from './DatasetStructureSkeleton/DatasetStructureSkeleton';
import DatasetStructureView from './DatasetStructureView/DatasetStructureView';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { type FC } from 'react';
import { Markdown } from 'components/shared/elements';
import { Typography } from '@mui/material';
import { Markdown } from 'components/shared/elements';

interface DatasetFieldDescriptionPreviewProps {
isDescriptionEmpty: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import type { MetricFamily as MetricFamilyType } from 'generated-sources';
import { Grid, Typography } from '@mui/material';
import { AppCircularProgress, MetricFamily } from 'components/shared/elements';
import { useTranslation } from 'react-i18next';
import type { MetricFamily as MetricFamilyType } from 'generated-sources';
import { AppCircularProgress, MetricFamily } from 'components/shared/elements';
import * as S from '../DatasetFieldOverview.styles';

interface DatasetFieldMetricsProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Grid, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { WithPermissions } from 'components/shared/contexts';
import type { DataSetField } from 'generated-sources';
import { Permission } from 'generated-sources';
Expand All @@ -9,7 +10,6 @@ import { useAppDispatch, useAppSelector } from 'redux/lib/hooks';
import { getDatasetFieldEnums, getDatasetFieldEnumsFetchingError } from 'redux/selectors';
import { resetLoaderByAction } from 'redux/slices/loader.slice';
import { fetchDataSetFieldEnumActionType } from 'redux/actions';
import { useTranslation } from 'react-i18next';
import * as S from '../DatasetFieldOverview.styles';
import DatasetFieldEnumsForm from '../DatasetFieldEnumsForm/DatasetFieldEnumsForm';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from 'react';
import { Grid, Typography } from '@mui/material';
import round from 'lodash/round';
import { useTranslation } from 'react-i18next';
import type { DataSetFormattedStats, DataSetFormattedStatsKeys } from 'redux/interfaces';
import { DatasetStatsLabelMap } from 'redux/interfaces';
import { LabeledInfoItem, NumberFormatted } from 'components/shared/elements';
import type { DataSetField, DataSetStats } from 'generated-sources';
import { DataSetFieldTypeTypeEnum } from 'generated-sources';
import round from 'lodash/round';
import { useAppDateTime } from 'lib/hooks';
import { useTranslation } from 'react-i18next';
import * as S from './DatasetField.styles';

interface DatasetFieldStatsProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { type FC, useCallback } from 'react';
import { Grid, Typography } from '@mui/material';
import { useTranslation } from 'react-i18next';
import { Button } from 'components/shared/elements';
import { WithPermissions } from 'components/shared/contexts';
import type { DataSetField, LinkedTerm } from 'generated-sources';
Expand All @@ -9,7 +10,6 @@ import {
addDatasetFieldTerm,
deleteDatasetFieldTerm,
} from 'redux/slices/datasetStructure.slice';
import { useTranslation } from 'react-i18next';
import * as S from '../DatasetFieldOverview.styles';
import TermItem from './TermItem/TermItem';
import AssignFieldTermForm from './AssignFieldTermForm/AssignFieldTermForm';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React, { type FC, useCallback } from 'react';
import { Box } from '@mui/material';
import { Permission, type TermRef } from 'generated-sources';
import { WithPermissions } from 'components/shared/contexts';
import { Button, CollapsibleInfoContainer, InfoItem } from 'components/shared/elements';
import { DeleteIcon, LinkedTermIcon } from 'components/shared/icons';
import { useAppPaths, useDeleteDatasetFieldTerm } from 'lib/hooks';
import { Box } from '@mui/material';

interface TermItemProps {
name: TermRef['name'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@ const DatasetStructureHeader: FC = () => {
handleSearch(searchQuery);
}, [handleSearch, searchQuery]);

const clearSearchField = useCallback(() => {
setSearchQuery('');
}, [setSearchQuery]);

return (
<Grid
p={2}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import type { DataSetFieldTypeTypeEnum } from 'generated-sources';
import { DatasetTypeLabelMap } from 'redux/interfaces';
import type { BoxProps } from '@mui/material';
import { Typography } from '@mui/material';
import round from 'lodash/round';
import { DatasetTypeLabelMap } from 'redux/interfaces';
import type { DataSetFieldTypeTypeEnum } from 'generated-sources';
import * as S from './DatasetStructureTypeCountLabelStyles';

interface DatasetStructureTypeCountLabelProps extends Pick<BoxProps, 'sx'> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box } from '@mui/material';
import type { DataSetFieldTypeTypeEnum } from 'generated-sources';
import styled from 'styled-components';
import type { DataSetFieldTypeTypeEnum } from 'generated-sources';

export const Container = styled(Box)<{
$typeName: DataSetFieldTypeTypeEnum;
Expand Down
Loading

0 comments on commit 5580f1f

Please sign in to comment.