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:
parent
c3c7c72aff
commit
d9695afcdc
95 changed files with 71 additions and 145 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ export const useCollaborativeEditor = (props: UseCollaborativeEditorArgs) => {
|
|||
titleRef,
|
||||
updatePageProperties,
|
||||
user,
|
||||
actions,
|
||||
} = props;
|
||||
|
||||
const { mainNavigationExtension, titleNavigationExtension, setMainEditor, setTitleEditor } = useEditorNavigation();
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
// plane imports
|
||||
import type { TWebhookConnectionQueryParams } from "@plane/types";
|
||||
import type { TExtendedFileHandler } from "@/plane-editor/types/config";
|
||||
|
||||
export type TFileHandler = {
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -28,7 +28,6 @@ export function DropdownOptions(props: IMultiSelectDropdownOptions | ISingleSele
|
|||
keyExtractor,
|
||||
options,
|
||||
handleClose,
|
||||
value,
|
||||
renderItem,
|
||||
loader,
|
||||
isMobile = false,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
* See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
import type { FC } from "react";
|
||||
import React, { useState, useEffect } from "react";
|
||||
|
||||
interface IRadialProgressBar {
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue