fix: eslint errors and warnings (#8149)
This commit is contained in:
parent
83fdebf64d
commit
8307badae5
137 changed files with 97 additions and 216 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { RotateCcw } from "lucide-react";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// icons
|
||||
import { MembersPropertyIcon } from "@plane/propel/icons";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Paperclip } from "lucide-react";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// hooks
|
||||
import { CycleIcon } from "@plane/propel/icons";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// plane imports
|
||||
import { WorkItemsIcon } from "@plane/propel/icons";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { AlignLeft } from "lucide-react";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { EstimatePropertyIcon } from "@plane/propel/icons";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import Link from "next/link";
|
||||
// hooks
|
||||
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// hooks
|
||||
import { IntakeIcon } from "@plane/propel/icons";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { Tooltip } from "@plane/propel/tooltip";
|
||||
|
||||
type TIssueLabelPill = { name?: string; color?: string };
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { LabelPropertyIcon } from "@plane/propel/icons";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { MessageSquare } from "lucide-react";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// hooks
|
||||
import { ModuleIcon } from "@plane/propel/icons";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { Type } from "lucide-react";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { ParentPropertyIcon } from "@plane/propel/icons";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { PriorityPropertyIcon } from "@plane/propel/icons";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// hooks
|
||||
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { CalendarDays } from "lucide-react";
|
||||
// hooks
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// hooks
|
||||
import { StatePropertyIcon } from "@plane/propel/icons";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// helpers
|
||||
import { getValidKeysFromObject } from "@plane/utils";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import type { FC } from "react";
|
||||
import { memo } from "react";
|
||||
import { ArrowUpWideNarrow, ArrowDownWideNarrow } from "lucide-react";
|
||||
// plane package imports
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import { CloseIcon } from "@plane/propel/icons";
|
||||
// types
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// components
|
||||
import { LabelListItem } from "./label-list-item";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
// components
|
||||
import type { TLabelOperations } from "../root";
|
||||
import { IssueLabelSelect } from "./label-select";
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// plane imports
|
||||
import type { TIssueServiceType } from "@plane/types";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// computed
|
||||
import { useIssueDetail } from "@/hooks/store/use-issue-detail";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import type { FC } from "react";
|
||||
import { useCallback, useMemo, useState } from "react";
|
||||
import { Plus } from "lucide-react";
|
||||
// plane imports
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
// ui
|
||||
import { CustomMenu } from "@plane/ui";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import type { FC } from "react";
|
||||
import { observer } from "mobx-react";
|
||||
import useSWR from "swr";
|
||||
import type { TIssue } from "@plane/types";
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue