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

@ -6,7 +6,7 @@
import type { HocuspocusProvider } from "@hocuspocus/provider";
import type { Editor } from "@tiptap/react";
import type { FC, ReactNode } from "react";
import type { ReactNode } from "react";
import { useCallback, useEffect, useRef } from "react";
// plane utils
import { cn } from "@plane/utils";

View file

@ -7,7 +7,6 @@
import { autoUpdate, flip, hide, shift, useDismiss, useFloating, useInteractions } from "@floating-ui/react";
import type { Editor } from "@tiptap/react";
import { useEditorState } from "@tiptap/react";
import type { FC } from "react";
import { useCallback, useEffect, useRef, useState } from "react";
// components

View file

@ -42,7 +42,7 @@ export type BlockMenuOption = {
};
export function BlockMenu(props: Props) {
const { editor, workItemIdentifier } = props;
const { editor } = props;
const [isOpen, setIsOpen] = useState(false);
const [isAnimatedIn, setIsAnimatedIn] = useState(false);
const menuRef = useRef<HTMLDivElement | null>(null);

View file

@ -7,7 +7,6 @@
import type { Editor } from "@tiptap/react";
import { ALargeSmall, Ban } from "lucide-react";
import { useMemo } from "react";
import type { FC } from "react";
// plane utils
import { cn } from "@plane/utils";
// constants

View file

@ -6,7 +6,6 @@
import type { Editor } from "@tiptap/core";
import type { FC } from "react";
import { useCallback, useRef, useState } from "react";
import { LinkIcon, TrashIcon, CheckIcon } from "@plane/propel/icons";
// plane imports

View file

@ -6,7 +6,6 @@
import type { Editor } from "@tiptap/react";
import type { FC } from "react";
import { CheckIcon, ChevronDownIcon } from "@plane/propel/icons";
// plane utils
import { cn } from "@plane/utils";

View file

@ -8,7 +8,6 @@ import { isNodeSelection } from "@tiptap/core";
import type { Editor } from "@tiptap/core";
import { BubbleMenu, useEditorState } from "@tiptap/react";
import type { BubbleMenuProps } from "@tiptap/react";
import type { FC } from "react";
import { useEffect, useState, useRef } from "react";
// plane utils
import { cn } from "@plane/utils";

View file

@ -252,7 +252,7 @@ export function CustomImageBlock(props: CustomImageBlockProps) {
src={displayedImageSrc}
alt=""
onLoad={handleImageLoad}
onError={(e) =>
onError={(_e) =>
void (async () => {
// for old image extension this command doesn't exist or if the image failed to load for the first time
if (!extension.options.restoreImage || hasTriedRestoringImageOnce) {

View file

@ -65,7 +65,6 @@ export const useCollaborativeEditor = (props: UseCollaborativeEditorArgs) => {
titleRef,
updatePageProperties,
user,
actions,
} = props;
const { mainNavigationExtension, titleNavigationExtension, setMainEditor, setTitleEditor } = useEditorNavigation();

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import { DOMParser } from "@tiptap/pm/model";
import type { EditorProps } from "@tiptap/pm/view";
// plane utils
import { cn } from "@plane/utils";

View file

@ -5,7 +5,6 @@
*/
// plane imports
import type { TWebhookConnectionQueryParams } from "@plane/types";
import type { TExtendedFileHandler } from "@/plane-editor/types/config";
export type TFileHandler = {

View file

@ -17,9 +17,9 @@ export const buttonVariants = cva(
"error-fill":
"bg-danger-primary text-on-color hover:bg-danger-primary-hover active:bg-danger-primary-active disabled:bg-layer-disabled disabled:text-disabled",
"error-outline":
"bg-layer-2 hover:bg-danger-subtle active:bg-danger-subtle-hover disabled:bg-layer-2 text-danger-secondary disabled:text-disabled border border-danger-strong disabled:border-subtle-1",
"border border-danger-strong bg-layer-2 text-danger-secondary hover:bg-danger-subtle active:bg-danger-subtle-hover disabled:border-subtle-1 disabled:bg-layer-2 disabled:text-disabled",
secondary:
"bg-layer-2 hover:bg-layer-2-hover active:bg-layer-2-active disabled:bg-layer-transparent text-secondary disabled:text-disabled border border-strong disabled:border-subtle-1 shadow-raised-100",
"border border-strong bg-layer-2 text-secondary shadow-raised-100 hover:bg-layer-2-hover active:bg-layer-2-active disabled:border-subtle-1 disabled:bg-layer-transparent disabled:text-disabled",
tertiary:
"bg-layer-3 text-secondary hover:bg-layer-3-hover active:bg-layer-3-active disabled:bg-layer-transparent disabled:text-disabled",
ghost:

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/
import type { FC } from "react";
import { LayoutGroup } from "framer-motion";
import { cn } from "../utils";
import type { TTabNavigationListProps } from "./tab-navigation-types";

View file

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

View file

@ -28,7 +28,6 @@ export function DropdownOptions(props: IMultiSelectDropdownOptions | ISingleSele
keyExtractor,
options,
handleClose,
value,
renderItem,
loader,
isMobile = false,

View file

@ -6,7 +6,6 @@
import { Combobox } from "@headlessui/react";
import { sortBy } from "lodash-es";
import type { FC } from "react";
import React, { useMemo, useRef, useState } from "react";
import { usePopper } from "react-popper";
// plane imports

View file

@ -6,7 +6,6 @@
import { Combobox } from "@headlessui/react";
import { sortBy } from "lodash-es";
import type { FC } from "react";
import React, { useMemo, useRef, useState } from "react";
import { usePopper } from "react-popper";
// plane imports

View file

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

View file

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

View file

@ -5,7 +5,6 @@
*/
import * as RadixScrollArea from "@radix-ui/react-scroll-area";
import type { FC } from "react";
import React from "react";
import { cn } from "./utils";

View file

@ -5,7 +5,6 @@
*/
import { Tab } from "@headlessui/react";
import type { FC } from "react";
import React, { Fragment, useEffect, useState } from "react";
// helpers
import { useLocalStorage } from "@plane/hooks";

View file

@ -261,7 +261,7 @@ export function extractURLComponents(url: URL | string): IURLComponents | undefi
}
return undefined;
} catch (error) {
} catch (_error) {
return undefined;
}
}
@ -323,7 +323,7 @@ export function isValidNextPath(url: string): boolean {
];
return !maliciousPatterns.some((pattern) => pattern.test(pathname));
} catch (error) {
} catch (_error) {
// If URL constructor fails, it's an invalid path
return false;
}