Skip to content

Commit

Permalink
Fixed Lint issues - precommit hook verification
Browse files Browse the repository at this point in the history
  • Loading branch information
cdp committed Dec 30, 2020
1 parent 2af7627 commit 4b61eb4
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 30 deletions.
8 changes: 4 additions & 4 deletions cvat-core/src/annotation-formats.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
format: initialData.ext,
version: initialData.version,
enabled: initialData.enabled,
dimension: initialData.dimension
dimension: initialData.dimension,
};

Object.defineProperties(this, {
Expand Down Expand Up @@ -63,7 +63,7 @@
/**
* @name dimension
* @type {string}
* @memberof module:API.cvat.classes.Loader
* @memberof module:API.cvat.enums.DimensionType
* @readonly
* @instance
*/
Expand All @@ -85,7 +85,7 @@
format: initialData.ext,
version: initialData.version,
enabled: initialData.enabled,
dimension: initialData.dimension
dimension: initialData.dimension,
};

Object.defineProperties(this, {
Expand Down Expand Up @@ -133,7 +133,7 @@
/**
* @name dimension
* @type {string}
* @memberof module:API.cvat.classes.Loader
* @memberof module:API.cvat.enums.DimensionType
* @readonly
* @instance
*/
Expand Down
2 changes: 1 addition & 1 deletion cvat-core/src/enums.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
/**
* Task dimension
* @enum
* @name TaskDimension
* @name DimensionType
* @memberof module:API.cvat.enums
* @property {string} DIMENSION_2D '2d'
* @property {string} DIMENSION_3D '3d'
Expand Down
20 changes: 10 additions & 10 deletions cvat-core/src/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,7 @@
use_zip_chunks: undefined,
use_cache: undefined,
copy_data: undefined,
dimension: undefined
dimension: undefined,
};

let updatedFields = {
Expand Down Expand Up @@ -1454,15 +1454,15 @@
},
},
dimension: {
/**
* @name enabled
* @type {string}
* @memberof module:API.cvat.classes.Loader
* @readonly
* @instance
*/
get: () => data.dimension,
},
/**
* @name enabled
* @type {string}
* @memberof module:API.cvat.enums.DimensionType
* @readonly
* @instance
*/
get: () => data.dimension,
},
}),
);

Expand Down
4 changes: 2 additions & 2 deletions cvat-ui/src/components/actions-menu/actions-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { MenuInfo } from 'rc-menu/lib/interface';
import DumpSubmenu from './dump-submenu';
import LoadSubmenu from './load-submenu';
import ExportSubmenu from './export-submenu';
import {DimensionType} from "../../reducers/interfaces";
import { DimensionType } from '../../reducers/interfaces';

interface Props {
taskID: number;
Expand All @@ -23,7 +23,7 @@ interface Props {
dumpActivities: string[] | null;
exportActivities: string[] | null;
inferenceIsActive: boolean;
taskDimension: DimensionType.DIM_3D | DimensionType.DIM_2D;
taskDimension: DimensionType;
onClickMenu: (params: MenuInfo, file?: File) => void;
}

Expand Down
8 changes: 5 additions & 3 deletions cvat-ui/src/components/actions-menu/dump-submenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import React from 'react';
import Menu from 'antd/lib/menu';
import { DownloadOutlined, LoadingOutlined } from '@ant-design/icons';
import Text from 'antd/lib/typography/Text';
import {DimensionType} from '../../reducers/interfaces'
import { DimensionType } from '../../reducers/interfaces';

function isDefaultFormat(dumperName: string, taskMode: string): boolean {
return (
Expand All @@ -20,11 +20,13 @@ interface Props {
menuKey: string;
dumpers: any[];
dumpActivities: string[] | null;
taskDimension: DimensionType.DIM_3D | DimensionType.DIM_2D;
taskDimension: DimensionType;
}

export default function DumpSubmenu(props: Props): JSX.Element {
const { taskMode, menuKey, dumpers, dumpActivities, taskDimension } = props;
const {
taskMode, menuKey, dumpers, dumpActivities, taskDimension,
} = props;

return (
<Menu.SubMenu key={menuKey} title='Dump annotations'>
Expand Down
8 changes: 5 additions & 3 deletions cvat-ui/src/components/actions-menu/export-submenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
import React from 'react';
import Menu from 'antd/lib/menu';
import Text from 'antd/lib/typography/Text';
import {DimensionType} from '../../reducers/interfaces'
import { ExportOutlined, LoadingOutlined } from '@ant-design/icons';
import { DimensionType } from '../../reducers/interfaces';

interface Props {
menuKey: string;
exporters: any[];
exportActivities: string[] | null;
taskDimension: DimensionType.DIM_3D | DimensionType.DIM_2D;
taskDimension: DimensionType;
}

export default function ExportSubmenu(props: Props): JSX.Element {
const { menuKey, exporters, exportActivities, taskDimension } = props;
const {
menuKey, exporters, exportActivities, taskDimension,
} = props;

return (
<Menu.SubMenu key={menuKey} title='Export as a dataset'>
Expand Down
8 changes: 5 additions & 3 deletions cvat-ui/src/components/actions-menu/load-submenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@ import Menu from 'antd/lib/menu';
import Upload from 'antd/lib/upload';
import Button from 'antd/lib/button';
import Text from 'antd/lib/typography/Text';
import {DimensionType} from "../../reducers/interfaces";
import { UploadOutlined, LoadingOutlined } from '@ant-design/icons';
import { DimensionType } from '../../reducers/interfaces';

interface Props {
menuKey: string;
loaders: any[];
loadActivity: string | null;
onFileUpload(file: File): void;
taskDimension: DimensionType.DIM_3D | DimensionType.DIM_2D;
taskDimension: DimensionType;
}

export default function LoadSubmenu(props: Props): JSX.Element {
const { menuKey, loaders, loadActivity, onFileUpload, taskDimension } = props;
const {
menuKey, loaders, loadActivity, onFileUpload, taskDimension,
} = props;

return (
<Menu.SubMenu key={menuKey} title='Upload annotations'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export default function AnnotationMenuComponent(props: Props): JSX.Element {
dumpers,
dumpActivities,
menuKey: Actions.DUMP_TASK_ANNO,
taskDimension: jobInstance.task.dimension
taskDimension: jobInstance.task.dimension,
})}
{LoadSubmenu({
loaders,
Expand All @@ -170,13 +170,13 @@ export default function AnnotationMenuComponent(props: Props): JSX.Element {
onClickMenuWrapper(null, file);
},
menuKey: Actions.LOAD_JOB_ANNO,
taskDimension: jobInstance.task.dimension
taskDimension: jobInstance.task.dimension,
})}
{ExportSubmenu({
exporters: dumpers,
exportActivities,
menuKey: Actions.EXPORT_TASK_DATASET,
taskDimension:jobInstance.task.dimension
taskDimension: jobInstance.task.dimension,
})}

<Menu.Item key={Actions.REMOVE_ANNO}>Remove annotations</Menu.Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ import Text from 'antd/lib/typography/Text';
import InputNumber from 'antd/lib/input-number';
import Button from 'antd/lib/button';
import notification from 'antd/lib/notification';
import {DimensionType} from '../../reducers/interfaces'
// eslint-disable-next-line import/no-extraneous-dependencies
import { OptionData, OptionGroupData } from 'rc-select/lib/interface';

import { Model, StringObject } from 'reducers/interfaces';

import { clamp } from 'utils/math';
import consts from 'consts';
import { DimensionType } from '../../reducers/interfaces';

interface Props {
withCleanup: boolean;
Expand Down

0 comments on commit 4b61eb4

Please sign in to comment.