fix: remove unused imports and variables (part 1 — packages & non-web-core) (#8751)

* fix: remove unused imports and variables (part 1)

Resolve oxlint no-unused-vars warnings in packages/*, apps/admin,
apps/space, apps/live, and apps/web (non-core).

* fix: resolve CI check failures

* fix: resolve check:types failures

* fix: resolve check:types and check:format failures

- Use destructuring alias for activeCycleResolvedPath
- Format propel tab-navigation file

* fix: format propel button helper with oxfmt

Reorder Tailwind classes to match oxfmt canonical ordering.
This commit is contained in:
darkingtail 2026-03-25 04:17:03 +08:00 committed by sriram veeraghanta
parent c3c7c72aff
commit d9695afcdc
95 changed files with 71 additions and 145 deletions

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import { useState } from "react";
import { observer } from "mobx-react";
// plane imports

View file

@ -5,7 +5,6 @@
*/
// ui
import type { FC } from "react";
import { observer } from "mobx-react";
import { useParams, useRouter } from "next/navigation";
import { PanelRight } from "lucide-react";
@ -14,7 +13,6 @@ import { useTranslation } from "@plane/i18n";
import { YourWorkIcon, ChevronDownIcon } from "@plane/propel/icons";
import type { IUserProfileProjectSegregation } from "@plane/types";
import { Breadcrumbs, Header, CustomMenu } from "@plane/ui";
import { cn } from "@plane/utils";
// components
import { BreadcrumbLink } from "@/components/common/breadcrumb-link";
import { ProfileIssuesFilter } from "@/components/profile/profile-issues-filter";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import { isEmpty } from "lodash-es";
import { observer } from "mobx-react";
// plane helpers

View file

@ -81,7 +81,6 @@ function UserInvitationsPage() {
.then(() => {
mutate(USER_WORKSPACES_LIST);
const firstInviteId = invitationsRespond[0];
const invitation = invitations?.find((i) => i.id === firstInviteId);
const redirectWorkspace = invitations?.find((i) => i.id === firstInviteId)?.workspace;
updateUserProfile({ last_workspace_id: redirectWorkspace?.id })
.then(() => {

View file

@ -8,7 +8,7 @@ import { useMemo } from "react";
import { useTranslation } from "@plane/i18n";
import { getAnalyticsTabs } from "./tabs";
export const useAnalyticsTabs = (workspaceSlug: string) => {
export const useAnalyticsTabs = (_workspaceSlug: string) => {
const { t } = useTranslation();
const analyticsTabs = useMemo(() => getAnalyticsTabs(t), [t]);

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import React from "react";
export type TCustomAutomationsRootProps = {

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
// plane imports

View file

@ -10,6 +10,6 @@ type TProps = {
workspace?: IWorkspace;
};
export function SubscriptionPill(props: TProps) {
export function SubscriptionPill(_props: TProps) {
return <></>;
}

View file

@ -46,7 +46,7 @@ type ActiveCyclesComponentProps = {
const ActiveCyclesComponent = observer(function ActiveCyclesComponent({
cycleId,
activeCycle,
activeCycleResolvedPath,
activeCycleResolvedPath: _activeCycleResolvedPath,
workspaceSlug,
projectId,
handleFiltersUpdate,

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import { observer } from "mobx-react";
type Props = {
cycleId: string;

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import React from "react";
// components
import { SidebarChart } from "./base";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import React from "react";
// local components
@ -15,7 +14,6 @@ type TDeDupeButtonRoot = {
label: string;
};
export function DeDupeButtonRoot(props: TDeDupeButtonRoot) {
const { workspaceSlug, isDuplicateModalOpen, label, handleOnClick } = props;
export function DeDupeButtonRoot(_props: TDeDupeButtonRoot) {
return <></>;
}

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
// types
import type { TDeDupeIssue } from "@plane/types";
@ -14,7 +13,6 @@ type TDuplicateModalRootProps = {
handleDuplicateIssueModal: (value: boolean) => void;
};
export function DuplicateModalRoot(props: TDuplicateModalRootProps) {
const { workspaceSlug, issues, handleDuplicateIssueModal } = props;
export function DuplicateModalRoot(_props: TDuplicateModalRootProps) {
return <></>;
}

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import React from "react";
import { observer } from "mobx-react";
// types

View file

@ -4,14 +4,11 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
type TDeDupeIssueButtonLabelProps = {
isOpen: boolean;
buttonLabel: string;
};
export function DeDupeIssueButtonLabel(props: TDeDupeIssueButtonLabelProps) {
const { isOpen, buttonLabel } = props;
export function DeDupeIssueButtonLabel(_props: TDeDupeIssueButtonLabelProps) {
return <></>;
}

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import React from "react";
import type { TIssue } from "@plane/types";
@ -22,6 +21,6 @@ export interface EpicModalProps {
isProjectSelectionDisabled?: boolean;
}
export function CreateUpdateEpicModal(props: EpicModalProps) {
export function CreateUpdateEpicModal(_props: EpicModalProps) {
return <></>;
}

View file

@ -4,8 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
export type TEstimateTimeInputProps = {
value?: number;
handleEstimateInputValue: (value: string) => void;

View file

@ -4,8 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import type { TEstimatePointsObject, TEstimateSystemKeys, TEstimateTypeErrorObject } from "@plane/types";
export type TEstimatePointDelete = {

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import { observer } from "mobx-react";
type TUpdateEstimateModal = {

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
//
import type { IBlockUpdateDependencyData } from "@plane/types";
import { GanttChartBlock } from "@/components/gantt-chart/blocks/block";

View file

@ -12,6 +12,6 @@ type LeftDependencyDraggableProps = {
ganttContainerRef: RefObject<HTMLDivElement>;
};
export function LeftDependencyDraggable(props: LeftDependencyDraggableProps) {
export function LeftDependencyDraggable(_props: LeftDependencyDraggableProps) {
return <></>;
}

View file

@ -11,6 +11,6 @@ type RightDependencyDraggableProps = {
block: IGanttBlock;
ganttContainerRef: RefObject<HTMLDivElement>;
};
export function RightDependencyDraggable(props: RightDependencyDraggableProps) {
export function RightDependencyDraggable(_props: RightDependencyDraggableProps) {
return <></>;
}

View file

@ -4,12 +4,9 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
type Props = {
isEpic?: boolean;
};
export function TimelineDependencyPaths(props: Props) {
const { isEpic = false } = props;
export function TimelineDependencyPaths(_props: Props) {
return <></>;
}

View file

@ -10,6 +10,6 @@ export type TInboxSourcePill = {
source: EInboxIssueSource;
};
export function InboxSourcePill(props: TInboxSourcePill) {
export function InboxSourcePill(_props: TInboxSourcePill) {
return <></>;
}

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type React from "react";
import { observer } from "mobx-react";
type Props = {

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type React from "react";
import { observer } from "mobx-react";
type Props = {

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
// plane types
import type { TIssueServiceType, TWorkItemWidgets } from "@plane/types";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
// plane types
import type { TIssueServiceType, TWorkItemWidgets } from "@plane/types";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
// plane types
import type { TIssueServiceType, TWorkItemWidgets } from "@plane/types";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import { observer } from "mobx-react";
export type TAdditionalActivityRoot = {

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import React from "react";
// plane imports

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import Link from "next/link";
// hooks
import { useIssueDetail } from "@/hooks/store/use-issue-detail";

View file

@ -4,8 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
type TIssueAdditionalPropertiesActivity = {
activityId: string;
ends: "top" | "bottom" | undefined;

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import { observer } from "mobx-react";
export type TIssueTypeActivity = { activityId: string; showIssue?: boolean; ends: "top" | "bottom" | undefined };

View file

@ -47,7 +47,7 @@ export const IssueParentSelectRoot = observer(function IssueParentSelectRoot(pro
await issueOperations.fetch(workspaceSlug, projectId, issueId, false);
if (_issueId) await fetchSubIssues(workspaceSlug, projectId, _issueId);
toggleParentIssueModal(null);
} catch (error) {
} catch (_error) {
console.error("something went wrong while fetching the issue");
}
};
@ -63,7 +63,7 @@ export const IssueParentSelectRoot = observer(function IssueParentSelectRoot(pro
await removeSubIssue(workspaceSlug, projectId, parentIssueId, issueId);
await fetchSubIssues(workspaceSlug, projectId, parentIssueId);
setSubIssueHelpers(parentIssueId, "issue_loader", issueId);
} catch (error) {
} catch (_error) {
setToast({
type: TOAST_TYPE.ERROR,
title: t("common.error.label"),

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import React from "react";
import type { IIssueDisplayProperties, TIssue } from "@plane/types";
@ -13,6 +12,6 @@ export type TWorkItemLayoutAdditionalProperties = {
issue: TIssue;
};
export function WorkItemLayoutAdditionalProperties(props: TWorkItemLayoutAdditionalProperties) {
export function WorkItemLayoutAdditionalProperties(_props: TWorkItemLayoutAdditionalProperties) {
return <></>;
}

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import React from "react";
type Props = {
@ -15,6 +14,6 @@ type Props = {
showLabel?: boolean;
};
export function IssueStats(props: Props) {
export function IssueStats(_props: Props) {
return <></>;
}

View file

@ -4,8 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
type TDuplicateWorkItemModalProps = {
workItemId: string;
onClose: () => void;

View file

@ -4,8 +4,6 @@
* See the LICENSE file for details.
*/
import type React from "react";
export type TWorkItemModalAdditionalPropertiesProps = {
isDraft?: boolean;
projectId: string | null;

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
// plane imports
import type { TActivityFilters, TActivityFilterOption } from "@plane/constants";
import { ACTIVITY_FILTER_TYPE_OPTIONS } from "@plane/constants";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import type { TIssueActivityComment } from "@plane/types";
type TIssueActivityWorklog = {

View file

@ -4,8 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
type TIssueActivityWorklogCreateButton = {
workspaceSlug: string;
projectId: string;

View file

@ -4,8 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
type TIssueWorklogProperty = {
workspaceSlug: string;
projectId: string;

View file

@ -7,7 +7,6 @@
import { useState } from "react";
import { observer } from "mobx-react";
// plane imports
import { PRODUCT_TOUR_TRACKER_ELEMENTS } from "@plane/constants";
import { Button } from "@plane/propel/button";
import { CloseIcon, PlaneLockup } from "@plane/propel/icons";
// assets

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type React from "react";
import { observer } from "mobx-react";
// components
import type { EPageStoreType } from "@/plane-web/hooks/store";
@ -16,6 +15,6 @@ export type TPageModalsProps = {
storeType: EPageStoreType;
};
export const PageModals = observer(function PageModals(props: TPageModalsProps) {
export const PageModals = observer(function PageModals(_props: TPageModalsProps) {
return null;
});

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
// components
import { ProjectNavigation } from "@/components/workspace/sidebar/project-navigation";

View file

@ -13,11 +13,11 @@ export type TLayoutSelectionProps = {
workspaceSlug: string;
};
export function GlobalViewLayoutSelection(props: TLayoutSelectionProps) {
export function GlobalViewLayoutSelection(_props: TLayoutSelectionProps) {
return <></>;
}
export function WorkspaceAdditionalLayouts(props: TWorkspaceLayoutProps) {
export function WorkspaceAdditionalLayouts(_props: TWorkspaceLayoutProps) {
return <></>;
}

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import { observer } from "mobx-react";
// plane imports
import { ENotificationLoader, ENotificationQueryParamType } from "@plane/constants";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import type { IWorkspaceSidebarNavigationItem } from "@plane/constants";
import { SidebarItemBase } from "@/components/workspace/sidebar/sidebar-item";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
// helpers
import { useTranslation } from "@plane/i18n";
import { cn } from "@plane/utils";

View file

@ -7,10 +7,10 @@
import type { TDeDupeIssue } from "@plane/types";
export const useDebouncedDuplicateIssues = (
workspaceSlug: string | undefined,
workspaceId: string | undefined,
projectId: string | undefined,
formData: { name: string | undefined; description_html?: string | undefined; issueId?: string | undefined }
_workspaceSlug: string | undefined,
_workspaceId: string | undefined,
_projectId: string | undefined,
_formData: { name: string | undefined; description_html?: string | undefined; issueId?: string | undefined }
) => {
const duplicateIssues: TDeDupeIssue[] = [];

View file

@ -10,7 +10,7 @@ export const useWorkItemProperties = (
projectId: string | null | undefined,
workspaceSlug: string | null | undefined,
workItemId: string | null | undefined,
issueServiceType: TIssueServiceType
_issueServiceType: TIssueServiceType
) => {
if (!projectId || !workspaceSlug || !workItemId) return;
};

View file

@ -7,4 +7,4 @@
import type { TIssue } from "@plane/types";
import { getIssueIds } from "@/store/issue/helpers/base-issues-utils";
export const workItemSortWithOrderByExtended = (array: TIssue[], key?: string) => getIssueIds(array);
export const workItemSortWithOrderByExtended = (array: TIssue[], _key?: string) => getIssueIds(array);

View file

@ -7,4 +7,4 @@
import type { TIssue } from "@plane/types";
import { getIssueIds } from "@/store/issue/helpers/base-issues-utils";
export const workItemSortWithOrderByExtended = (array: TIssue[], key?: string) => getIssueIds(array);
export const workItemSortWithOrderByExtended = (array: TIssue[], _key?: string) => getIssueIds(array);

View file

@ -342,5 +342,5 @@ export class BaseTimeLineStore implements IBaseTimelineStore {
});
// Dummy method to return if the current Block's dependency is being dragged
getIsCurrentDependencyDragging = computedFn((blockId: string) => false);
getIsCurrentDependencyDragging = computedFn((_blockId: string) => false);
}