fix: eslint errors and warnings (#8149)

This commit is contained in:
sriram veeraghanta 2025-11-20 19:31:22 +05:30 committed by GitHub
parent 83fdebf64d
commit 8307badae5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
137 changed files with 97 additions and 216 deletions

View file

@ -5,8 +5,8 @@ import { observer } from "mobx-react";
import { ArrowUpToLine, Clipboard, History } from "lucide-react";
// plane imports
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import type { TContextMenuItem } from "@plane/ui";
import { ToggleSwitch } from "@plane/ui";
import type { TContextMenuItem } from "@plane/ui";
import { copyTextToClipboard } from "@plane/utils";
// hooks
import { useAppRouter } from "@/hooks/use-app-router";
@ -18,8 +18,8 @@ import type { EPageStoreType } from "@/plane-web/hooks/store";
// store
import type { TPageInstance } from "@/store/pages/base-page";
// local imports
import type { TPageActions } from "../../dropdowns";
import { PageActions } from "../../dropdowns";
import type { TPageActions } from "../../dropdowns";
import { ExportPageModal } from "../../modals/export-page-modal";
import { PAGE_NAVIGATION_PANE_TABS_QUERY_PARAM } from "../../navigation-pane";
@ -45,8 +45,8 @@ export const PageOptionsDropdown = observer(function PageOptionsDropdown(props:
// query params
const { updateQueryParams } = useQueryParams();
// menu items list
const EXTRA_MENU_OPTIONS = useMemo(function EXTRA_MENU_OPTIONS() {
return [
const EXTRA_MENU_OPTIONS: (TContextMenuItem & { key: TPageActions })[] = useMemo(
() => [
{
key: "full-screen",
action: () => handleFullWidth(!isFullWidth),
@ -108,8 +108,9 @@ export const PageOptionsDropdown = observer(function PageOptionsDropdown(props:
icon: ArrowUpToLine,
shouldRender: true,
},
];
});
],
[]
);
return (
<>

View file

@ -1,7 +1,5 @@
"use client";
import type { FC } from "react";
import React from "react";
import { observer } from "mobx-react";
import { Earth, Info, Lock, Minus } from "lucide-react";
// plane imports

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { useRef } from "react";
import { observer } from "mobx-react";
import { Logo } from "@plane/propel/emoji-icon-picker";

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
// types
import type { TPageNavigationTabs } from "@plane/types";

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { useState, useRef, useEffect } from "react";
import { Search } from "lucide-react";
import { useOutsideClickDetector } from "@plane/hooks";

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import Link from "next/link";
// types
import type { TPageNavigationTabs } from "@plane/types";

View file

@ -1,6 +1,6 @@
"use client";
import React, { useState } from "react";
import { useState } from "react";
import { observer } from "mobx-react";
// ui
import { useParams } from "next/navigation";
@ -30,7 +30,7 @@ export const DeletePageModal = observer(function DeletePageModal(props: TConfirm
const [isDeleting, setIsDeleting] = useState(false);
// store hooks
const { removePage } = usePageStore(storeType);
if (!page || !page.id) return null;
// derived values
const { id: pageId, name } = page;
@ -43,6 +43,7 @@ export const DeletePageModal = observer(function DeletePageModal(props: TConfirm
const { pageId: routePageId } = useParams();
const handleDelete = async () => {
if (!pageId) return;
setIsDeleting(true);
await removePage({ pageId })
.then(() => {
@ -80,6 +81,8 @@ export const DeletePageModal = observer(function DeletePageModal(props: TConfirm
setIsDeleting(false);
};
if (!page || !page.id) return null;
return (
<AlertModalCore
handleClose={handleClose}

View file

@ -34,7 +34,7 @@ export const PagesListMainContent = observer(function PagesListMainContent(props
const { t } = useTranslation();
// store hooks
const { currentProjectDetails } = useProject();
const { isAnyPageAvailable, getCurrentProjectFilteredPageIdsByTab, getCurrentProjectPageIdsByTab, filters, loader } =
const { isAnyPageAvailable, getCurrentProjectFilteredPageIdsByTab, getCurrentProjectPageIdsByTab, loader } =
usePageStore(storeType);
const { allowPermissions } = useUserPermissions();
const { createPage } = usePageStore(EPageStoreType.PROJECT);