From 822775e077f1ade4e7c0c341981899f2b7d22a16 Mon Sep 17 00:00:00 2001 From: Yousif Yassi Date: Mon, 23 Sep 2024 15:49:02 -0400 Subject: [PATCH 1/5] chore: OPTIC-1154: biome linting tweaks --- web/apps/labelstudio/src/app/App.jsx | 1 - .../src/app/AsyncPage/AsyncPage.jsx | 2 +- web/apps/labelstudio/src/app/RootPage.jsx | 1 - .../components/Breadcrumbs/Breadcrumbs.jsx | 2 +- .../labelstudio/src/components/Card/Card.jsx | 1 - .../CopyableTooltip/CopyableTooltip.jsx | 1 - .../DescriptionList/DescriptionList.jsx | 1 - .../src/components/Divider/Divider.jsx | 2 - .../components/Dropdown/DropdownComponent.jsx | 2 +- .../components/Dropdown/DropdownTrigger.jsx | 2 +- .../src/components/Error/Error.jsx | 2 +- .../components/Form/Elements/Input/Input.jsx | 1 - .../components/Form/Elements/Label/Label.jsx | 2 +- .../Form/Elements/RadioGroup/RadioGroup.jsx | 2 +- .../Form/Elements/Select/Select.jsx | 2 +- .../Form/Elements/TextArea/TextArea.jsx | 1 - .../Form/Elements/Toggle/Toggle.jsx | 2 +- .../Form/Elements/ToggleRight/ToggleRight.jsx | 2 +- .../src/components/Hamburger/Hamburger.jsx | 1 - .../src/components/HeidiTips/HeidiTips.tsx | 2 +- .../src/components/Menu/MenuItem.jsx | 1 - .../src/components/Modal/Modal.jsx | 2 +- .../components/SidebarMenu/SidebarMenu.jsx | 1 - .../src/components/Space/Space.jsx | 1 - .../src/components/Spinner/Spinner.jsx | 1 - .../components/ToggleItems/ToggleItems.tsx | 2 +- .../VersionNotifier/VersionNotifier.jsx | 2 +- .../pages/CreateProject/Config/Preview.jsx | 2 +- .../CreateProject/Config/UnsavedChanges.tsx | 2 +- .../src/pages/ExportPage/ExportPage.jsx | 2 +- .../Organization/PeoplePage/PeopleList.jsx | 1 - .../src/pages/Organization/index.jsx | 1 - .../src/pages/Projects/ProjectsList.jsx | 2 +- .../ModelVersionSelector.jsx | 2 +- .../src/pages/Settings/DangerZone.jsx | 1 - .../src/pages/Settings/GeneralSettings.jsx | 6 +- .../PredictionsSettings/PredictionsList.jsx | 2 +- .../PredictionsSettings.jsx | 2 - .../StorageSettings/StorageSettings.jsx | 1 - .../StorageSettings/StorageSummary.jsx | 1 - .../labelstudio/src/pages/Settings/index.jsx | 1 - .../pages/WebhookPage/WebhookDeleteModal.jsx | 6 +- .../src/pages/WebhookPage/WebhookDetail.jsx | 5 +- .../src/pages/WebhookPage/WebhookList.jsx | 8 +-- .../src/pages/WebhookPage/WebhookPage.jsx | 3 +- .../labelstudio/src/routes/ProjectRoutes.jsx | 1 - web/apps/labelstudio/src/utils/hooks.ts | 2 +- web/biome.json | 8 ++- .../src/components/CellViews/BooleanCell.jsx | 1 - .../src/components/Common/Button/Button.jsx | 2 +- .../src/components/Common/ErrorBox.jsx | 1 - .../Form/Elements/RadioGroup/RadioGroup.jsx | 2 +- .../src/components/Common/Modal/Modal.jsx | 2 +- .../src/components/Common/SDKButtons.jsx | 1 - .../src/components/Common/Select/Select.jsx | 2 +- .../Common/SkeletonLoader/SkeletonLoader.tsx | 2 +- .../src/components/Common/Space/Space.jsx | 1 - .../src/components/Common/Table/Table.jsx | 2 +- .../Common/Table/TableCell/TableCell.jsx | 1 - .../components/Common/Table/TableCheckbox.jsx | 1 - .../src/components/Common/Tag/Tag.jsx | 1 - .../components/DataManager/DataManager.jsx | 2 +- .../DataManager/Toolbar/Toolbar.jsx | 1 - .../DataManager/Toolbar/instruments.jsx | 2 +- .../src/components/Filters/FilterDropdown.jsx | 1 - .../Filters/FilterLine/FilterLine.jsx | 2 +- .../Filters/FilterLine/FilterOperation.jsx | 2 +- .../Filters/FiltersSidebar/FilterSidebar.jsx | 1 - .../src/components/Filters/types/Boolean.jsx | 1 - .../src/components/Filters/types/Common.jsx | 1 - .../src/components/Filters/types/List.jsx | 1 - .../src/components/Filters/types/Number.jsx | 1 - .../src/components/Filters/types/String.jsx | 1 - .../src/components/Label/Label.jsx | 2 +- web/libs/datamanager/src/sdk/app-create.jsx | 5 -- .../src/stores/Tabs/tab_column.jsx | 1 - web/libs/editor/src/common/Input/Input.jsx | 2 +- .../src/common/Pagination/Pagination.tsx | 2 +- web/libs/editor/src/common/Select/Select.tsx | 2 +- web/libs/editor/src/common/Space/Space.tsx | 2 +- .../AnnotationTabs/AnnotationTabs.jsx | 4 +- .../components/Annotations/Annotations.jsx | 2 +- .../__tests__/AnnotationsCarousel.test.tsx | 2 - .../src/components/BottomBar/CurrentTask.jsx | 2 +- .../src/components/Controls/Controls.jsx | 5 -- web/libs/editor/src/components/Debug.jsx | 2 +- .../src/components/Entities/Entities.jsx | 1 - .../src/components/Entities/LabelItem.jsx | 1 - .../src/components/Entities/SortMenu.jsx | 1 - .../components/ErrorMessage/ErrorMessage.jsx | 1 - .../src/components/Filter/FilterDropdown.tsx | 2 +- .../Filter/__tests__/Filter.test.tsx | 1 - .../Filter/__tests__/FilterRow.test.tsx | 1 - .../src/components/Filter/types/Boolean.jsx | 1 - .../src/components/Filter/types/Common.jsx | 1 - .../src/components/Filter/types/Number.jsx | 1 - .../src/components/Filter/types/String.jsx | 1 - .../editor/src/components/Hint/Hint.test.js | 2 - .../src/components/ImageGrid/ImageGrid.jsx | 2 +- .../ImageTransformer/ImageTransformer.jsx | 2 +- .../src/components/ImageView/ImageView.jsx | 2 +- .../components/ImageView/LabelOnRegion.jsx | 2 +- .../__tests__/InstructionsModal.test.tsx | 1 - web/libs/editor/src/components/Node/Node.tsx | 2 +- .../editor/src/components/Panel/Panel.jsx | 1 - .../editor/src/components/Ranker/Ranker.tsx | 2 +- .../src/components/Relations/Relations.jsx | 1 - .../SidePanels/DetailsPanel/RegionEditor.tsx | 2 +- .../DetailsPanel/RelationsControls.tsx | 2 +- .../components/SidePanels/TabPanels/Tabs.tsx | 4 +- .../components/SidebarTabs/SidebarTabs.jsx | 1 - .../components/SimpleBadge/SimpleBadge.jsx | 1 - .../editor/src/components/Tags/Object.tsx | 2 +- .../components/TextHighlight/EmojiNode.jsx | 1 - .../src/components/TextHighlight/Node.jsx | 1 - .../TextHighlight/TextHighlight.jsx | 2 +- .../src/components/TextHighlight/UrlNode.jsx | 1 - .../src/components/TextNode/TextNode.jsx | 2 +- .../TimeDurationControl.tsx | 2 +- .../src/components/Timeline/Controls.tsx | 2 +- .../src/components/Timeline/Controls/Info.tsx | 2 +- .../Timeline/Views/Frames/Keypoints.tsx | 2 +- .../editor/src/components/Tools/Basic.jsx | 2 +- .../editor/src/components/Tools/Slider.jsx | 2 +- .../src/components/Tools/SliderDropDown.jsx | 2 +- .../src/components/TopBar/CurrentTask.jsx | 2 +- .../TreeValidation/TreeValidation.jsx | 1 - web/libs/editor/src/core/Tree.tsx | 1 - web/libs/editor/src/env/development.js | 67 ------------------- .../src/lib/AudioUltra/Media/WaveformAudio.ts | 1 - web/libs/editor/src/regions/BrushRegion.jsx | 2 +- web/libs/editor/src/regions/EllipseRegion.jsx | 2 +- .../editor/src/regions/KeyPointRegion.jsx | 2 +- web/libs/editor/src/regions/PolygonPoint.jsx | 2 +- web/libs/editor/src/regions/PolygonRegion.jsx | 2 +- web/libs/editor/src/regions/RectRegion.jsx | 2 +- .../editor/src/regions/TextAreaRegion.jsx | 1 - .../src/stores/Annotation/Annotation.js | 1 - .../editor/src/tags/control/BrushLabels.jsx | 1 - web/libs/editor/src/tags/control/Choice.jsx | 2 +- web/libs/editor/src/tags/control/Choices.jsx | 1 - web/libs/editor/src/tags/control/DateTime.jsx | 2 +- .../editor/src/tags/control/EllipseLabels.jsx | 1 - .../src/tags/control/HyperTextLabels.jsx | 1 - .../src/tags/control/KeyPointLabels.jsx | 1 - web/libs/editor/src/tags/control/Label.jsx | 1 - .../editor/src/tags/control/Labels/Labels.jsx | 1 - web/libs/editor/src/tags/control/Number.jsx | 1 - .../src/tags/control/ParagraphLabels.jsx | 1 - .../editor/src/tags/control/PolygonLabels.jsx | 1 - web/libs/editor/src/tags/control/Ranker.jsx | 1 - web/libs/editor/src/tags/control/Rating.jsx | 1 - .../src/tags/control/RectangleLabels.jsx | 1 - web/libs/editor/src/tags/control/Shortcut.jsx | 1 - .../src/tags/control/Taxonomy/Taxonomy.jsx | 1 - .../src/tags/control/TextArea/TextArea.jsx | 2 +- .../control/TextArea/TextAreaRegionView.jsx | 2 +- .../src/tags/control/TimeSeriesLabels.jsx | 1 - web/libs/editor/src/tags/object/Audio.jsx | 1 - .../editor/src/tags/object/Audio/Controls.jsx | 2 +- web/libs/editor/src/tags/object/PagedView.jsx | 2 +- web/libs/editor/src/tags/object/Table.jsx | 1 - web/libs/editor/src/tags/visual/Collapse.jsx | 1 - web/libs/editor/src/tags/visual/Dialog.jsx | 1 - web/libs/editor/src/tags/visual/Filter.jsx | 1 - web/libs/editor/src/tags/visual/Header.jsx | 1 - web/libs/editor/src/tags/visual/Style.jsx | 1 - web/libs/editor/src/tags/visual/View.jsx | 1 - web/libs/editor/src/tools/Base.jsx | 1 - web/libs/editor/src/tools/Brightness.jsx | 1 - web/libs/editor/src/tools/Brush.jsx | 1 - web/libs/editor/src/tools/Contrast.jsx | 1 - web/libs/editor/src/tools/Erase.jsx | 1 - web/libs/editor/src/tools/LiveWire.jsx | 1 - web/libs/editor/src/tools/MagicWand.jsx | 1 - web/libs/editor/src/tools/Rotate.jsx | 2 - web/libs/editor/src/tools/Zoom.jsx | 2 +- web/libs/editor/src/utils/messages.jsx | 3 - .../tests/integration/e2e/ner/emoji.cy.ts | 2 +- .../e2e/outliner/region_tree.cy.ts | 2 +- web/libs/frontend-test/src/configure.js | 1 - .../frontend-test/src/helpers/LSF/Choices.ts | 3 - .../frontend-test/src/helpers/LSF/ToolBar.ts | 1 - 183 files changed, 94 insertions(+), 282 deletions(-) diff --git a/web/apps/labelstudio/src/app/App.jsx b/web/apps/labelstudio/src/app/App.jsx index f51170e33279..83efc9977ed1 100644 --- a/web/apps/labelstudio/src/app/App.jsx +++ b/web/apps/labelstudio/src/app/App.jsx @@ -1,7 +1,6 @@ /* global Sentry */ import { createBrowserHistory } from "history"; -import React from "react"; import { render } from "react-dom"; import { Router } from "react-router-dom"; import { LEAVE_BLOCKER_KEY, leaveBlockerCallback } from "../components/LeaveBlocker/LeaveBlocker"; diff --git a/web/apps/labelstudio/src/app/AsyncPage/AsyncPage.jsx b/web/apps/labelstudio/src/app/AsyncPage/AsyncPage.jsx index e0204fa8cf97..83748825f0ad 100644 --- a/web/apps/labelstudio/src/app/AsyncPage/AsyncPage.jsx +++ b/web/apps/labelstudio/src/app/AsyncPage/AsyncPage.jsx @@ -1,4 +1,4 @@ -import React, { createContext, useCallback, useContext, useEffect, useState } from "react"; +import { createContext, useCallback, useContext, useEffect, useState } from "react"; import { useHistory } from "react-router"; import { ErrorWrapper } from "../../components/Error/Error"; import { modal } from "../../components/Modal/Modal"; diff --git a/web/apps/labelstudio/src/app/RootPage.jsx b/web/apps/labelstudio/src/app/RootPage.jsx index 5108684d47c8..92fe08f9b0be 100644 --- a/web/apps/labelstudio/src/app/RootPage.jsx +++ b/web/apps/labelstudio/src/app/RootPage.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Menubar } from "../components/Menubar/Menubar"; import { ProjectRoutes } from "../routes/ProjectRoutes"; diff --git a/web/apps/labelstudio/src/components/Breadcrumbs/Breadcrumbs.jsx b/web/apps/labelstudio/src/components/Breadcrumbs/Breadcrumbs.jsx index 383e1404b07d..53f0c1c6b2d2 100644 --- a/web/apps/labelstudio/src/components/Breadcrumbs/Breadcrumbs.jsx +++ b/web/apps/labelstudio/src/components/Breadcrumbs/Breadcrumbs.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { NavLink } from "react-router-dom"; import { useConfig } from "../../providers/ConfigProvider"; import { useBreadcrumbs, useFindRouteComponent } from "../../providers/RoutesProvider"; diff --git a/web/apps/labelstudio/src/components/Card/Card.jsx b/web/apps/labelstudio/src/components/Card/Card.jsx index dab6a575eea3..ef71b784fb95 100644 --- a/web/apps/labelstudio/src/components/Card/Card.jsx +++ b/web/apps/labelstudio/src/components/Card/Card.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { cn } from "../../utils/bem"; import "./Card.scss"; diff --git a/web/apps/labelstudio/src/components/CopyableTooltip/CopyableTooltip.jsx b/web/apps/labelstudio/src/components/CopyableTooltip/CopyableTooltip.jsx index 6cfafc7b5bd7..365eec43f8c0 100644 --- a/web/apps/labelstudio/src/components/CopyableTooltip/CopyableTooltip.jsx +++ b/web/apps/labelstudio/src/components/CopyableTooltip/CopyableTooltip.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Children, cloneElement, forwardRef, useCallback } from "react"; import { useCopyText } from "../../hooks/useCopyText"; import { Tooltip } from "../Tooltip/Tooltip"; diff --git a/web/apps/labelstudio/src/components/DescriptionList/DescriptionList.jsx b/web/apps/labelstudio/src/components/DescriptionList/DescriptionList.jsx index cf58dc3e2375..b545dd4c2d10 100644 --- a/web/apps/labelstudio/src/components/DescriptionList/DescriptionList.jsx +++ b/web/apps/labelstudio/src/components/DescriptionList/DescriptionList.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { cn } from "../../utils/bem"; import "./DescriptionList.scss"; import { IconInfoOutline } from "../../assets/icons"; diff --git a/web/apps/labelstudio/src/components/Divider/Divider.jsx b/web/apps/labelstudio/src/components/Divider/Divider.jsx index 1c4da78056c5..acb9e398d6e5 100644 --- a/web/apps/labelstudio/src/components/Divider/Divider.jsx +++ b/web/apps/labelstudio/src/components/Divider/Divider.jsx @@ -1,5 +1,3 @@ -import React from "react"; - export const Divider = ({ height }) => { return
; }; diff --git a/web/apps/labelstudio/src/components/Dropdown/DropdownComponent.jsx b/web/apps/labelstudio/src/components/Dropdown/DropdownComponent.jsx index 501e026371a8..f9f015ab4561 100644 --- a/web/apps/labelstudio/src/components/Dropdown/DropdownComponent.jsx +++ b/web/apps/labelstudio/src/components/Dropdown/DropdownComponent.jsx @@ -1,4 +1,4 @@ -import React, { cloneElement, forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react"; +import { cloneElement, forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react"; import ReactDOM from "react-dom"; import { Block, cn } from "../../utils/bem"; import { alignElements } from "../../utils/dom"; diff --git a/web/apps/labelstudio/src/components/Dropdown/DropdownTrigger.jsx b/web/apps/labelstudio/src/components/Dropdown/DropdownTrigger.jsx index 13500f4f4090..ce94d27b4ccf 100644 --- a/web/apps/labelstudio/src/components/Dropdown/DropdownTrigger.jsx +++ b/web/apps/labelstudio/src/components/Dropdown/DropdownTrigger.jsx @@ -1,4 +1,4 @@ -import React, { +import { Children, cloneElement, forwardRef, diff --git a/web/apps/labelstudio/src/components/Error/Error.jsx b/web/apps/labelstudio/src/components/Error/Error.jsx index 720939a15d47..1822f6b70581 100644 --- a/web/apps/labelstudio/src/components/Error/Error.jsx +++ b/web/apps/labelstudio/src/components/Error/Error.jsx @@ -1,4 +1,4 @@ -import React, { Fragment, useCallback, useMemo, useState } from "react"; +import { Fragment, useCallback, useMemo, useState } from "react"; import sanitizeHtml from "sanitize-html"; import { LsSlack } from "../../assets/icons"; import { Block, Elem } from "../../utils/bem"; diff --git a/web/apps/labelstudio/src/components/Form/Elements/Input/Input.jsx b/web/apps/labelstudio/src/components/Form/Elements/Input/Input.jsx index fc859346c901..231f26787a4f 100644 --- a/web/apps/labelstudio/src/components/Form/Elements/Input/Input.jsx +++ b/web/apps/labelstudio/src/components/Form/Elements/Input/Input.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { cn } from "../../../../utils/bem"; import { FormField } from "../../FormField"; import { default as Label } from "../Label/Label"; diff --git a/web/apps/labelstudio/src/components/Form/Elements/Label/Label.jsx b/web/apps/labelstudio/src/components/Form/Elements/Label/Label.jsx index 1328a73cd1f7..c3e83cc457cc 100644 --- a/web/apps/labelstudio/src/components/Form/Elements/Label/Label.jsx +++ b/web/apps/labelstudio/src/components/Form/Elements/Label/Label.jsx @@ -1,4 +1,4 @@ -import React, { createElement } from "react"; +import { createElement } from "react"; import { cn } from "../../../../utils/bem"; import "./Label.scss"; diff --git a/web/apps/labelstudio/src/components/Form/Elements/RadioGroup/RadioGroup.jsx b/web/apps/labelstudio/src/components/Form/Elements/RadioGroup/RadioGroup.jsx index 60cb805b940a..8066ec5169de 100644 --- a/web/apps/labelstudio/src/components/Form/Elements/RadioGroup/RadioGroup.jsx +++ b/web/apps/labelstudio/src/components/Form/Elements/RadioGroup/RadioGroup.jsx @@ -1,4 +1,4 @@ -import React, { createContext, useCallback, useContext, useEffect, useState } from "react"; +import { createContext, useCallback, useContext, useEffect, useState } from "react"; import { Label } from ".."; import { BemWithSpecifiContext } from "../../../../utils/bem"; import { FormField } from "../../FormField"; diff --git a/web/apps/labelstudio/src/components/Form/Elements/Select/Select.jsx b/web/apps/labelstudio/src/components/Form/Elements/Select/Select.jsx index 0f5b43438100..59212fdaf5a7 100644 --- a/web/apps/labelstudio/src/components/Form/Elements/Select/Select.jsx +++ b/web/apps/labelstudio/src/components/Form/Elements/Select/Select.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useMemo, useState } from "react"; +import { useEffect, useMemo, useState } from "react"; import { cn } from "../../../../utils/bem"; import { FormField } from "../../FormField"; import { default as Label } from "../Label/Label"; diff --git a/web/apps/labelstudio/src/components/Form/Elements/TextArea/TextArea.jsx b/web/apps/labelstudio/src/components/Form/Elements/TextArea/TextArea.jsx index 2a6c685d130c..66281c7cc415 100644 --- a/web/apps/labelstudio/src/components/Form/Elements/TextArea/TextArea.jsx +++ b/web/apps/labelstudio/src/components/Form/Elements/TextArea/TextArea.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { cn } from "../../../../utils/bem"; import { FormField } from "../../FormField"; import { default as Label } from "../Label/Label"; diff --git a/web/apps/labelstudio/src/components/Form/Elements/Toggle/Toggle.jsx b/web/apps/labelstudio/src/components/Form/Elements/Toggle/Toggle.jsx index b9411e3f0c58..16ce1b21ab46 100644 --- a/web/apps/labelstudio/src/components/Form/Elements/Toggle/Toggle.jsx +++ b/web/apps/labelstudio/src/components/Form/Elements/Toggle/Toggle.jsx @@ -1,4 +1,4 @@ -import React, { forwardRef, useEffect, useMemo } from "react"; +import { forwardRef, useEffect, useMemo } from "react"; import { cn } from "../../../../utils/bem"; import { FormField } from "../../FormField"; import { useValueTracker } from "../../Utils"; diff --git a/web/apps/labelstudio/src/components/Form/Elements/ToggleRight/ToggleRight.jsx b/web/apps/labelstudio/src/components/Form/Elements/ToggleRight/ToggleRight.jsx index e2ebd7578781..e07b68e1d6b7 100644 --- a/web/apps/labelstudio/src/components/Form/Elements/ToggleRight/ToggleRight.jsx +++ b/web/apps/labelstudio/src/components/Form/Elements/ToggleRight/ToggleRight.jsx @@ -1,4 +1,4 @@ -import React, { forwardRef, useEffect, useMemo } from "react"; +import { forwardRef, useEffect, useMemo } from "react"; import { cn } from "../../../../utils/bem"; import { FormField } from "../../FormField"; import { useValueTracker } from "../../Utils"; diff --git a/web/apps/labelstudio/src/components/Hamburger/Hamburger.jsx b/web/apps/labelstudio/src/components/Hamburger/Hamburger.jsx index 47ec93f4cea0..7b75dd9a2a86 100644 --- a/web/apps/labelstudio/src/components/Hamburger/Hamburger.jsx +++ b/web/apps/labelstudio/src/components/Hamburger/Hamburger.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { cn } from "../../utils/bem"; import "./Hamburger.scss"; diff --git a/web/apps/labelstudio/src/components/HeidiTips/HeidiTips.tsx b/web/apps/labelstudio/src/components/HeidiTips/HeidiTips.tsx index ca32d7eb9a9f..cafba6ab3252 100644 --- a/web/apps/labelstudio/src/components/HeidiTips/HeidiTips.tsx +++ b/web/apps/labelstudio/src/components/HeidiTips/HeidiTips.tsx @@ -1,7 +1,7 @@ import { type FC, memo, useCallback, useState } from "react"; import type { HeidiTipsProps } from "./types"; import { HeidiTip } from "./HeidiTip"; -import { dismissTip, getRandomTip, isTipDismissed } from "./utils"; +import { dismissTip, getRandomTip } from "./utils"; export const HeidiTips: FC = memo(({ collection }) => { const [tip, setTip] = useState(getRandomTip(collection)); diff --git a/web/apps/labelstudio/src/components/Menu/MenuItem.jsx b/web/apps/labelstudio/src/components/Menu/MenuItem.jsx index f4881578eafc..0204f12d12b2 100644 --- a/web/apps/labelstudio/src/components/Menu/MenuItem.jsx +++ b/web/apps/labelstudio/src/components/Menu/MenuItem.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { NavLink } from "react-router-dom"; import { cn } from "../../utils/bem"; import { absoluteURL } from "../../utils/helpers"; diff --git a/web/apps/labelstudio/src/components/Modal/Modal.jsx b/web/apps/labelstudio/src/components/Modal/Modal.jsx index 4b83a1087d6f..2f574a9c186b 100644 --- a/web/apps/labelstudio/src/components/Modal/Modal.jsx +++ b/web/apps/labelstudio/src/components/Modal/Modal.jsx @@ -1,4 +1,4 @@ -import React, { createRef } from "react"; +import { createRef } from "react"; import { render, unmountComponentAtNode } from "react-dom"; import { ApiProvider } from "../../providers/ApiProvider"; import { ConfigProvider } from "../../providers/ConfigProvider"; diff --git a/web/apps/labelstudio/src/components/SidebarMenu/SidebarMenu.jsx b/web/apps/labelstudio/src/components/SidebarMenu/SidebarMenu.jsx index 3486bdd77e05..7d49d726c585 100644 --- a/web/apps/labelstudio/src/components/SidebarMenu/SidebarMenu.jsx +++ b/web/apps/labelstudio/src/components/SidebarMenu/SidebarMenu.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { cn } from "../../utils/bem"; import { Menu } from "../Menu/Menu"; import "./SidebarMenu.scss"; diff --git a/web/apps/labelstudio/src/components/Space/Space.jsx b/web/apps/labelstudio/src/components/Space/Space.jsx index 4f4e969c1a50..467dfc99ed3b 100644 --- a/web/apps/labelstudio/src/components/Space/Space.jsx +++ b/web/apps/labelstudio/src/components/Space/Space.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { BemWithSpecifiContext } from "../../utils/bem"; import "./Space.scss"; diff --git a/web/apps/labelstudio/src/components/Spinner/Spinner.jsx b/web/apps/labelstudio/src/components/Spinner/Spinner.jsx index 9044eec48212..2ccb052f7ad3 100644 --- a/web/apps/labelstudio/src/components/Spinner/Spinner.jsx +++ b/web/apps/labelstudio/src/components/Spinner/Spinner.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { cn } from "../../utils/bem"; import "./Spinner.scss"; diff --git a/web/apps/labelstudio/src/components/ToggleItems/ToggleItems.tsx b/web/apps/labelstudio/src/components/ToggleItems/ToggleItems.tsx index c456a8efe39e..91733e8b8560 100644 --- a/web/apps/labelstudio/src/components/ToggleItems/ToggleItems.tsx +++ b/web/apps/labelstudio/src/components/ToggleItems/ToggleItems.tsx @@ -1,4 +1,4 @@ -import React, { type CSSProperties } from "react"; +import type { CSSProperties } from "react"; import { cn } from "../../utils/bem"; import "./ToggleItems.scss"; diff --git a/web/apps/labelstudio/src/components/VersionNotifier/VersionNotifier.jsx b/web/apps/labelstudio/src/components/VersionNotifier/VersionNotifier.jsx index 2d73ece8b077..5e7a2b4ef1e2 100644 --- a/web/apps/labelstudio/src/components/VersionNotifier/VersionNotifier.jsx +++ b/web/apps/labelstudio/src/components/VersionNotifier/VersionNotifier.jsx @@ -1,5 +1,5 @@ import { format } from "date-fns"; -import React, { createContext, useCallback, useContext, useEffect, useReducer } from "react"; +import { createContext, useCallback, useContext, useEffect, useReducer } from "react"; import { Link } from "react-router-dom"; import { useAPI } from "../../providers/ApiProvider"; import { Block, Elem } from "../../utils/bem"; diff --git a/web/apps/labelstudio/src/pages/CreateProject/Config/Preview.jsx b/web/apps/labelstudio/src/pages/CreateProject/Config/Preview.jsx index 00ced147ab6b..7a8310421a3e 100644 --- a/web/apps/labelstudio/src/pages/CreateProject/Config/Preview.jsx +++ b/web/apps/labelstudio/src/pages/CreateProject/Config/Preview.jsx @@ -1,4 +1,4 @@ -import { useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { useCallback, useEffect, useMemo, useRef } from "react"; import { Spinner } from "../../../components"; import { cn } from "../../../utils/bem"; import { FF_DEV_3617, isFF } from "../../../utils/feature-flags"; diff --git a/web/apps/labelstudio/src/pages/CreateProject/Config/UnsavedChanges.tsx b/web/apps/labelstudio/src/pages/CreateProject/Config/UnsavedChanges.tsx index 18340883c907..9954bbb8f40d 100644 --- a/web/apps/labelstudio/src/pages/CreateProject/Config/UnsavedChanges.tsx +++ b/web/apps/labelstudio/src/pages/CreateProject/Config/UnsavedChanges.tsx @@ -1,4 +1,4 @@ -import React, { useCallback, useRef, useState } from "react"; +import { useCallback, useRef, useState } from "react"; import { Button } from "../../../components"; import { LeaveBlocker, type LeaveBlockerCallbacks } from "../../../components/LeaveBlocker/LeaveBlocker"; import { modal } from "../../../components/Modal/Modal"; diff --git a/web/apps/labelstudio/src/pages/ExportPage/ExportPage.jsx b/web/apps/labelstudio/src/pages/ExportPage/ExportPage.jsx index 44223d0dfd22..be26347fbf63 100644 --- a/web/apps/labelstudio/src/pages/ExportPage/ExportPage.jsx +++ b/web/apps/labelstudio/src/pages/ExportPage/ExportPage.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef, useState } from "react"; +import { useEffect, useRef, useState } from "react"; import { useHistory } from "react-router"; import { Button } from "../../components"; import { Form, Input } from "../../components/Form"; diff --git a/web/apps/labelstudio/src/pages/Organization/PeoplePage/PeopleList.jsx b/web/apps/labelstudio/src/pages/Organization/PeoplePage/PeopleList.jsx index 82bc1656b4e6..ce5fd83042ce 100644 --- a/web/apps/labelstudio/src/pages/Organization/PeoplePage/PeopleList.jsx +++ b/web/apps/labelstudio/src/pages/Organization/PeoplePage/PeopleList.jsx @@ -5,7 +5,6 @@ import { usePage, usePageSize } from "../../../components/Pagination/Pagination" import { useAPI } from "../../../providers/ApiProvider"; import { Block, Elem } from "../../../utils/bem"; import { isDefined } from "../../../utils/helpers"; -import { useUpdateEffect } from "../../../utils/hooks"; import "./PeopleList.scss"; import { CopyableTooltip } from "../../../components/CopyableTooltip/CopyableTooltip"; diff --git a/web/apps/labelstudio/src/pages/Organization/index.jsx b/web/apps/labelstudio/src/pages/Organization/index.jsx index bc2849c72684..f398c5429ab2 100644 --- a/web/apps/labelstudio/src/pages/Organization/index.jsx +++ b/web/apps/labelstudio/src/pages/Organization/index.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { SidebarMenu } from "../../components/SidebarMenu/SidebarMenu"; import { PeoplePage } from "./PeoplePage/PeoplePage"; import { WebhookPage } from "../WebhookPage/WebhookPage"; diff --git a/web/apps/labelstudio/src/pages/Projects/ProjectsList.jsx b/web/apps/labelstudio/src/pages/Projects/ProjectsList.jsx index c56152bb3b93..b687fa4c625e 100644 --- a/web/apps/labelstudio/src/pages/Projects/ProjectsList.jsx +++ b/web/apps/labelstudio/src/pages/Projects/ProjectsList.jsx @@ -1,6 +1,6 @@ import chr from "chroma-js"; import { format } from "date-fns"; -import React, { useMemo } from "react"; +import { useMemo } from "react"; import { NavLink } from "react-router-dom"; import { LsBulb, LsCheck, LsEllipsis, LsMinus } from "../../assets/icons"; import { Button, Dropdown, Menu, Pagination, Userpic } from "../../components"; diff --git a/web/apps/labelstudio/src/pages/Settings/AnnotationSettings/ModelVersionSelector.jsx b/web/apps/labelstudio/src/pages/Settings/AnnotationSettings/ModelVersionSelector.jsx index d172b7637d65..eb1627dc8a41 100644 --- a/web/apps/labelstudio/src/pages/Settings/AnnotationSettings/ModelVersionSelector.jsx +++ b/web/apps/labelstudio/src/pages/Settings/AnnotationSettings/ModelVersionSelector.jsx @@ -1,6 +1,6 @@ import { useCallback, useContext, useEffect, useState } from "react"; import { useAPI } from "../../../providers/ApiProvider"; -import { Label, Select } from "../../../components/Form"; +import { Select } from "../../../components/Form"; import { ProjectContext } from "../../../providers/ProjectProvider"; export const ModelVersionSelector = ({ diff --git a/web/apps/labelstudio/src/pages/Settings/DangerZone.jsx b/web/apps/labelstudio/src/pages/Settings/DangerZone.jsx index 3e6a6d62e8a0..87a1c8a709d8 100644 --- a/web/apps/labelstudio/src/pages/Settings/DangerZone.jsx +++ b/web/apps/labelstudio/src/pages/Settings/DangerZone.jsx @@ -3,7 +3,6 @@ import { useHistory } from "react-router"; import { Button } from "../../components"; import { Label } from "../../components/Form"; import { confirm } from "../../components/Modal/Modal"; -import { Space } from "../../components/Space/Space"; import { Spinner } from "../../components/Spinner/Spinner"; import { useAPI } from "../../providers/ApiProvider"; import { useProject } from "../../providers/ProjectProvider"; diff --git a/web/apps/labelstudio/src/pages/Settings/GeneralSettings.jsx b/web/apps/labelstudio/src/pages/Settings/GeneralSettings.jsx index e21531a73342..a95c68a542bc 100644 --- a/web/apps/labelstudio/src/pages/Settings/GeneralSettings.jsx +++ b/web/apps/labelstudio/src/pages/Settings/GeneralSettings.jsx @@ -1,9 +1,9 @@ -import React, { useCallback, useContext } from "react"; +import { useCallback, useContext } from "react"; import { Button } from "../../components"; -import { Form, Input, Label, Select, TextArea } from "../../components/Form"; +import { Form, Input, Select, TextArea } from "../../components/Form"; import { RadioGroup } from "../../components/Form/Elements/RadioGroup/RadioGroup"; import { ProjectContext } from "../../providers/ProjectProvider"; -import { Block, cn, Elem } from "../../utils/bem"; +import { Block, Elem } from "../../utils/bem"; import { EnterpriseBadge } from "../../components/Badges/Enterprise"; import "./settings.scss"; import { HeidiTips } from "../../components/HeidiTips/HeidiTips"; diff --git a/web/apps/labelstudio/src/pages/Settings/PredictionsSettings/PredictionsList.jsx b/web/apps/labelstudio/src/pages/Settings/PredictionsSettings/PredictionsList.jsx index e9784ff4c076..77be770af973 100644 --- a/web/apps/labelstudio/src/pages/Settings/PredictionsSettings/PredictionsList.jsx +++ b/web/apps/labelstudio/src/pages/Settings/PredictionsSettings/PredictionsList.jsx @@ -1,4 +1,4 @@ -import React, { useCallback, useContext } from "react"; +import { useCallback, useContext } from "react"; import { format, formatDistanceToNow, parseISO } from "date-fns"; import { IconInfoOutline, IconPredictions, LsEllipsis } from "../../../assets/icons"; diff --git a/web/apps/labelstudio/src/pages/Settings/PredictionsSettings/PredictionsSettings.jsx b/web/apps/labelstudio/src/pages/Settings/PredictionsSettings/PredictionsSettings.jsx index 9172f981275b..4019464df7b1 100644 --- a/web/apps/labelstudio/src/pages/Settings/PredictionsSettings/PredictionsSettings.jsx +++ b/web/apps/labelstudio/src/pages/Settings/PredictionsSettings/PredictionsSettings.jsx @@ -2,14 +2,12 @@ import { useCallback, useContext, useEffect, useState } from "react"; import { Description } from "../../../components/Description/Description"; import { Divider } from "../../../components/Divider/Divider"; import { EmptyState } from "../../../components/EmptyState/EmptyState"; -import { Caption } from "../../../components/Caption/Caption"; import { IconPredictions } from "../../../assets/icons"; import { useAPI } from "../../../providers/ApiProvider"; import { ProjectContext } from "../../../providers/ProjectProvider"; import { Spinner } from "../../../components/Spinner/Spinner"; import { PredictionsList } from "./PredictionsList"; import { Block, Elem } from "../../../utils/bem"; -import { Label } from "../../../components/Form"; import "./PredictionsSettings.scss"; export const PredictionsSettings = () => { diff --git a/web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageSettings.jsx b/web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageSettings.jsx index 2ee97a1ffcdb..dca3ad3817ea 100644 --- a/web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageSettings.jsx +++ b/web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageSettings.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Columns } from "../../../components/Columns/Columns"; import { Description } from "../../../components/Description/Description"; import { Block, cn } from "../../../utils/bem"; diff --git a/web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageSummary.jsx b/web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageSummary.jsx index 07397789c733..7b61077660a5 100644 --- a/web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageSummary.jsx +++ b/web/apps/labelstudio/src/pages/Settings/StorageSettings/StorageSummary.jsx @@ -1,5 +1,4 @@ import { format } from "date-fns/esm"; -import { React } from "react"; import { Button } from "../../../components"; import { DescriptionList } from "../../../components/DescriptionList/DescriptionList"; import { Tooltip } from "../../../components/Tooltip/Tooltip"; diff --git a/web/apps/labelstudio/src/pages/Settings/index.jsx b/web/apps/labelstudio/src/pages/Settings/index.jsx index a5504b88cd30..d795ab8e6b4c 100644 --- a/web/apps/labelstudio/src/pages/Settings/index.jsx +++ b/web/apps/labelstudio/src/pages/Settings/index.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { SidebarMenu } from "../../components/SidebarMenu/SidebarMenu"; import { WebhookPage } from "../WebhookPage/WebhookPage"; import { DangerZone } from "./DangerZone"; diff --git a/web/apps/labelstudio/src/pages/WebhookPage/WebhookDeleteModal.jsx b/web/apps/labelstudio/src/pages/WebhookPage/WebhookDeleteModal.jsx index afd048d8969c..9227b14ec79f 100644 --- a/web/apps/labelstudio/src/pages/WebhookPage/WebhookDeleteModal.jsx +++ b/web/apps/labelstudio/src/pages/WebhookPage/WebhookDeleteModal.jsx @@ -1,12 +1,8 @@ -import React from "react"; - import { Button } from "../../components"; -import { Elem } from "../../components/Menu/MenuContext"; import { modal } from "../../components/Modal/Modal"; import { useModalControls } from "../../components/Modal/ModalPopup"; import { Space } from "../../components/Space/Space"; -import { useAPI } from "../../providers/ApiProvider"; -import { Block, cn } from "../../utils/bem"; +import { cn } from "../../utils/bem"; export const WebhookDeleteModal = ({ onDelete }) => { return modal({ diff --git a/web/apps/labelstudio/src/pages/WebhookPage/WebhookDetail.jsx b/web/apps/labelstudio/src/pages/WebhookPage/WebhookDetail.jsx index 90f2f0446e32..ed0c2e44d120 100644 --- a/web/apps/labelstudio/src/pages/WebhookPage/WebhookDetail.jsx +++ b/web/apps/labelstudio/src/pages/WebhookPage/WebhookDetail.jsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import { useEffect, useState } from "react"; import { Button } from "../../components"; import { Form, Input, Label, Toggle } from "../../components/Form"; import { Block, cn, Elem } from "../../utils/bem"; @@ -8,10 +8,7 @@ import { useAPI } from "../../providers/ApiProvider"; import "./WebhookPage.scss"; import { Space } from "../../components/Space/Space"; import { useProject } from "../../providers/ProjectProvider"; -import { modal } from "../../components/Modal/Modal"; -import { useModalControls } from "../../components/Modal/ModalPopup"; import { WebhookDeleteModal } from "./WebhookDeleteModal"; -import { format } from "date-fns"; const WebhookDetail = ({ webhook, webhooksInfo, fetchWebhooks, onBack, onSelectActive }) => { // if webhook === null - create mod diff --git a/web/apps/labelstudio/src/pages/WebhookPage/WebhookList.jsx b/web/apps/labelstudio/src/pages/WebhookPage/WebhookList.jsx index 4214fd7e0b3f..fe2587fa2605 100644 --- a/web/apps/labelstudio/src/pages/WebhookPage/WebhookList.jsx +++ b/web/apps/labelstudio/src/pages/WebhookPage/WebhookList.jsx @@ -1,14 +1,12 @@ -import React, { useCallback } from "react"; -import { LsCross, LsPencil, LsPlus } from "../../assets/icons"; +import { useCallback } from "react"; +import { LsCross, LsPencil } from "../../assets/icons"; import { Button } from "../../components"; -import { Form, Input, Label, Toggle } from "../../components/Form"; -import { modal } from "../../components/Modal/Modal"; +import { Toggle } from "../../components/Form"; import { Block, Elem } from "../../utils/bem"; import "./WebhookPage.scss"; import { format } from "date-fns"; import { useAPI } from "../../providers/ApiProvider"; import { WebhookDeleteModal } from "./WebhookDeleteModal"; -import { useProject } from "../../providers/ProjectProvider"; const WebhookList = ({ onSelectActive, onAddWebhook, webhooks, fetchWebhooks }) => { const api = useAPI(); diff --git a/web/apps/labelstudio/src/pages/WebhookPage/WebhookPage.jsx b/web/apps/labelstudio/src/pages/WebhookPage/WebhookPage.jsx index f338eadbeb9f..c0f269133b28 100644 --- a/web/apps/labelstudio/src/pages/WebhookPage/WebhookPage.jsx +++ b/web/apps/labelstudio/src/pages/WebhookPage/WebhookPage.jsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useMemo, useState } from "react"; +import { useCallback, useEffect, useMemo, useState } from "react"; import { useAPI } from "../../providers/ApiProvider"; import "./WebhookPage.scss"; @@ -6,7 +6,6 @@ import "./WebhookPage.scss"; import WebhookList from "./WebhookList"; import WebhookDetail from "./WebhookDetail"; import { useProject } from "../../providers/ProjectProvider"; -import { Button, Spinner } from "../../components"; import { Block, Elem } from "../../utils/bem"; import { IconInfo } from "../../assets/icons"; import { useHistory } from "react-router"; diff --git a/web/apps/labelstudio/src/routes/ProjectRoutes.jsx b/web/apps/labelstudio/src/routes/ProjectRoutes.jsx index 4a2b1a75cfd0..115e7cb07353 100644 --- a/web/apps/labelstudio/src/routes/ProjectRoutes.jsx +++ b/web/apps/labelstudio/src/routes/ProjectRoutes.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { useRoutesMap } from "../providers/RoutesProvider"; import { resolveRoutes } from "../utils/routeHelpers"; import { RouteWithStaticFallback } from "./RouteWithStaticFallback"; diff --git a/web/apps/labelstudio/src/utils/hooks.ts b/web/apps/labelstudio/src/utils/hooks.ts index 6da95012383d..61cb1bf89460 100644 --- a/web/apps/labelstudio/src/utils/hooks.ts +++ b/web/apps/labelstudio/src/utils/hooks.ts @@ -1,4 +1,4 @@ -import { useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { useCallback, useEffect, useRef } from "react"; import { useHistory } from "react-router"; import { useFixedLocation } from "../providers/RoutesProvider"; diff --git a/web/biome.json b/web/biome.json index 3f718df262dc..4a7260517692 100644 --- a/web/biome.json +++ b/web/biome.json @@ -54,7 +54,13 @@ "correctness": { "useExhaustiveDependencies": "off", "noChildrenProp": "off", - "useJsxKeyInIterable": "off" + "useJsxKeyInIterable": "off", + "noUnusedImports": { + "level": "warn" + }, + "noUnusedVariables": { + "level": "error" + } }, "performance": { "noAccumulatingSpread": "off", diff --git a/web/libs/datamanager/src/components/CellViews/BooleanCell.jsx b/web/libs/datamanager/src/components/CellViews/BooleanCell.jsx index cb8fe66fc2f6..e2315fe7f12b 100644 --- a/web/libs/datamanager/src/components/CellViews/BooleanCell.jsx +++ b/web/libs/datamanager/src/components/CellViews/BooleanCell.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Tag } from "../Common/Tag/Tag"; const parseBoolean = (value) => { diff --git a/web/libs/datamanager/src/components/Common/Button/Button.jsx b/web/libs/datamanager/src/components/Common/Button/Button.jsx index c3dbd0557f10..c6f2f8e04e2d 100644 --- a/web/libs/datamanager/src/components/Common/Button/Button.jsx +++ b/web/libs/datamanager/src/components/Common/Button/Button.jsx @@ -1,4 +1,4 @@ -import React, { cloneElement, forwardRef, useMemo } from "react"; +import { cloneElement, forwardRef, useMemo } from "react"; import { Block, Elem } from "../../../utils/bem"; import { FF_LOPS_E_10, isFF } from "../../../utils/feature-flags"; import { isDefined } from "../../../utils/utils"; diff --git a/web/libs/datamanager/src/components/Common/ErrorBox.jsx b/web/libs/datamanager/src/components/Common/ErrorBox.jsx index 2fd5026508ea..e6a47a6031cc 100644 --- a/web/libs/datamanager/src/components/Common/ErrorBox.jsx +++ b/web/libs/datamanager/src/components/Common/ErrorBox.jsx @@ -1,5 +1,4 @@ import { inject } from "mobx-react"; -import React from "react"; import { RiErrorWarningFill } from "react-icons/ri"; import { Button } from "./Button/Button"; import { Dropdown } from "./Dropdown/Dropdown"; diff --git a/web/libs/datamanager/src/components/Common/Form/Elements/RadioGroup/RadioGroup.jsx b/web/libs/datamanager/src/components/Common/Form/Elements/RadioGroup/RadioGroup.jsx index 14c9cff94f3c..679da6dcd391 100644 --- a/web/libs/datamanager/src/components/Common/Form/Elements/RadioGroup/RadioGroup.jsx +++ b/web/libs/datamanager/src/components/Common/Form/Elements/RadioGroup/RadioGroup.jsx @@ -1,4 +1,4 @@ -import React, { createContext, useCallback, useContext, useEffect, useState } from "react"; +import { createContext, useCallback, useContext, useEffect, useState } from "react"; import { Label } from ".."; import { BemWithSpecifiContext } from "../../../../utils/bem"; import { FormField } from "../../FormField"; diff --git a/web/libs/datamanager/src/components/Common/Modal/Modal.jsx b/web/libs/datamanager/src/components/Common/Modal/Modal.jsx index 2992589b11b7..c943ce748906 100644 --- a/web/libs/datamanager/src/components/Common/Modal/Modal.jsx +++ b/web/libs/datamanager/src/components/Common/Modal/Modal.jsx @@ -1,4 +1,4 @@ -import React, { createRef } from "react"; +import { createRef } from "react"; import { render } from "react-dom"; import { cn } from "../../../utils/bem"; import { Button } from "../Button/Button"; diff --git a/web/libs/datamanager/src/components/Common/SDKButtons.jsx b/web/libs/datamanager/src/components/Common/SDKButtons.jsx index 356f4223fd47..ca512807ab9e 100644 --- a/web/libs/datamanager/src/components/Common/SDKButtons.jsx +++ b/web/libs/datamanager/src/components/Common/SDKButtons.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { useSDK } from "../../providers/SDKProvider"; import { Button } from "./Button/Button"; diff --git a/web/libs/datamanager/src/components/Common/Select/Select.jsx b/web/libs/datamanager/src/components/Common/Select/Select.jsx index 0c2824870d8d..96cdc43f742c 100644 --- a/web/libs/datamanager/src/components/Common/Select/Select.jsx +++ b/web/libs/datamanager/src/components/Common/Select/Select.jsx @@ -1,4 +1,4 @@ -import React, { +import { Children, cloneElement, createContext, diff --git a/web/libs/datamanager/src/components/Common/SkeletonLoader/SkeletonLoader.tsx b/web/libs/datamanager/src/components/Common/SkeletonLoader/SkeletonLoader.tsx index 9b39efb56bb5..d2013e423bea 100644 --- a/web/libs/datamanager/src/components/Common/SkeletonLoader/SkeletonLoader.tsx +++ b/web/libs/datamanager/src/components/Common/SkeletonLoader/SkeletonLoader.tsx @@ -1,4 +1,4 @@ -import React, { type ReactChildren } from "react"; +import type { ReactChildren } from "react"; import "./SkeletonLoader.scss"; import { Block } from "../../../utils/bem"; import { SkeletonLine } from "./SkeletonLine"; diff --git a/web/libs/datamanager/src/components/Common/Space/Space.jsx b/web/libs/datamanager/src/components/Common/Space/Space.jsx index c3cb00c3e600..45a815a140a2 100644 --- a/web/libs/datamanager/src/components/Common/Space/Space.jsx +++ b/web/libs/datamanager/src/components/Common/Space/Space.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { BemWithSpecifiContext } from "../../../utils/bem"; import "./Space.scss"; diff --git a/web/libs/datamanager/src/components/Common/Table/Table.jsx b/web/libs/datamanager/src/components/Common/Table/Table.jsx index 5dcb9ea80b3f..d9555434ed36 100644 --- a/web/libs/datamanager/src/components/Common/Table/Table.jsx +++ b/web/libs/datamanager/src/components/Common/Table/Table.jsx @@ -1,5 +1,5 @@ import { observer } from "mobx-react"; -import React, { createContext, forwardRef, useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { createContext, forwardRef, useCallback, useEffect, useMemo, useRef, useState } from "react"; import { FaCode } from "react-icons/fa"; import { RiCodeLine } from "react-icons/ri"; import AutoSizer from "react-virtualized-auto-sizer"; diff --git a/web/libs/datamanager/src/components/Common/Table/TableCell/TableCell.jsx b/web/libs/datamanager/src/components/Common/Table/TableCell/TableCell.jsx index e51a9e7aad3c..a1b49c4561f5 100644 --- a/web/libs/datamanager/src/components/Common/Table/TableCell/TableCell.jsx +++ b/web/libs/datamanager/src/components/Common/Table/TableCell/TableCell.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { TableElem } from "../TableContext"; export const TableCell = ({ ...props }) => { diff --git a/web/libs/datamanager/src/components/Common/Table/TableCheckbox.jsx b/web/libs/datamanager/src/components/Common/Table/TableCheckbox.jsx index aa8f3094243e..48989e977539 100644 --- a/web/libs/datamanager/src/components/Common/Table/TableCheckbox.jsx +++ b/web/libs/datamanager/src/components/Common/Table/TableCheckbox.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Checkbox } from "../Checkbox/Checkbox"; const IndeterminateCheckbox = ({ checked, indeterminate, ...props }) => { diff --git a/web/libs/datamanager/src/components/Common/Tag/Tag.jsx b/web/libs/datamanager/src/components/Common/Tag/Tag.jsx index 45755ea69570..a0c86dbbb955 100644 --- a/web/libs/datamanager/src/components/Common/Tag/Tag.jsx +++ b/web/libs/datamanager/src/components/Common/Tag/Tag.jsx @@ -1,5 +1,4 @@ import color from "chroma-js"; -import React from "react"; import { Block } from "../../../utils/bem"; import { colors } from "../../../utils/colors"; import "./Tag.scss"; diff --git a/web/libs/datamanager/src/components/DataManager/DataManager.jsx b/web/libs/datamanager/src/components/DataManager/DataManager.jsx index 7db811663a79..833b6417d9a9 100644 --- a/web/libs/datamanager/src/components/DataManager/DataManager.jsx +++ b/web/libs/datamanager/src/components/DataManager/DataManager.jsx @@ -1,5 +1,5 @@ import { inject, observer } from "mobx-react"; -import React, { useCallback } from "react"; +import { useCallback } from "react"; import { Draggable } from "react-beautiful-dnd"; import { LSPlus } from "../../assets/icons"; import { Block, Elem } from "../../utils/bem"; diff --git a/web/libs/datamanager/src/components/DataManager/Toolbar/Toolbar.jsx b/web/libs/datamanager/src/components/DataManager/Toolbar/Toolbar.jsx index 4b1420263f0a..c34e5486fe94 100644 --- a/web/libs/datamanager/src/components/DataManager/Toolbar/Toolbar.jsx +++ b/web/libs/datamanager/src/components/DataManager/Toolbar/Toolbar.jsx @@ -1,5 +1,4 @@ import { inject, observer } from "mobx-react"; -import React from "react"; import { Block } from "../../../utils/bem"; import { FF_LOPS_E_10, isFF } from "../../../utils/feature-flags"; import { Space } from "../../Common/Space/Space"; diff --git a/web/libs/datamanager/src/components/DataManager/Toolbar/instruments.jsx b/web/libs/datamanager/src/components/DataManager/Toolbar/instruments.jsx index 63b224960f01..a28f3e630d1f 100644 --- a/web/libs/datamanager/src/components/DataManager/Toolbar/instruments.jsx +++ b/web/libs/datamanager/src/components/DataManager/Toolbar/instruments.jsx @@ -1,4 +1,4 @@ -import { FaAngleDown, FaCaretDown, FaChevronDown } from "react-icons/fa"; +import { FaAngleDown, FaCaretDown } from "react-icons/fa"; import { Block } from "../../../utils/bem"; import { FF_LOPS_E_10, FF_SELF_SERVE, isFF } from "../../../utils/feature-flags"; import { ErrorBox } from "../../Common/ErrorBox"; diff --git a/web/libs/datamanager/src/components/Filters/FilterDropdown.jsx b/web/libs/datamanager/src/components/Filters/FilterDropdown.jsx index f6ea2fd64e14..9e740aa0505b 100644 --- a/web/libs/datamanager/src/components/Filters/FilterDropdown.jsx +++ b/web/libs/datamanager/src/components/Filters/FilterDropdown.jsx @@ -1,5 +1,4 @@ import { observer } from "mobx-react"; -import React from "react"; import { FaCaretDown } from "react-icons/fa"; import { Icon } from "../Common/Icon/Icon"; import { Select } from "../Common/Select/Select"; diff --git a/web/libs/datamanager/src/components/Filters/FilterLine/FilterLine.jsx b/web/libs/datamanager/src/components/Filters/FilterLine/FilterLine.jsx index 5d8fd3644764..5e38ecb3293e 100644 --- a/web/libs/datamanager/src/components/Filters/FilterLine/FilterLine.jsx +++ b/web/libs/datamanager/src/components/Filters/FilterLine/FilterLine.jsx @@ -1,5 +1,5 @@ import { observer } from "mobx-react"; -import React, { Fragment } from "react"; +import { Fragment } from "react"; import { FaTrash } from "react-icons/fa"; import { BemWithSpecifiContext } from "../../../utils/bem"; import { Button } from "../../Common/Button/Button"; diff --git a/web/libs/datamanager/src/components/Filters/FilterLine/FilterOperation.jsx b/web/libs/datamanager/src/components/Filters/FilterLine/FilterOperation.jsx index c8e3f3ab09ba..de1e6b4cd99b 100644 --- a/web/libs/datamanager/src/components/Filters/FilterLine/FilterOperation.jsx +++ b/web/libs/datamanager/src/components/Filters/FilterLine/FilterOperation.jsx @@ -1,6 +1,6 @@ import { observer } from "mobx-react"; import { getRoot } from "mobx-state-tree"; -import React, { useCallback, useMemo } from "react"; +import { useCallback, useMemo } from "react"; import { Elem } from "../../../utils/bem"; import { debounce } from "../../../utils/debounce"; import { FilterDropdown } from "../FilterDropdown"; diff --git a/web/libs/datamanager/src/components/Filters/FiltersSidebar/FilterSidebar.jsx b/web/libs/datamanager/src/components/Filters/FiltersSidebar/FilterSidebar.jsx index 3ee059cd83e2..a4dc4cbf61c6 100644 --- a/web/libs/datamanager/src/components/Filters/FiltersSidebar/FilterSidebar.jsx +++ b/web/libs/datamanager/src/components/Filters/FiltersSidebar/FilterSidebar.jsx @@ -1,5 +1,4 @@ import { inject } from "mobx-react"; -import React from "react"; import { FaCaretSquareLeft } from "react-icons/fa"; import { Block, Elem } from "../../../utils/bem"; import { Button } from "../../Common/Button/Button"; diff --git a/web/libs/datamanager/src/components/Filters/types/Boolean.jsx b/web/libs/datamanager/src/components/Filters/types/Boolean.jsx index 8b95db7d4a5d..c9908cfbdd83 100644 --- a/web/libs/datamanager/src/components/Filters/types/Boolean.jsx +++ b/web/libs/datamanager/src/components/Filters/types/Boolean.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { FilterDropdown } from "../FilterDropdown"; export const BooleanFilter = [ diff --git a/web/libs/datamanager/src/components/Filters/types/Common.jsx b/web/libs/datamanager/src/components/Filters/types/Common.jsx index 011682368b8d..5a7f6df0036d 100644 --- a/web/libs/datamanager/src/components/Filters/types/Common.jsx +++ b/web/libs/datamanager/src/components/Filters/types/Common.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { FilterDropdown } from "../FilterDropdown"; export const Common = [ diff --git a/web/libs/datamanager/src/components/Filters/types/List.jsx b/web/libs/datamanager/src/components/Filters/types/List.jsx index fb4345a8999f..8faa1602c1f4 100644 --- a/web/libs/datamanager/src/components/Filters/types/List.jsx +++ b/web/libs/datamanager/src/components/Filters/types/List.jsx @@ -1,5 +1,4 @@ import { observer } from "mobx-react"; -import React from "react"; import { FilterDropdown } from "../FilterDropdown"; // import { Common } from "./Common"; diff --git a/web/libs/datamanager/src/components/Filters/types/Number.jsx b/web/libs/datamanager/src/components/Filters/types/Number.jsx index 72b094033315..367f65b2f106 100644 --- a/web/libs/datamanager/src/components/Filters/types/Number.jsx +++ b/web/libs/datamanager/src/components/Filters/types/Number.jsx @@ -1,5 +1,4 @@ import { observer } from "mobx-react"; -import React from "react"; import { isDefined } from "../../../utils/utils"; import { FilterInput } from "../FilterInput"; diff --git a/web/libs/datamanager/src/components/Filters/types/String.jsx b/web/libs/datamanager/src/components/Filters/types/String.jsx index 1d8d73c90b37..c662d67b29f7 100644 --- a/web/libs/datamanager/src/components/Filters/types/String.jsx +++ b/web/libs/datamanager/src/components/Filters/types/String.jsx @@ -1,5 +1,4 @@ import { observer } from "mobx-react"; -import React from "react"; import { FilterInput } from "../FilterInput"; const BaseInput = observer(({ value, onChange, placeholder }) => { diff --git a/web/libs/datamanager/src/components/Label/Label.jsx b/web/libs/datamanager/src/components/Label/Label.jsx index a0abad7b5a4e..3492a79950a2 100644 --- a/web/libs/datamanager/src/components/Label/Label.jsx +++ b/web/libs/datamanager/src/components/Label/Label.jsx @@ -1,6 +1,6 @@ import { inject } from "mobx-react"; import { observer } from "mobx-react-lite"; -import React, { useCallback, useEffect, useMemo, useRef } from "react"; +import { useCallback, useEffect, useMemo, useRef } from "react"; import { FaCaretDown, FaChevronLeft, FaColumns } from "react-icons/fa"; import { Block, Elem } from "../../utils/bem"; import { FF_DEV_1170, isFF } from "../../utils/feature-flags"; diff --git a/web/libs/datamanager/src/sdk/app-create.jsx b/web/libs/datamanager/src/sdk/app-create.jsx index 3de35396eae2..f26670446e08 100644 --- a/web/libs/datamanager/src/sdk/app-create.jsx +++ b/web/libs/datamanager/src/sdk/app-create.jsx @@ -1,8 +1,3 @@ -/** @typedef {{ - * views?: any[] - * }} AppOptions */ - -import React from "react"; import ReactDOM from "react-dom"; import { App } from "../components/App/App"; import { AppStore } from "../stores/AppStore"; diff --git a/web/libs/datamanager/src/stores/Tabs/tab_column.jsx b/web/libs/datamanager/src/stores/Tabs/tab_column.jsx index 211e8a34ab26..1e2a1e96aa06 100644 --- a/web/libs/datamanager/src/stores/Tabs/tab_column.jsx +++ b/web/libs/datamanager/src/stores/Tabs/tab_column.jsx @@ -1,5 +1,4 @@ import { getRoot, getSnapshot, types } from "mobx-state-tree"; -import React from "react"; import { CommentCheck, CommentRed, diff --git a/web/libs/editor/src/common/Input/Input.jsx b/web/libs/editor/src/common/Input/Input.jsx index 4a1cee3b02ba..3f754711739b 100644 --- a/web/libs/editor/src/common/Input/Input.jsx +++ b/web/libs/editor/src/common/Input/Input.jsx @@ -1,4 +1,4 @@ -import React, { forwardRef, useMemo } from "react"; +import { forwardRef, useMemo } from "react"; import { cn } from "../../utils/bem"; import Label from "../Label/Label"; import "./Input.scss"; diff --git a/web/libs/editor/src/common/Pagination/Pagination.tsx b/web/libs/editor/src/common/Pagination/Pagination.tsx index 7c341bf5f810..addb94a90df0 100644 --- a/web/libs/editor/src/common/Pagination/Pagination.tsx +++ b/web/libs/editor/src/common/Pagination/Pagination.tsx @@ -1,4 +1,4 @@ -import React, { type ChangeEvent, type FC, forwardRef, type KeyboardEvent, useCallback, useState } from "react"; +import { type ChangeEvent, type FC, forwardRef, type KeyboardEvent, useCallback, useState } from "react"; import { Hotkey } from "../../core/Hotkey"; import { useHotkey } from "../../hooks/useHotkey"; import { Block, Elem } from "../../utils/bem"; diff --git a/web/libs/editor/src/common/Select/Select.tsx b/web/libs/editor/src/common/Select/Select.tsx index 7f9b25c4a1b2..4a79a99cea45 100644 --- a/web/libs/editor/src/common/Select/Select.tsx +++ b/web/libs/editor/src/common/Select/Select.tsx @@ -1,4 +1,4 @@ -import React, { +import { Children, cloneElement, createContext, diff --git a/web/libs/editor/src/common/Space/Space.tsx b/web/libs/editor/src/common/Space/Space.tsx index 72f11783397a..9ae5bae4d434 100644 --- a/web/libs/editor/src/common/Space/Space.tsx +++ b/web/libs/editor/src/common/Space/Space.tsx @@ -1,4 +1,4 @@ -import React, { type CSSProperties, type FC } from "react"; +import type { CSSProperties, FC } from "react"; import { BemWithSpecifiContext } from "../../utils/bem"; import "./Space.scss"; diff --git a/web/libs/editor/src/components/AnnotationTabs/AnnotationTabs.jsx b/web/libs/editor/src/components/AnnotationTabs/AnnotationTabs.jsx index d9cc8c6caf19..3b0ce94f1668 100644 --- a/web/libs/editor/src/components/AnnotationTabs/AnnotationTabs.jsx +++ b/web/libs/editor/src/components/AnnotationTabs/AnnotationTabs.jsx @@ -1,10 +1,10 @@ -import React, { forwardRef, useCallback, useEffect, useRef } from "react"; +import { forwardRef } from "react"; import { observer } from "mobx-react"; import { Userpic } from "../../common/Userpic/Userpic"; import { Space } from "../../common/Space/Space"; import { Block, Elem } from "../../utils/bem"; import "./AnnotationTabs.scss"; -import { IconBan, LsGrid, LsPlus, LsSparks, LsStar } from "../../assets/icons"; +import { IconBan, LsSparks, LsStar } from "../../assets/icons"; export const EntityTab = observer( forwardRef( diff --git a/web/libs/editor/src/components/Annotations/Annotations.jsx b/web/libs/editor/src/components/Annotations/Annotations.jsx index 1139140c501d..ecf0bcbf1141 100644 --- a/web/libs/editor/src/components/Annotations/Annotations.jsx +++ b/web/libs/editor/src/components/Annotations/Annotations.jsx @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import { Component } from "react"; import { Badge, Button, Card, List, Popconfirm, Tooltip } from "antd"; import { observer } from "mobx-react"; import { diff --git a/web/libs/editor/src/components/AnnotationsCarousel/__tests__/AnnotationsCarousel.test.tsx b/web/libs/editor/src/components/AnnotationsCarousel/__tests__/AnnotationsCarousel.test.tsx index fe8695c9cc2d..8f6c426d4b66 100644 --- a/web/libs/editor/src/components/AnnotationsCarousel/__tests__/AnnotationsCarousel.test.tsx +++ b/web/libs/editor/src/components/AnnotationsCarousel/__tests__/AnnotationsCarousel.test.tsx @@ -1,5 +1,3 @@ -/* global test, expect, jest */ -import React from "react"; import Enzyme, { mount } from "enzyme"; import Adapter from "@wojtekmaj/enzyme-adapter-react-17"; import { AnnotationsCarousel } from "../AnnotationsCarousel"; diff --git a/web/libs/editor/src/components/BottomBar/CurrentTask.jsx b/web/libs/editor/src/components/BottomBar/CurrentTask.jsx index 7d75d360a065..fcaa4bf1e70e 100644 --- a/web/libs/editor/src/components/BottomBar/CurrentTask.jsx +++ b/web/libs/editor/src/components/BottomBar/CurrentTask.jsx @@ -1,4 +1,4 @@ -import React, { useMemo } from "react"; +import { useMemo } from "react"; import { observer } from "mobx-react"; import { Button } from "../../common/Button/Button"; import { Block, Elem } from "../../utils/bem"; diff --git a/web/libs/editor/src/components/Controls/Controls.jsx b/web/libs/editor/src/components/Controls/Controls.jsx index 2d40a6fafb22..d9af02026d6d 100644 --- a/web/libs/editor/src/components/Controls/Controls.jsx +++ b/web/libs/editor/src/components/Controls/Controls.jsx @@ -1,8 +1,3 @@ -/** - * @deprecated This component is not used anywhere. - */ - -import React from "react"; import { inject, observer } from "mobx-react"; import { CheckCircleOutlined, CheckOutlined } from "@ant-design/icons"; diff --git a/web/libs/editor/src/components/Debug.jsx b/web/libs/editor/src/components/Debug.jsx index 72f19a4d5346..564c125517c2 100644 --- a/web/libs/editor/src/components/Debug.jsx +++ b/web/libs/editor/src/components/Debug.jsx @@ -1,4 +1,4 @@ -import React, { useCallback, useRef } from "react"; +import { useCallback, useRef } from "react"; import { Button, Form } from "antd"; import { observer } from "mobx-react"; diff --git a/web/libs/editor/src/components/Entities/Entities.jsx b/web/libs/editor/src/components/Entities/Entities.jsx index 300782a4b1ef..41295cdeb726 100644 --- a/web/libs/editor/src/components/Entities/Entities.jsx +++ b/web/libs/editor/src/components/Entities/Entities.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Dropdown } from "antd"; import { observer } from "mobx-react"; diff --git a/web/libs/editor/src/components/Entities/LabelItem.jsx b/web/libs/editor/src/components/Entities/LabelItem.jsx index c162320e8590..920d39bf6cf6 100644 --- a/web/libs/editor/src/components/Entities/LabelItem.jsx +++ b/web/libs/editor/src/components/Entities/LabelItem.jsx @@ -5,7 +5,6 @@ import { Block, Elem } from "../../utils/bem"; import { Space } from "../../common/Space/Space"; import { LsInvisible, LsVisible } from "../../assets/icons"; import { Label } from "../Label/Label"; -import React from "react"; import { asVars } from "../../utils/styles"; import "./LabelItem.scss"; diff --git a/web/libs/editor/src/components/Entities/SortMenu.jsx b/web/libs/editor/src/components/Entities/SortMenu.jsx index a90f8283696b..362f1ee0a622 100644 --- a/web/libs/editor/src/components/Entities/SortMenu.jsx +++ b/web/libs/editor/src/components/Entities/SortMenu.jsx @@ -1,7 +1,6 @@ import { Menu } from "antd"; import { observer } from "mobx-react"; import { ThunderboltOutlined } from "@ant-design/icons"; -import React from "react"; import { LsDate } from "../../assets/icons"; import { Block, Elem } from "../../utils/bem"; import "./SortMenu.scss"; diff --git a/web/libs/editor/src/components/ErrorMessage/ErrorMessage.jsx b/web/libs/editor/src/components/ErrorMessage/ErrorMessage.jsx index 78bb1fb462b8..a0077da27983 100644 --- a/web/libs/editor/src/components/ErrorMessage/ErrorMessage.jsx +++ b/web/libs/editor/src/components/ErrorMessage/ErrorMessage.jsx @@ -1,4 +1,3 @@ -import React from "react"; import styles from "./ErrorMessage.module.scss"; import { sanitizeHtml } from "../../utils/html"; diff --git a/web/libs/editor/src/components/Filter/FilterDropdown.tsx b/web/libs/editor/src/components/Filter/FilterDropdown.tsx index 4eb0e889e0c2..0bc8efb3506a 100644 --- a/web/libs/editor/src/components/Filter/FilterDropdown.tsx +++ b/web/libs/editor/src/components/Filter/FilterDropdown.tsx @@ -1,4 +1,4 @@ -import React, { type FC } from "react"; +import type { FC } from "react"; import { Select } from "../../common/Select/Select"; interface FilterDropdownInterface { diff --git a/web/libs/editor/src/components/Filter/__tests__/Filter.test.tsx b/web/libs/editor/src/components/Filter/__tests__/Filter.test.tsx index 7ab6f1bff7f9..b3a4d725f103 100644 --- a/web/libs/editor/src/components/Filter/__tests__/Filter.test.tsx +++ b/web/libs/editor/src/components/Filter/__tests__/Filter.test.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { fireEvent, render, screen } from "@testing-library/react"; import { Filter } from "../Filter"; diff --git a/web/libs/editor/src/components/Filter/__tests__/FilterRow.test.tsx b/web/libs/editor/src/components/Filter/__tests__/FilterRow.test.tsx index cc3a19e054ae..75c88334c004 100644 --- a/web/libs/editor/src/components/Filter/__tests__/FilterRow.test.tsx +++ b/web/libs/editor/src/components/Filter/__tests__/FilterRow.test.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { FilterRow } from "../FilterRow"; import { fireEvent, render, screen } from "@testing-library/react"; diff --git a/web/libs/editor/src/components/Filter/types/Boolean.jsx b/web/libs/editor/src/components/Filter/types/Boolean.jsx index 9f51bebf6e3b..4b708df12bad 100644 --- a/web/libs/editor/src/components/Filter/types/Boolean.jsx +++ b/web/libs/editor/src/components/Filter/types/Boolean.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { FilterDropdown } from "../FilterDropdown"; import { observer } from "mobx-react"; diff --git a/web/libs/editor/src/components/Filter/types/Common.jsx b/web/libs/editor/src/components/Filter/types/Common.jsx index b88547bc12d3..68724ef95e37 100644 --- a/web/libs/editor/src/components/Filter/types/Common.jsx +++ b/web/libs/editor/src/components/Filter/types/Common.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { FilterDropdown } from "../FilterDropdown"; import { observer } from "mobx-react"; diff --git a/web/libs/editor/src/components/Filter/types/Number.jsx b/web/libs/editor/src/components/Filter/types/Number.jsx index 3f14b879258d..bc08372ab973 100644 --- a/web/libs/editor/src/components/Filter/types/Number.jsx +++ b/web/libs/editor/src/components/Filter/types/Number.jsx @@ -1,5 +1,4 @@ import { observer } from "mobx-react"; -import React from "react"; import { FilterInput } from "../FilterInput"; import { Common } from "./Common"; diff --git a/web/libs/editor/src/components/Filter/types/String.jsx b/web/libs/editor/src/components/Filter/types/String.jsx index ce373d7af830..e2c38af17a22 100644 --- a/web/libs/editor/src/components/Filter/types/String.jsx +++ b/web/libs/editor/src/components/Filter/types/String.jsx @@ -1,5 +1,4 @@ import { observer } from "mobx-react"; -import React from "react"; import { FilterInput } from "../FilterInput"; import { Common } from "./Common"; diff --git a/web/libs/editor/src/components/Hint/Hint.test.js b/web/libs/editor/src/components/Hint/Hint.test.js index 77d1f7370096..5caca16dba2d 100644 --- a/web/libs/editor/src/components/Hint/Hint.test.js +++ b/web/libs/editor/src/components/Hint/Hint.test.js @@ -1,5 +1,3 @@ -/* global describe, it, expect */ -import React from "react"; import Enzyme, { shallow } from "enzyme"; import { shallowToJson } from "enzyme-to-json"; import Adapter from "@wojtekmaj/enzyme-adapter-react-17"; diff --git a/web/libs/editor/src/components/ImageGrid/ImageGrid.jsx b/web/libs/editor/src/components/ImageGrid/ImageGrid.jsx index 23bc05291ea9..5a2b5f1e9b4c 100644 --- a/web/libs/editor/src/components/ImageGrid/ImageGrid.jsx +++ b/web/libs/editor/src/components/ImageGrid/ImageGrid.jsx @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import { Component } from "react"; import { observer } from "mobx-react"; import { Layer, Rect } from "react-konva"; diff --git a/web/libs/editor/src/components/ImageTransformer/ImageTransformer.jsx b/web/libs/editor/src/components/ImageTransformer/ImageTransformer.jsx index 0b93a772df69..2b3fd20f4767 100644 --- a/web/libs/editor/src/components/ImageTransformer/ImageTransformer.jsx +++ b/web/libs/editor/src/components/ImageTransformer/ImageTransformer.jsx @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import { Component } from "react"; import { MIN_SIZE } from "../../tools/Base"; import { getBoundingBoxAfterChanges } from "../../utils/image"; import LSTransformer from "./LSTransformer"; diff --git a/web/libs/editor/src/components/ImageView/ImageView.jsx b/web/libs/editor/src/components/ImageView/ImageView.jsx index 2a646b4e89ff..3dda56380cd3 100644 --- a/web/libs/editor/src/components/ImageView/ImageView.jsx +++ b/web/libs/editor/src/components/ImageView/ImageView.jsx @@ -1,4 +1,4 @@ -import React, { Component, createRef, forwardRef, Fragment, memo, useEffect, useRef, useState } from "react"; +import { Component, createRef, forwardRef, Fragment, memo, useEffect, useRef, useState } from "react"; import { Group, Layer, Line, Rect, Stage } from "react-konva"; import { observer } from "mobx-react"; import { getEnv, getRoot, isAlive } from "mobx-state-tree"; diff --git a/web/libs/editor/src/components/ImageView/LabelOnRegion.jsx b/web/libs/editor/src/components/ImageView/LabelOnRegion.jsx index 332469979ae8..ed3b90e59f20 100644 --- a/web/libs/editor/src/components/ImageView/LabelOnRegion.jsx +++ b/web/libs/editor/src/components/ImageView/LabelOnRegion.jsx @@ -1,4 +1,4 @@ -import React, { Fragment, useCallback, useContext, useMemo, useState } from "react"; +import { Fragment, useCallback, useContext, useMemo, useState } from "react"; import { Group, Label, Path, Rect, Tag, Text } from "react-konva"; import { observer } from "mobx-react"; import { getRoot } from "mobx-state-tree"; diff --git a/web/libs/editor/src/components/InstructionsModal/__tests__/InstructionsModal.test.tsx b/web/libs/editor/src/components/InstructionsModal/__tests__/InstructionsModal.test.tsx index 481f91c2eed1..ef3ebc053a41 100644 --- a/web/libs/editor/src/components/InstructionsModal/__tests__/InstructionsModal.test.tsx +++ b/web/libs/editor/src/components/InstructionsModal/__tests__/InstructionsModal.test.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { fireEvent, render, screen } from "@testing-library/react"; import { InstructionsModal } from "../InstructionsModal"; diff --git a/web/libs/editor/src/components/Node/Node.tsx b/web/libs/editor/src/components/Node/Node.tsx index 4dea4bf30d71..05498c864dc1 100644 --- a/web/libs/editor/src/components/Node/Node.tsx +++ b/web/libs/editor/src/components/Node/Node.tsx @@ -1,4 +1,4 @@ -import React, { type FC } from "react"; +import type { FC } from "react"; import { getRoot, getType } from "mobx-state-tree"; import { observer } from "mobx-react"; import { ApartmentOutlined, AudioOutlined, LineChartOutlined, MessageOutlined } from "@ant-design/icons"; diff --git a/web/libs/editor/src/components/Panel/Panel.jsx b/web/libs/editor/src/components/Panel/Panel.jsx index 56c7544c05ad..81c1853319e4 100644 --- a/web/libs/editor/src/components/Panel/Panel.jsx +++ b/web/libs/editor/src/components/Panel/Panel.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { Button } from "antd"; import { diff --git a/web/libs/editor/src/components/Ranker/Ranker.tsx b/web/libs/editor/src/components/Ranker/Ranker.tsx index 47eeaf9bfa9f..978c9b25be15 100644 --- a/web/libs/editor/src/components/Ranker/Ranker.tsx +++ b/web/libs/editor/src/components/Ranker/Ranker.tsx @@ -1,4 +1,4 @@ -import React, { createContext, useCallback, useEffect, useState } from "react"; +import { createContext, useCallback, useEffect, useState } from "react"; import { DragDropContext, type DropResult } from "react-beautiful-dnd"; import Column from "./Column"; diff --git a/web/libs/editor/src/components/Relations/Relations.jsx b/web/libs/editor/src/components/Relations/Relations.jsx index fbadf97fd8f1..d9872b8d2356 100644 --- a/web/libs/editor/src/components/Relations/Relations.jsx +++ b/web/libs/editor/src/components/Relations/Relations.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Button, List, Select } from "antd"; import { getRoot, isValidReference } from "mobx-state-tree"; import { observer } from "mobx-react"; diff --git a/web/libs/editor/src/components/SidePanels/DetailsPanel/RegionEditor.tsx b/web/libs/editor/src/components/SidePanels/DetailsPanel/RegionEditor.tsx index cad8ff430097..f0d3f3eed3aa 100644 --- a/web/libs/editor/src/components/SidePanels/DetailsPanel/RegionEditor.tsx +++ b/web/libs/editor/src/components/SidePanels/DetailsPanel/RegionEditor.tsx @@ -9,7 +9,7 @@ import { isUnionType, types, } from "mobx-state-tree"; -import React, { +import { type ChangeEvent, type FC, type HTMLInputTypeAttribute, diff --git a/web/libs/editor/src/components/SidePanels/DetailsPanel/RelationsControls.tsx b/web/libs/editor/src/components/SidePanels/DetailsPanel/RelationsControls.tsx index a3a7ca51eb42..5a941bcef638 100644 --- a/web/libs/editor/src/components/SidePanels/DetailsPanel/RelationsControls.tsx +++ b/web/libs/editor/src/components/SidePanels/DetailsPanel/RelationsControls.tsx @@ -1,4 +1,4 @@ -import React, { type FC, useCallback } from "react"; +import { type FC, useCallback } from "react"; import { observer } from "mobx-react"; import { Block, Elem } from "../../../utils/bem"; import { Button } from "../../../common/Button/Button"; diff --git a/web/libs/editor/src/components/SidePanels/TabPanels/Tabs.tsx b/web/libs/editor/src/components/SidePanels/TabPanels/Tabs.tsx index e21dc45b7d45..7b590aa18c4d 100644 --- a/web/libs/editor/src/components/SidePanels/TabPanels/Tabs.tsx +++ b/web/libs/editor/src/components/SidePanels/TabPanels/Tabs.tsx @@ -1,7 +1,7 @@ -import React, { useRef, useState } from "react"; +import { useRef, useState } from "react"; import { IconOutlinerDrag } from "../../../assets/icons"; import { useDrag } from "../../../hooks/useDrag"; -import { Block, cn, Elem } from "../../../utils/bem"; +import { Block, Elem } from "../../../utils/bem"; import { DEFAULT_PANEL_HEIGHT } from "../constants"; import "./Tabs.scss"; import { type BaseProps, Side, type TabProps } from "./types"; diff --git a/web/libs/editor/src/components/SidebarTabs/SidebarTabs.jsx b/web/libs/editor/src/components/SidebarTabs/SidebarTabs.jsx index 596abcf4a45d..f838b69047fe 100644 --- a/web/libs/editor/src/components/SidebarTabs/SidebarTabs.jsx +++ b/web/libs/editor/src/components/SidebarTabs/SidebarTabs.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Block, Elem } from "../../utils/bem"; import "./SidebarTabs.scss"; diff --git a/web/libs/editor/src/components/SimpleBadge/SimpleBadge.jsx b/web/libs/editor/src/components/SimpleBadge/SimpleBadge.jsx index 114d153aeb0d..e4dd3a908be4 100644 --- a/web/libs/editor/src/components/SimpleBadge/SimpleBadge.jsx +++ b/web/libs/editor/src/components/SimpleBadge/SimpleBadge.jsx @@ -1,4 +1,3 @@ -import React from "react"; import styles from "./SimpleBadge.module.scss"; export const SimpleBadge = ({ number, className, ...props }) => ( diff --git a/web/libs/editor/src/components/Tags/Object.tsx b/web/libs/editor/src/components/Tags/Object.tsx index f845e2d05bd2..59f2c0d498c5 100644 --- a/web/libs/editor/src/components/Tags/Object.tsx +++ b/web/libs/editor/src/components/Tags/Object.tsx @@ -1,4 +1,4 @@ -import React, { type CSSProperties, type FC } from "react"; +import type { CSSProperties, FC } from "react"; import { observer } from "mobx-react"; import { cn } from "../../utils/bem"; diff --git a/web/libs/editor/src/components/TextHighlight/EmojiNode.jsx b/web/libs/editor/src/components/TextHighlight/EmojiNode.jsx index 98fecb2e8ec4..721ebd6dd477 100644 --- a/web/libs/editor/src/components/TextHighlight/EmojiNode.jsx +++ b/web/libs/editor/src/components/TextHighlight/EmojiNode.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { PropTypes } from "prop-types"; import { HtxTextNode } from "./Node"; diff --git a/web/libs/editor/src/components/TextHighlight/Node.jsx b/web/libs/editor/src/components/TextHighlight/Node.jsx index 1e1e05ac3679..2284957f22de 100644 --- a/web/libs/editor/src/components/TextHighlight/Node.jsx +++ b/web/libs/editor/src/components/TextHighlight/Node.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { inject, observer } from "mobx-react"; import TextNode from "../TextNode/TextNode"; diff --git a/web/libs/editor/src/components/TextHighlight/TextHighlight.jsx b/web/libs/editor/src/components/TextHighlight/TextHighlight.jsx index 9bc61dcc12ca..018a7ecdd5b6 100644 --- a/web/libs/editor/src/components/TextHighlight/TextHighlight.jsx +++ b/web/libs/editor/src/components/TextHighlight/TextHighlight.jsx @@ -1,5 +1,5 @@ import emojiRegex from "emoji-regex"; -import React, { Component } from "react"; +import { Component } from "react"; import { observer } from "mobx-react"; import Utils from "../../utils"; diff --git a/web/libs/editor/src/components/TextHighlight/UrlNode.jsx b/web/libs/editor/src/components/TextHighlight/UrlNode.jsx index e456a7975306..40f1689b5569 100644 --- a/web/libs/editor/src/components/TextHighlight/UrlNode.jsx +++ b/web/libs/editor/src/components/TextHighlight/UrlNode.jsx @@ -1,4 +1,3 @@ -import React from "react"; import PropTypes from "prop-types"; import { HtxTextNode } from "./Node"; diff --git a/web/libs/editor/src/components/TextNode/TextNode.jsx b/web/libs/editor/src/components/TextNode/TextNode.jsx index 34e104e52e82..ff32d271397e 100644 --- a/web/libs/editor/src/components/TextNode/TextNode.jsx +++ b/web/libs/editor/src/components/TextNode/TextNode.jsx @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import { Component } from "react"; import { PropTypes } from "prop-types"; export default class TextNode extends Component { diff --git a/web/libs/editor/src/components/TimeDurationControl/TimeDurationControl.tsx b/web/libs/editor/src/components/TimeDurationControl/TimeDurationControl.tsx index 5be144046805..e06589656ae5 100644 --- a/web/libs/editor/src/components/TimeDurationControl/TimeDurationControl.tsx +++ b/web/libs/editor/src/components/TimeDurationControl/TimeDurationControl.tsx @@ -1,4 +1,4 @@ -import React, { type FC } from "react"; +import type { FC } from "react"; import { Block } from "../../utils/bem"; import "./TimeDurationControl.scss"; diff --git a/web/libs/editor/src/components/Timeline/Controls.tsx b/web/libs/editor/src/components/Timeline/Controls.tsx index 3c79ac0831b7..35bb89dbad42 100644 --- a/web/libs/editor/src/components/Timeline/Controls.tsx +++ b/web/libs/editor/src/components/Timeline/Controls.tsx @@ -1,4 +1,4 @@ -import React, { type FC, memo, type MouseEvent, useCallback, useContext, useEffect, useMemo, useState } from "react"; +import { type FC, memo, type MouseEvent, useCallback, useContext, useEffect, useMemo, useState } from "react"; import { IconBackward, IconChevronLeft, diff --git a/web/libs/editor/src/components/Timeline/Controls/Info.tsx b/web/libs/editor/src/components/Timeline/Controls/Info.tsx index a5a7aa7040a4..36e1323fd5da 100644 --- a/web/libs/editor/src/components/Timeline/Controls/Info.tsx +++ b/web/libs/editor/src/components/Timeline/Controls/Info.tsx @@ -1,4 +1,4 @@ -import React, { type FC } from "react"; +import type { FC } from "react"; import { Block, Elem } from "../../../utils/bem"; import "./Info.scss"; diff --git a/web/libs/editor/src/components/Timeline/Views/Frames/Keypoints.tsx b/web/libs/editor/src/components/Timeline/Views/Frames/Keypoints.tsx index 4d6feb0a94eb..1156cd27f42a 100644 --- a/web/libs/editor/src/components/Timeline/Views/Frames/Keypoints.tsx +++ b/web/libs/editor/src/components/Timeline/Views/Frames/Keypoints.tsx @@ -1,5 +1,5 @@ import chroma from "chroma-js"; -import { type CSSProperties, type FC, memo, type MouseEvent, useCallback, useContext, useMemo } from "react"; +import { type FC, memo, type MouseEvent, useCallback, useContext, useMemo } from "react"; import { Block, Elem } from "../../../../utils/bem"; import { clamp } from "../../../../utils/utilities"; import { TimelineContext } from "../../Context"; diff --git a/web/libs/editor/src/components/Tools/Basic.jsx b/web/libs/editor/src/components/Tools/Basic.jsx index 720d22c2aa10..fead76854e03 100644 --- a/web/libs/editor/src/components/Tools/Basic.jsx +++ b/web/libs/editor/src/components/Tools/Basic.jsx @@ -1,4 +1,4 @@ -import React, { Component } from "react"; +import { Component } from "react"; import { Button, Tooltip } from "antd"; import { observer } from "mobx-react"; diff --git a/web/libs/editor/src/components/Tools/Slider.jsx b/web/libs/editor/src/components/Tools/Slider.jsx index 6c7efd4cfc53..461d0b222fb1 100644 --- a/web/libs/editor/src/components/Tools/Slider.jsx +++ b/web/libs/editor/src/components/Tools/Slider.jsx @@ -1,4 +1,4 @@ -import React, { Component, Fragment } from "react"; +import { Component, Fragment } from "react"; import { Button, Slider, Tooltip } from "antd"; import { observer } from "mobx-react"; diff --git a/web/libs/editor/src/components/Tools/SliderDropDown.jsx b/web/libs/editor/src/components/Tools/SliderDropDown.jsx index 43ab26b6e216..a2c87a0a401c 100644 --- a/web/libs/editor/src/components/Tools/SliderDropDown.jsx +++ b/web/libs/editor/src/components/Tools/SliderDropDown.jsx @@ -1,4 +1,4 @@ -import React, { Component, Fragment } from "react"; +import { Component, Fragment } from "react"; import { Button, Dropdown, Menu, Slider } from "antd"; import { observer } from "mobx-react"; import { ReloadOutlined } from "@ant-design/icons"; diff --git a/web/libs/editor/src/components/TopBar/CurrentTask.jsx b/web/libs/editor/src/components/TopBar/CurrentTask.jsx index d6295f563bcd..dceb279d2edd 100644 --- a/web/libs/editor/src/components/TopBar/CurrentTask.jsx +++ b/web/libs/editor/src/components/TopBar/CurrentTask.jsx @@ -1,4 +1,4 @@ -import React, { useMemo } from "react"; +import { useMemo } from "react"; import { observer } from "mobx-react"; import { useEffect, useState } from "react"; import { Button } from "../../common/Button/Button"; diff --git a/web/libs/editor/src/components/TreeValidation/TreeValidation.jsx b/web/libs/editor/src/components/TreeValidation/TreeValidation.jsx index 80828f198b09..96b5b7560247 100644 --- a/web/libs/editor/src/components/TreeValidation/TreeValidation.jsx +++ b/web/libs/editor/src/components/TreeValidation/TreeValidation.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { PropTypes } from "prop-types"; import { getEnv } from "mobx-state-tree"; import { inject, observer } from "mobx-react"; diff --git a/web/libs/editor/src/core/Tree.tsx b/web/libs/editor/src/core/Tree.tsx index 9fd4564aa728..f849808639de 100644 --- a/web/libs/editor/src/core/Tree.tsx +++ b/web/libs/editor/src/core/Tree.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { getParentOfType, getType } from "mobx-state-tree"; import type { IAnyComplexType, IAnyStateTreeNode } from "mobx-state-tree/dist/internal"; diff --git a/web/libs/editor/src/env/development.js b/web/libs/editor/src/env/development.js index 7a6cb080e970..5367c4d18a6a 100644 --- a/web/libs/editor/src/env/development.js +++ b/web/libs/editor/src/env/development.js @@ -2,73 +2,6 @@ /* eslint-disable no-unused-vars */ import External from "../core/External"; import Messages from "../utils/messages"; - -/** - * Text - */ -import { DialogueAnalysis } from "../examples/dialogue_analysis"; -import { NamedEntity } from "../examples/named_entity"; -import { References } from "../examples/references"; -import { Required } from "../examples/required"; -import { Sentiment } from "../examples/sentiment_analysis"; -import { Nested as NestedSimple } from "../examples/nested_choices"; -import { Nested } from "../examples/nested_choices/complicated"; -import { Dialogue } from "../examples/phrases"; - -/** - * Audio/Video - */ -import { AudioClassification } from "../examples/audio_classification"; -import { AudioRegions } from "../examples/audio_regions"; -import { TranscribeAudio } from "../examples/transcribe_audio"; -import { VideoRectangles } from "../examples/video_bboxes"; -import { VideoClassification } from "../examples/video"; -import { VideoAudio } from "../examples/video_audio"; -import { AudioVideoParagraph } from "../examples/audio_video_paragraphs"; - -/** - * Image - */ -import { ImageBbox } from "../examples/image_bbox"; -import { ImageList } from "../examples/image_list"; -import { ImageBboxLarge } from "../examples/image_bbox_large"; -import { ImageKeyPoint } from "../examples/image_keypoints"; -import { ImageMultilabel } from "../examples/image_multilabel"; -import { ImageEllipselabels } from "../examples/image_ellipses"; -import { ImageOCR } from "../examples/image_ocr"; -import { ImagePolygons } from "../examples/image_polygons"; -import { ImageSegmentation } from "../examples/image_segmentation"; -import { ImageTools } from "../examples/image_tools"; -import { ImageMagicWand } from "../examples/image_magic_wand"; - -/** - * HTML - */ -import { HTMLDocument } from "../examples/html_document"; -import { Taxonomy } from "../examples/taxonomy"; -import { TaxonomyLarge } from "../examples/taxonomy_large"; -import { TaxonomyLargeInline } from "../examples/taxonomy_large_inline"; - -/** - * RichText (HTML or plain text) - */ -import { RichTextHtml } from "../examples/rich_text_html"; -import { RichTextPlain } from "../examples/rich_text_plain"; -import { RichTextPlainRemote } from "../examples/rich_text_plain_remote"; - -/** - * Different - */ -import { DateTime } from "../examples/datetime"; -import { Pairwise } from "../examples/pairwise"; -import { Repeater } from "../examples/repeater"; -import { Table } from "../examples/table"; -import { TableCsv } from "../examples/table_csv"; -import { Ranker } from "../examples/ranker"; -import { Buckets } from "../examples/ranker_buckets"; - -import { TimeSeries } from "../examples/timeseries"; -import { TimeSeriesSingle } from "../examples/timeseries_single"; import { ClassificationMixed } from "../examples/classification_mixed"; /** diff --git a/web/libs/editor/src/lib/AudioUltra/Media/WaveformAudio.ts b/web/libs/editor/src/lib/AudioUltra/Media/WaveformAudio.ts index 10925d8645c5..eff1795ef9d4 100644 --- a/web/libs/editor/src/lib/AudioUltra/Media/WaveformAudio.ts +++ b/web/libs/editor/src/lib/AudioUltra/Media/WaveformAudio.ts @@ -1,6 +1,5 @@ import { FF_LSDV_4711, isFF } from "../../../utils/feature-flags"; import { Events } from "../Common/Events"; -import { __DEBUG__ } from "../Common/Utils"; import { audioDecoderPool } from "./AudioDecoderPool"; import { type BaseAudioDecoder, DEFAULT_FREQUENCY_HZ } from "./BaseAudioDecoder"; diff --git a/web/libs/editor/src/regions/BrushRegion.jsx b/web/libs/editor/src/regions/BrushRegion.jsx index 384003514c7d..3f354b5a649c 100644 --- a/web/libs/editor/src/regions/BrushRegion.jsx +++ b/web/libs/editor/src/regions/BrushRegion.jsx @@ -1,4 +1,4 @@ -import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react"; +import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react"; import { Group, Image, Layer, Shape } from "react-konva"; import { observer } from "mobx-react"; import { getParent, getRoot, getType, hasParent, isAlive, types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/regions/EllipseRegion.jsx b/web/libs/editor/src/regions/EllipseRegion.jsx index c106fab89d48..7d5b0e378473 100644 --- a/web/libs/editor/src/regions/EllipseRegion.jsx +++ b/web/libs/editor/src/regions/EllipseRegion.jsx @@ -1,4 +1,4 @@ -import React, { Fragment, useContext } from "react"; +import { Fragment, useContext } from "react"; import { Ellipse } from "react-konva"; import { getRoot, types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/regions/KeyPointRegion.jsx b/web/libs/editor/src/regions/KeyPointRegion.jsx index 5e8980c2252e..a18f181192be 100644 --- a/web/libs/editor/src/regions/KeyPointRegion.jsx +++ b/web/libs/editor/src/regions/KeyPointRegion.jsx @@ -1,4 +1,4 @@ -import React, { Fragment, useContext } from "react"; +import { Fragment, useContext } from "react"; import { Circle } from "react-konva"; import { getRoot, types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/regions/PolygonPoint.jsx b/web/libs/editor/src/regions/PolygonPoint.jsx index c7f86d921e14..d67fdb4ebb8c 100644 --- a/web/libs/editor/src/regions/PolygonPoint.jsx +++ b/web/libs/editor/src/regions/PolygonPoint.jsx @@ -1,4 +1,4 @@ -import React, { useState } from "react"; +import { useState } from "react"; import { Circle, Rect } from "react-konva"; import { observer } from "mobx-react"; import { getParent, getRoot, hasParent, types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/regions/PolygonRegion.jsx b/web/libs/editor/src/regions/PolygonRegion.jsx index 9e12fa99690a..a1ee6fe909f2 100644 --- a/web/libs/editor/src/regions/PolygonRegion.jsx +++ b/web/libs/editor/src/regions/PolygonRegion.jsx @@ -1,5 +1,5 @@ import Konva from "konva"; -import React, { memo, useContext, useEffect, useMemo } from "react"; +import { memo, useContext, useEffect, useMemo } from "react"; import { Group, Line } from "react-konva"; import { destroy, detach, getRoot, isAlive, types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/regions/RectRegion.jsx b/web/libs/editor/src/regions/RectRegion.jsx index e6932b99730d..435a82be2042 100644 --- a/web/libs/editor/src/regions/RectRegion.jsx +++ b/web/libs/editor/src/regions/RectRegion.jsx @@ -1,5 +1,5 @@ import { getRoot, isAlive, types } from "mobx-state-tree"; -import React, { useContext } from "react"; +import { useContext } from "react"; import { Rect } from "react-konva"; import { ImageViewContext } from "../components/ImageView/ImageViewContext"; import { LabelOnRect } from "../components/ImageView/LabelOnRegion"; diff --git a/web/libs/editor/src/regions/TextAreaRegion.jsx b/web/libs/editor/src/regions/TextAreaRegion.jsx index ef9cdaa24b3e..892b4a9a252a 100644 --- a/web/libs/editor/src/regions/TextAreaRegion.jsx +++ b/web/libs/editor/src/regions/TextAreaRegion.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { getParentOfType, types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/stores/Annotation/Annotation.js b/web/libs/editor/src/stores/Annotation/Annotation.js index 4ab2f709dfbe..194a08b14b85 100644 --- a/web/libs/editor/src/stores/Annotation/Annotation.js +++ b/web/libs/editor/src/stores/Annotation/Annotation.js @@ -1,6 +1,5 @@ import throttle from "lodash.throttle"; import { destroy, detach, flow, getEnv, getParent, getRoot, isAlive, onSnapshot, types } from "mobx-state-tree"; -import Constants from "../../core/Constants"; import { errorBuilder } from "../../core/DataValidator/ConfigValidator"; import { guidGenerator } from "../../core/Helpers"; import { Hotkey } from "../../core/Hotkey"; diff --git a/web/libs/editor/src/tags/control/BrushLabels.jsx b/web/libs/editor/src/tags/control/BrushLabels.jsx index 8f26df38667b..93442d53648e 100644 --- a/web/libs/editor/src/tags/control/BrushLabels.jsx +++ b/web/libs/editor/src/tags/control/BrushLabels.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/Choice.jsx b/web/libs/editor/src/tags/control/Choice.jsx index bab2454ab4ab..8af81054ff2b 100644 --- a/web/libs/editor/src/tags/control/Choice.jsx +++ b/web/libs/editor/src/tags/control/Choice.jsx @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from "react"; +import { useCallback, useState } from "react"; import Button from "antd/lib/button/index"; import Radio from "antd/lib/radio/index"; import Checkbox from "antd/lib/checkbox/index"; diff --git a/web/libs/editor/src/tags/control/Choices.jsx b/web/libs/editor/src/tags/control/Choices.jsx index a7bf260b2cd3..1c39563e2cc9 100644 --- a/web/libs/editor/src/tags/control/Choices.jsx +++ b/web/libs/editor/src/tags/control/Choices.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Select } from "antd"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/DateTime.jsx b/web/libs/editor/src/tags/control/DateTime.jsx index bbb0909792c3..88a1be0597b4 100644 --- a/web/libs/editor/src/tags/control/DateTime.jsx +++ b/web/libs/editor/src/tags/control/DateTime.jsx @@ -1,5 +1,5 @@ import * as d3 from "d3"; -import React, { useState } from "react"; +import { useState } from "react"; import { inject, observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/EllipseLabels.jsx b/web/libs/editor/src/tags/control/EllipseLabels.jsx index 1249f06b2f22..f95e6ae17a2a 100644 --- a/web/libs/editor/src/tags/control/EllipseLabels.jsx +++ b/web/libs/editor/src/tags/control/EllipseLabels.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/HyperTextLabels.jsx b/web/libs/editor/src/tags/control/HyperTextLabels.jsx index 11f9f31195a4..dcc4110ecd85 100644 --- a/web/libs/editor/src/tags/control/HyperTextLabels.jsx +++ b/web/libs/editor/src/tags/control/HyperTextLabels.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/KeyPointLabels.jsx b/web/libs/editor/src/tags/control/KeyPointLabels.jsx index ab13722a787d..9aee33b582d6 100644 --- a/web/libs/editor/src/tags/control/KeyPointLabels.jsx +++ b/web/libs/editor/src/tags/control/KeyPointLabels.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/Label.jsx b/web/libs/editor/src/tags/control/Label.jsx index dd9baa8d9df0..3bc6ecbfc045 100644 --- a/web/libs/editor/src/tags/control/Label.jsx +++ b/web/libs/editor/src/tags/control/Label.jsx @@ -1,7 +1,6 @@ import { inject, observer } from "mobx-react"; import { getType, types } from "mobx-state-tree"; import ColorScheme from "pleasejs"; -import React from "react"; import { Tooltip } from "../../common/Tooltip/Tooltip"; import InfoModal from "../../components/Infomodal/Infomodal"; diff --git a/web/libs/editor/src/tags/control/Labels/Labels.jsx b/web/libs/editor/src/tags/control/Labels/Labels.jsx index 2096e6b0530c..a70c27449145 100644 --- a/web/libs/editor/src/tags/control/Labels/Labels.jsx +++ b/web/libs/editor/src/tags/control/Labels/Labels.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { cast, types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/Number.jsx b/web/libs/editor/src/tags/control/Number.jsx index c877802505b9..fc16fa5a1666 100644 --- a/web/libs/editor/src/tags/control/Number.jsx +++ b/web/libs/editor/src/tags/control/Number.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { inject, observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/ParagraphLabels.jsx b/web/libs/editor/src/tags/control/ParagraphLabels.jsx index 0a098313f8a9..7e21754ed788 100644 --- a/web/libs/editor/src/tags/control/ParagraphLabels.jsx +++ b/web/libs/editor/src/tags/control/ParagraphLabels.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/PolygonLabels.jsx b/web/libs/editor/src/tags/control/PolygonLabels.jsx index aed1ee7dc564..dc40320c7a2c 100644 --- a/web/libs/editor/src/tags/control/PolygonLabels.jsx +++ b/web/libs/editor/src/tags/control/PolygonLabels.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/Ranker.jsx b/web/libs/editor/src/tags/control/Ranker.jsx index d636a0118ee2..58e72a421df0 100644 --- a/web/libs/editor/src/tags/control/Ranker.jsx +++ b/web/libs/editor/src/tags/control/Ranker.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { inject, observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/Rating.jsx b/web/libs/editor/src/tags/control/Rating.jsx index 5e7a67bfb6cb..8365d1c3e294 100644 --- a/web/libs/editor/src/tags/control/Rating.jsx +++ b/web/libs/editor/src/tags/control/Rating.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Rate } from "antd"; import { inject, observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/RectangleLabels.jsx b/web/libs/editor/src/tags/control/RectangleLabels.jsx index 587d3dca48d9..edfa8f180b87 100644 --- a/web/libs/editor/src/tags/control/RectangleLabels.jsx +++ b/web/libs/editor/src/tags/control/RectangleLabels.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/Shortcut.jsx b/web/libs/editor/src/tags/control/Shortcut.jsx index 9507a889bd0c..bc3577105f50 100644 --- a/web/libs/editor/src/tags/control/Shortcut.jsx +++ b/web/libs/editor/src/tags/control/Shortcut.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Tag } from "antd"; import { inject, observer } from "mobx-react"; import { getParent, types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/Taxonomy/Taxonomy.jsx b/web/libs/editor/src/tags/control/Taxonomy/Taxonomy.jsx index 1a232fe5ef3a..00a2b59890a7 100644 --- a/web/libs/editor/src/tags/control/Taxonomy/Taxonomy.jsx +++ b/web/libs/editor/src/tags/control/Taxonomy/Taxonomy.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { flow, getRoot, types } from "mobx-state-tree"; import { Spin } from "antd"; diff --git a/web/libs/editor/src/tags/control/TextArea/TextArea.jsx b/web/libs/editor/src/tags/control/TextArea/TextArea.jsx index 7201d4860615..689646799c55 100644 --- a/web/libs/editor/src/tags/control/TextArea/TextArea.jsx +++ b/web/libs/editor/src/tags/control/TextArea/TextArea.jsx @@ -1,4 +1,4 @@ -import React, { createRef, useCallback } from "react"; +import { createRef, useCallback } from "react"; import Button from "antd/lib/button/index"; import Form from "antd/lib/form/index"; import Input from "antd/lib/input/index"; diff --git a/web/libs/editor/src/tags/control/TextArea/TextAreaRegionView.jsx b/web/libs/editor/src/tags/control/TextArea/TextAreaRegionView.jsx index 6e9d60f10f9d..87adcf0669d2 100644 --- a/web/libs/editor/src/tags/control/TextArea/TextAreaRegionView.jsx +++ b/web/libs/editor/src/tags/control/TextArea/TextAreaRegionView.jsx @@ -1,4 +1,4 @@ -import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from "react"; import { observer } from "mobx-react"; import { isAlive } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/control/TimeSeriesLabels.jsx b/web/libs/editor/src/tags/control/TimeSeriesLabels.jsx index 4e5a8622526f..94973fd43208 100644 --- a/web/libs/editor/src/tags/control/TimeSeriesLabels.jsx +++ b/web/libs/editor/src/tags/control/TimeSeriesLabels.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/object/Audio.jsx b/web/libs/editor/src/tags/object/Audio.jsx index 45a388ecccdb..afdf943af46d 100644 --- a/web/libs/editor/src/tags/object/Audio.jsx +++ b/web/libs/editor/src/tags/object/Audio.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { inject, observer } from "mobx-react"; import { getEnv, types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/object/Audio/Controls.jsx b/web/libs/editor/src/tags/object/Audio/Controls.jsx index d58dccc1b3c2..46a74a45599d 100644 --- a/web/libs/editor/src/tags/object/Audio/Controls.jsx +++ b/web/libs/editor/src/tags/object/Audio/Controls.jsx @@ -1,4 +1,4 @@ -import React, { Fragment } from "react"; +import { Fragment } from "react"; import { Button } from "antd"; import { observer } from "mobx-react"; import { PauseCircleOutlined, PlayCircleOutlined } from "@ant-design/icons"; diff --git a/web/libs/editor/src/tags/object/PagedView.jsx b/web/libs/editor/src/tags/object/PagedView.jsx index e3d1721c5f13..7d966a5d96c5 100644 --- a/web/libs/editor/src/tags/object/PagedView.jsx +++ b/web/libs/editor/src/tags/object/PagedView.jsx @@ -1,4 +1,4 @@ -import React, { useCallback, useEffect, useState } from "react"; +import { useCallback, useEffect, useState } from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/object/Table.jsx b/web/libs/editor/src/tags/object/Table.jsx index ffcc9b718eb1..ac57b0725321 100644 --- a/web/libs/editor/src/tags/object/Table.jsx +++ b/web/libs/editor/src/tags/object/Table.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Table } from "antd"; import { inject, observer } from "mobx-react"; import { flow, getEnv, types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tags/visual/Collapse.jsx b/web/libs/editor/src/tags/visual/Collapse.jsx index 2cef62431d90..cea899dec876 100644 --- a/web/libs/editor/src/tags/visual/Collapse.jsx +++ b/web/libs/editor/src/tags/visual/Collapse.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { types } from "mobx-state-tree"; import { observer } from "mobx-react"; import { Collapse } from "antd"; diff --git a/web/libs/editor/src/tags/visual/Dialog.jsx b/web/libs/editor/src/tags/visual/Dialog.jsx index 84000a16e726..8647757c5323 100644 --- a/web/libs/editor/src/tags/visual/Dialog.jsx +++ b/web/libs/editor/src/tags/visual/Dialog.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { inject, observer } from "mobx-react"; import { types } from "mobx-state-tree"; import { Divider, Empty } from "antd"; diff --git a/web/libs/editor/src/tags/visual/Filter.jsx b/web/libs/editor/src/tags/visual/Filter.jsx index 03a19b884b98..b9829abb685f 100644 --- a/web/libs/editor/src/tags/visual/Filter.jsx +++ b/web/libs/editor/src/tags/visual/Filter.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { types } from "mobx-state-tree"; import { observer } from "mobx-react"; import { Input } from "antd"; diff --git a/web/libs/editor/src/tags/visual/Header.jsx b/web/libs/editor/src/tags/visual/Header.jsx index a3410774c42d..d5af3bd35507 100644 --- a/web/libs/editor/src/tags/visual/Header.jsx +++ b/web/libs/editor/src/tags/visual/Header.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { types } from "mobx-state-tree"; import { observer } from "mobx-react"; import { Typography } from "antd"; diff --git a/web/libs/editor/src/tags/visual/Style.jsx b/web/libs/editor/src/tags/visual/Style.jsx index 39bcbbd3d8be..4098d9720fa1 100644 --- a/web/libs/editor/src/tags/visual/Style.jsx +++ b/web/libs/editor/src/tags/visual/Style.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { types } from "mobx-state-tree"; import { observer } from "mobx-react"; diff --git a/web/libs/editor/src/tags/visual/View.jsx b/web/libs/editor/src/tags/visual/View.jsx index c5e035fb8f09..4940dcb33a61 100644 --- a/web/libs/editor/src/tags/visual/View.jsx +++ b/web/libs/editor/src/tags/visual/View.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tools/Base.jsx b/web/libs/editor/src/tools/Base.jsx index a81924436b6e..d40b9489ed92 100644 --- a/web/libs/editor/src/tools/Base.jsx +++ b/web/libs/editor/src/tools/Base.jsx @@ -1,6 +1,5 @@ import { getEnv, getSnapshot, getType, types } from "mobx-state-tree"; import { observer } from "mobx-react"; -import React from "react"; import { Tool } from "../components/Toolbar/Tool"; import { toKebabCase } from "strman"; diff --git a/web/libs/editor/src/tools/Brightness.jsx b/web/libs/editor/src/tools/Brightness.jsx index 94e653e10308..db01a1e3df36 100644 --- a/web/libs/editor/src/tools/Brightness.jsx +++ b/web/libs/editor/src/tools/Brightness.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tools/Brush.jsx b/web/libs/editor/src/tools/Brush.jsx index 7ae509258a40..c554e0f3cf5d 100644 --- a/web/libs/editor/src/tools/Brush.jsx +++ b/web/libs/editor/src/tools/Brush.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tools/Contrast.jsx b/web/libs/editor/src/tools/Contrast.jsx index 0f663d31f615..4070173b9f57 100644 --- a/web/libs/editor/src/tools/Contrast.jsx +++ b/web/libs/editor/src/tools/Contrast.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tools/Erase.jsx b/web/libs/editor/src/tools/Erase.jsx index a864e7ff760e..6574745998e5 100644 --- a/web/libs/editor/src/tools/Erase.jsx +++ b/web/libs/editor/src/tools/Erase.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tools/LiveWire.jsx b/web/libs/editor/src/tools/LiveWire.jsx index b10efb4dce32..618314c86947 100644 --- a/web/libs/editor/src/tools/LiveWire.jsx +++ b/web/libs/editor/src/tools/LiveWire.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tools/MagicWand.jsx b/web/libs/editor/src/tools/MagicWand.jsx index c8a525d1228e..d79d12bcca97 100644 --- a/web/libs/editor/src/tools/MagicWand.jsx +++ b/web/libs/editor/src/tools/MagicWand.jsx @@ -1,4 +1,3 @@ -import React from "react"; import chroma from "chroma-js"; import { observer } from "mobx-react"; import { flow, types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tools/Rotate.jsx b/web/libs/editor/src/tools/Rotate.jsx index 1d349bdd5747..99f3f463a302 100644 --- a/web/libs/editor/src/tools/Rotate.jsx +++ b/web/libs/editor/src/tools/Rotate.jsx @@ -1,5 +1,3 @@ -import React from "react"; - import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/tools/Zoom.jsx b/web/libs/editor/src/tools/Zoom.jsx index be6857916ab6..536288d1fa13 100644 --- a/web/libs/editor/src/tools/Zoom.jsx +++ b/web/libs/editor/src/tools/Zoom.jsx @@ -1,4 +1,4 @@ -import React, { Fragment } from "react"; +import { Fragment } from "react"; import { observer } from "mobx-react"; import { types } from "mobx-state-tree"; diff --git a/web/libs/editor/src/utils/messages.jsx b/web/libs/editor/src/utils/messages.jsx index f1fcbec7e8ae..decf4b5091f7 100644 --- a/web/libs/editor/src/utils/messages.jsx +++ b/web/libs/editor/src/utils/messages.jsx @@ -1,6 +1,3 @@ -/* eslint-disable react/jsx-no-target-blank */ -import React from "react"; - import { htmlEscape } from "./html"; const URL_CORS_DOCS = "https://labelstud.io/guide/storage.html#Troubleshoot-CORS-and-access-problems"; diff --git a/web/libs/editor/tests/integration/e2e/ner/emoji.cy.ts b/web/libs/editor/tests/integration/e2e/ner/emoji.cy.ts index 9a7511d38143..22d59c3d90a6 100644 --- a/web/libs/editor/tests/integration/e2e/ner/emoji.cy.ts +++ b/web/libs/editor/tests/integration/e2e/ner/emoji.cy.ts @@ -1,4 +1,4 @@ -import { Labels, LabelStudio, Sidebar } from "@humansignal/frontend-test/helpers/LSF"; +import { Labels, LabelStudio } from "@humansignal/frontend-test/helpers/LSF"; import { RichText } from "@humansignal/frontend-test/helpers/LSF/RichText"; import { FF_LSDV_4620_3 } from "../../../../src/utils/feature-flags"; import { diff --git a/web/libs/editor/tests/integration/e2e/outliner/region_tree.cy.ts b/web/libs/editor/tests/integration/e2e/outliner/region_tree.cy.ts index 4cb8214b3253..7f4d779d9768 100644 --- a/web/libs/editor/tests/integration/e2e/outliner/region_tree.cy.ts +++ b/web/libs/editor/tests/integration/e2e/outliner/region_tree.cy.ts @@ -1,4 +1,4 @@ -import { ImageView, Labels, LabelStudio, Sidebar } from "@humansignal/frontend-test/helpers/LSF"; +import { LabelStudio, Sidebar } from "@humansignal/frontend-test/helpers/LSF"; import { FF_DEV_3873, FF_OUTLINER_OPTIM } from "../../../../src/utils/feature-flags"; describe("Outliner - Regions tree", () => { diff --git a/web/libs/frontend-test/src/configure.js b/web/libs/frontend-test/src/configure.js index 8edd0fa855b8..4b6271f109e8 100644 --- a/web/libs/frontend-test/src/configure.js +++ b/web/libs/frontend-test/src/configure.js @@ -1,6 +1,5 @@ import { defineConfig } from "cypress"; import path from "path"; -import { setupTypescript } from "./plugins/typescript"; import installLogsPrinter from "cypress-terminal-report/src/installLogsPrinter"; import * as tasks from "./tasks"; import { disableChromeGPU } from "./plugins/disable_gpu"; diff --git a/web/libs/frontend-test/src/helpers/LSF/Choices.ts b/web/libs/frontend-test/src/helpers/LSF/Choices.ts index 9162546ec05a..05e6866b3cf5 100644 --- a/web/libs/frontend-test/src/helpers/LSF/Choices.ts +++ b/web/libs/frontend-test/src/helpers/LSF/Choices.ts @@ -1,6 +1,3 @@ -import { FF_DEV_2007 } from "../../feature-flags"; -import { LabelStudio } from "./LabelStudio"; - class ChoicesHelper { private get _baseRootSelector() { return ".lsf-choices"; diff --git a/web/libs/frontend-test/src/helpers/LSF/ToolBar.ts b/web/libs/frontend-test/src/helpers/LSF/ToolBar.ts index a370290dc193..224ca891fa61 100644 --- a/web/libs/frontend-test/src/helpers/LSF/ToolBar.ts +++ b/web/libs/frontend-test/src/helpers/LSF/ToolBar.ts @@ -1,4 +1,3 @@ -import { FF_DEV_1170 } from "@humansignal/frontend-test/feature-flags"; import { LabelStudio } from "@humansignal/frontend-test/helpers/LSF/LabelStudio"; import { FF_DEV_3873 } from "../../../../editor/src/utils/feature-flags"; From cf62665353ffdf3dd4d30f35e051f53e74692df1 Mon Sep 17 00:00:00 2001 From: Yousif Yassi Date: Mon, 21 Oct 2024 16:32:36 -0400 Subject: [PATCH 2/5] lint cleanup --- .../datamanager/src/components/Common/Table/TableCheckbox.jsx | 1 - web/libs/editor/src/components/HtxTextBox/HtxTextBox.jsx | 1 - web/libs/editor/tests/integration/e2e/relations/audio.cy.ts | 2 +- web/libs/ui/src/lib/checkbox/checkbox.spec.tsx | 1 - web/libs/ui/src/lib/checkbox/checkbox.stories.tsx | 1 - web/libs/ui/src/lib/checkbox/checkbox.tsx | 2 +- 6 files changed, 2 insertions(+), 6 deletions(-) diff --git a/web/libs/datamanager/src/components/Common/Table/TableCheckbox.jsx b/web/libs/datamanager/src/components/Common/Table/TableCheckbox.jsx index 9d582488e1d8..11be46740aca 100644 --- a/web/libs/datamanager/src/components/Common/Table/TableCheckbox.jsx +++ b/web/libs/datamanager/src/components/Common/Table/TableCheckbox.jsx @@ -1,4 +1,3 @@ -import React from "react"; import { Checkbox } from "@humansignal/ui"; const IndeterminateCheckbox = ({ checked, indeterminate, ...props }) => { diff --git a/web/libs/editor/src/components/HtxTextBox/HtxTextBox.jsx b/web/libs/editor/src/components/HtxTextBox/HtxTextBox.jsx index 754d79d6f284..56748e1fcf2f 100644 --- a/web/libs/editor/src/components/HtxTextBox/HtxTextBox.jsx +++ b/web/libs/editor/src/components/HtxTextBox/HtxTextBox.jsx @@ -4,7 +4,6 @@ import { EnterOutlined } from "@ant-design/icons"; import { IconEdit, IconTrashAlt } from "../../assets/icons"; import { Button } from "../../common/Button/Button"; import { Tooltip } from "../../common/Tooltip/Tooltip"; -import { Elem } from "../../utils/bem"; import styles from "./HtxTextBox.module.scss"; import throttle from "lodash.throttle"; diff --git a/web/libs/editor/tests/integration/e2e/relations/audio.cy.ts b/web/libs/editor/tests/integration/e2e/relations/audio.cy.ts index 9eaf99d55193..e3b4fe279cc8 100644 --- a/web/libs/editor/tests/integration/e2e/relations/audio.cy.ts +++ b/web/libs/editor/tests/integration/e2e/relations/audio.cy.ts @@ -1,4 +1,4 @@ -import { AudioView, LabelStudio, Relations, Sidebar } from "@humansignal/frontend-test/helpers/LSF"; +import { AudioView, LabelStudio, Relations } from "@humansignal/frontend-test/helpers/LSF"; import { audioWithFourRegionsResult, audioWithLabelsConfig, audioWithLabelsData } from "../../data/relations/audio"; describe("Relations: Audio", () => { diff --git a/web/libs/ui/src/lib/checkbox/checkbox.spec.tsx b/web/libs/ui/src/lib/checkbox/checkbox.spec.tsx index eb614334835e..b7738aaf455e 100644 --- a/web/libs/ui/src/lib/checkbox/checkbox.spec.tsx +++ b/web/libs/ui/src/lib/checkbox/checkbox.spec.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { render, fireEvent } from "@testing-library/react"; import Checkbox from "./checkbox"; diff --git a/web/libs/ui/src/lib/checkbox/checkbox.stories.tsx b/web/libs/ui/src/lib/checkbox/checkbox.stories.tsx index e2cbd1b145a9..3491caee3c05 100644 --- a/web/libs/ui/src/lib/checkbox/checkbox.stories.tsx +++ b/web/libs/ui/src/lib/checkbox/checkbox.stories.tsx @@ -1,4 +1,3 @@ -import React from "react"; import type { Meta, StoryObj } from "@storybook/react"; import { Checkbox } from "./checkbox"; import { action } from "@storybook/addon-actions"; diff --git a/web/libs/ui/src/lib/checkbox/checkbox.tsx b/web/libs/ui/src/lib/checkbox/checkbox.tsx index f7c34b509ac9..bb62f775f373 100644 --- a/web/libs/ui/src/lib/checkbox/checkbox.tsx +++ b/web/libs/ui/src/lib/checkbox/checkbox.tsx @@ -1,4 +1,4 @@ -import { type InputHTMLAttributes, useEffect, useMemo, useRef } from "react"; +import { type InputHTMLAttributes, useEffect, useRef } from "react"; import { clsx } from "clsx"; import styles from "./checkbox.module.scss"; From c8b26aafeedd5036442148dc407cfce985abe978 Mon Sep 17 00:00:00 2001 From: Yousif Yassi Date: Mon, 21 Oct 2024 17:38:24 -0400 Subject: [PATCH 3/5] forcing an update --- web/libs/editor/src/components/App/App.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/web/libs/editor/src/components/App/App.jsx b/web/libs/editor/src/components/App/App.jsx index 9e21241f055a..f02dab61ab46 100644 --- a/web/libs/editor/src/components/App/App.jsx +++ b/web/libs/editor/src/components/App/App.jsx @@ -329,3 +329,4 @@ class App extends Component { } export default observer(App); + From 6b4e316851ed559a597201f4e5cbb2dc42b8f0d7 Mon Sep 17 00:00:00 2001 From: Yousif Yassi Date: Mon, 21 Oct 2024 17:39:26 -0400 Subject: [PATCH 4/5] lint cleanup --- web/libs/editor/src/components/App/App.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/web/libs/editor/src/components/App/App.jsx b/web/libs/editor/src/components/App/App.jsx index f02dab61ab46..9e21241f055a 100644 --- a/web/libs/editor/src/components/App/App.jsx +++ b/web/libs/editor/src/components/App/App.jsx @@ -329,4 +329,3 @@ class App extends Component { } export default observer(App); - From 2822d9922e9cd1ee641b34e8bdc7360e4b8c7af1 Mon Sep 17 00:00:00 2001 From: Yousif Yassi Date: Mon, 21 Oct 2024 17:48:56 -0400 Subject: [PATCH 5/5] unused variables are now warnings only - not errors --- web/biome.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/biome.json b/web/biome.json index 4a7260517692..29f09e9e5142 100644 --- a/web/biome.json +++ b/web/biome.json @@ -59,7 +59,7 @@ "level": "warn" }, "noUnusedVariables": { - "level": "error" + "level": "warn" } }, "performance": {