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

@ -1,7 +1,6 @@
import type { FC } from "react";
import React from "react";
import { observer } from "mobx-react";
import { Check, ListFilter } from "lucide-react";
// plane imports
import type { TActivityFilters, TActivityFilterOption } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { Button } from "@plane/propel/button";

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { observer } from "mobx-react";
import { RotateCcw } from "lucide-react";
// hooks

View file

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

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { Paperclip } from "lucide-react";
// hooks

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { observer } from "mobx-react";
// hooks
import { CycleIcon } from "@plane/propel/icons";

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { observer } from "mobx-react";
// plane imports
import { WorkItemsIcon } from "@plane/propel/icons";

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { AlignLeft } from "lucide-react";
// hooks

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { EstimatePropertyIcon } from "@plane/propel/icons";
// hooks

View file

@ -1,12 +1,10 @@
"use client";
import type { FC } from "react";
// hooks
import { Tooltip } from "@plane/propel/tooltip";
import { generateWorkItemLink } from "@plane/utils";
// hooks
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
import { usePlatformOS } from "@/hooks/use-platform-os";
// ui
type TIssueLink = {
activityId: string;

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import Link from "next/link";
// hooks
import { useIssueDetail } from "@/hooks/store/use-issue-detail";

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
// hooks
import { IntakeIcon } from "@plane/propel/icons";

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { Tooltip } from "@plane/propel/tooltip";
type TIssueLabelPill = { name?: string; color?: string };

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { LabelPropertyIcon } from "@plane/propel/icons";
// hooks

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { MessageSquare } from "lucide-react";
// hooks

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { observer } from "mobx-react";
// hooks
import { ModuleIcon } from "@plane/propel/icons";

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { Type } from "lucide-react";
// hooks

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { ParentPropertyIcon } from "@plane/propel/icons";
// hooks

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { PriorityPropertyIcon } from "@plane/propel/icons";
// hooks

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
// hooks
import { useIssueDetail } from "@/hooks/store/use-issue-detail";

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
import { CalendarDays } from "lucide-react";
// hooks

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { observer } from "mobx-react";
// hooks
import { StatePropertyIcon } from "@plane/propel/icons";

View file

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

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { useMemo } from "react";
import uniq from "lodash-es/uniq";
import { observer } from "mobx-react";

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { memo } from "react";
import { ArrowUpWideNarrow, ArrowDownWideNarrow } from "lucide-react";
// plane package imports

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { useState, Fragment, useEffect } from "react";
import { TwitterPicker } from "react-color";
import { Controller, useForm } from "react-hook-form";

View file

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

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
// components
import { LabelListItem } from "./label-list-item";

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { useMemo } from "react";
import { observer } from "mobx-react";
import { useTranslation } from "@plane/i18n";

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
// components
import type { TLabelOperations } from "../root";
import { IssueLabelSelect } from "./label-select";

View file

@ -1,19 +1,14 @@
"use client";
import type { FC } from "react";
// hooks
// ui
import { Pencil, Trash2, ExternalLink } from "lucide-react";
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import { Tooltip } from "@plane/propel/tooltip";
import { getIconForLink, copyTextToClipboard, calculateTimeAgo } from "@plane/utils";
// icons
// types
// helpers
//
// hooks
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
import { useMember } from "@/hooks/store/use-member";
import { usePlatformOS } from "@/hooks/use-platform-os";
// types
import type { TLinkOperationsModal } from "./create-update-link-modal";
export type TIssueLinkDetail = {

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { observer } from "mobx-react";
import { Pencil, Trash2, Copy, Link } from "lucide-react";
import { useTranslation } from "@plane/i18n";

View file

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

View file

@ -1,4 +1,3 @@
import type { FC } from "react";
import { observer } from "mobx-react";
// computed
import { useIssueDetail } from "@/hooks/store/use-issue-detail";

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { useCallback, useMemo, useState } from "react";
import { Plus } from "lucide-react";
// plane imports

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { observer } from "mobx-react";
import { useRouter } from "next/navigation";
import { MinusCircle } from "lucide-react";

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { observer } from "mobx-react";
// ui
import { CustomMenu } from "@plane/ui";

View file

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

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { useMemo, useState } from "react";
import { observer } from "mobx-react";
import { stringToEmoji } from "@plane/propel/emoji-icon-picker";
@ -8,13 +7,9 @@ import { EmojiReactionGroup, EmojiReactionPicker } from "@plane/propel/emoji-rea
import type { EmojiReactionType } from "@plane/propel/emoji-reaction";
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import type { IUser } from "@plane/types";
// components
import { cn, formatTextList } from "@plane/utils";
// helper
// hooks
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
import { useMember } from "@/hooks/store/use-member";
// types
export type TIssueCommentReaction = {
workspaceSlug: string;
@ -50,7 +45,7 @@ export const IssueCommentReaction = observer(function IssueCommentReaction(props
type: TOAST_TYPE.SUCCESS,
message: "Reaction created successfully",
});
} catch (error) {
} catch (_error) {
setToast({
title: "Error!",
type: TOAST_TYPE.ERROR,
@ -67,7 +62,7 @@ export const IssueCommentReaction = observer(function IssueCommentReaction(props
type: TOAST_TYPE.SUCCESS,
message: "Reaction removed successfully",
});
} catch (error) {
} catch (_error) {
setToast({
title: "Error!",
type: TOAST_TYPE.ERROR,

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { useMemo, useState } from "react";
import { observer } from "mobx-react";
import { stringToEmoji } from "@plane/propel/emoji-icon-picker";
@ -10,7 +9,7 @@ import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import type { IUser } from "@plane/types";
// hooks
// ui
import { cn, formatTextList } from "@plane/utils";
import { cn } from "@plane/utils";
// helpers
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
import { useMember } from "@/hooks/store/use-member";
@ -68,7 +67,7 @@ export const IssueReaction = observer(function IssueReaction(props: TIssueReacti
type: TOAST_TYPE.SUCCESS,
message: "Reaction removed successfully",
});
} catch (error) {
} catch (_error) {
setToast({
title: "Error!",
type: TOAST_TYPE.ERROR,

View file

@ -1,6 +1,5 @@
"use client";
import type { FC } from "react";
import { useState } from "react";
import { differenceInCalendarDays } from "date-fns/differenceInCalendarDays";
import { observer } from "mobx-react";

View file

@ -13,9 +13,9 @@ export const CycleCalendarLayout = observer(function CycleCalendarLayout() {
const { currentProjectCompletedCycleIds } = useCycle();
const { workspaceSlug, projectId, cycleId } = useParams();
const { issues } = useIssues(EIssuesStoreType.CYCLE);
if (!cycleId) return null;
const {
issues: { addIssueToCycle },
} = useIssues(EIssuesStoreType.CYCLE);
const isCompletedCycle =
cycleId && currentProjectCompletedCycleIds ? currentProjectCompletedCycleIds.includes(cycleId.toString()) : false;
@ -23,11 +23,13 @@ export const CycleCalendarLayout = observer(function CycleCalendarLayout() {
const addIssuesToView = useCallback(
(issueIds: string[]) => {
if (!workspaceSlug || !projectId || !cycleId) throw new Error();
return issues.addIssueToCycle(workspaceSlug.toString(), projectId.toString(), cycleId.toString(), issueIds);
return addIssueToCycle(workspaceSlug.toString(), projectId.toString(), cycleId.toString(), issueIds);
},
[issues?.addIssueToCycle, workspaceSlug, projectId, cycleId]
[addIssueToCycle, workspaceSlug, projectId, cycleId]
);
if (!cycleId) return null;
return (
<BaseCalendarRoot
QuickActions={CycleIssueQuickActions}

View file

@ -12,18 +12,20 @@ import { BaseCalendarRoot } from "../base-calendar-root";
export const ModuleCalendarLayout = observer(function ModuleCalendarLayout() {
const { workspaceSlug, projectId, moduleId } = useParams();
const { issues } = useIssues(EIssuesStoreType.MODULE);
if (!moduleId) return null;
const {
issues: { addIssuesToModule },
} = useIssues(EIssuesStoreType.MODULE);
const addIssuesToView = useCallback(
(issueIds: string[]) => {
if (!workspaceSlug || !projectId || !moduleId) throw new Error();
return issues.addIssuesToModule(workspaceSlug.toString(), projectId.toString(), moduleId.toString(), issueIds);
return addIssuesToModule(workspaceSlug.toString(), projectId.toString(), moduleId.toString(), issueIds);
},
[issues?.addIssuesToModule, workspaceSlug, projectId, moduleId]
[addIssuesToModule, workspaceSlug, projectId, moduleId]
);
if (!moduleId) return null;
return (
<BaseCalendarRoot
QuickActions={ModuleIssueQuickActions}