Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/web/core/components/account/auth-forms/email.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* See the LICENSE file for details.
*/

import type { FC, FormEvent } from "react";
import type { FormEvent } from "react";
import { useMemo, useRef, useState } from "react";
import { observer } from "mobx-react";
// icons
Expand Down
2 changes: 1 addition & 1 deletion apps/web/core/components/account/auth-forms/password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Link from "next/link";
// icons
import { Eye, EyeOff, Info, XCircle } from "lucide-react";
// plane imports
import { API_BASE_URL, E_PASSWORD_STRENGTH, AUTH_TRACKER_EVENTS, AUTH_TRACKER_ELEMENTS } from "@plane/constants";
import { API_BASE_URL, E_PASSWORD_STRENGTH, AUTH_TRACKER_ELEMENTS } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { Button } from "@plane/propel/button";
import { CloseIcon } from "@plane/propel/icons";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const defaultValues: TUniqueCodeFormValues = {
};

export function AuthUniqueCodeForm(props: TAuthUniqueCodeForm) {
const { mode, email, handleEmailClear, generateEmailUniqueCode, isExistingEmail, nextPath } = props;
const { mode, email, handleEmailClear, generateEmailUniqueCode, nextPath } = props;
// derived values
const defaultResetTimerValue = 5;
// states
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Props = {
};

function AnalyticsSectionWrapper(props: Props) {
const { title, children, className, subtitle, actions, headerClassName } = props;
const { title, children, className, actions, headerClassName } = props;
return (
<div className={className}>
<div className={cn("mb-6 flex items-center gap-2 text-nowrap", headerClassName)}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ interface DataTableProps<TData, TValue> {
}

export function DataTable<TData, TValue>({ columns, data, searchPlaceholder, actions }: DataTableProps<TData, TValue>) {
const [rowSelection, setRowSelection] = React.useState({});
const [rowSelection, _setRowSelection] = React.useState({});
const [columnVisibility, setColumnVisibility] = React.useState<VisibilityState>({});
const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>([]);
const [sorting, setSorting] = React.useState<SortingState>([]);
const [sorting, _setSorting] = React.useState<SortingState>([]);
const { t } = useTranslation();
const inputRef = React.useRef<HTMLInputElement>(null);
const [isSearchOpen, setIsSearchOpen] = React.useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { ChartLoader } from "../loaders";
import { generateBarColor } from "./utils";

declare module "@tanstack/react-table" {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface ColumnMeta<TData extends RowData, TValue> {
export: {
key: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { InsightTable } from "../insight-table";
const analyticsService = new AnalyticsService();

declare module "@tanstack/react-table" {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface ColumnMeta<TData extends RowData, TValue> {
export: {
key: string;
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/archives/archive-tabs-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { observer } from "mobx-react";
import Link from "next/link";
import { useParams, usePathname } from "next/navigation";
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/comments/comment-create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { useRef, useState } from "react";
import { observer } from "mobx-react";
import { useForm, Controller } from "react-hook-form";
Expand Down
2 changes: 0 additions & 2 deletions apps/web/core/components/comments/comment-reaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { useMemo, useState } from "react";
import { observer } from "mobx-react";
// plane imports
import { stringToEmoji } from "@plane/propel/emoji-icon-picker";
import { EmojiReactionGroup, EmojiReactionPicker } from "@plane/propel/emoji-reaction";
import type { EmojiReactionType } from "@plane/propel/emoji-reaction";
import type { TCommentsOperations, TIssueComment } from "@plane/types";
import { cn } from "@plane/utils";
// helpers
// local imports

Expand Down
3 changes: 1 addition & 2 deletions apps/web/core/components/common/activity/activity-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { observer } from "mobx-react";

import type { TProjectActivity } from "@/plane-web/types";
Expand All @@ -18,7 +17,7 @@ type TActivityItem = {
};

export const ActivityItem = observer(function ActivityItem(props: TActivityItem) {
const { activity, showProject = true, ends } = props;
const { activity, ends } = props;

if (!activity) return null;

Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/common/activity/user.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { observer } from "mobx-react";
import Link from "next/link";
// types
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/common/count-chip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
//
import { cn } from "@plane/utils";

Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/common/pro-icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { Crown } from "lucide-react";
// helpers
import { cn } from "@plane/utils";
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/core/list/list-root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import React from "react";
import { Row, ERowVariant } from "@plane/ui";

Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/core/theme/theme-switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
// plane imports
import type { I_THEME_OPTION } from "@plane/constants";
import { THEME_OPTIONS } from "@plane/constants";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { Fragment, useCallback, useRef, useState } from "react";
import { isEmpty } from "lodash-es";
import { observer } from "mobx-react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { Fragment } from "react";
import { observer } from "mobx-react";
import Link from "next/link";
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/cycles/active-cycle/progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { observer } from "mobx-react";
import { useTheme } from "next-themes";
// plane imports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { useMemo } from "react";
import { isEmpty } from "lodash-es";
import { observer } from "mobx-react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import React from "react";
import { isEmpty } from "lodash-es";
import { observer } from "mobx-react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const CycleSidebarHeader = observer(function CycleSidebarHeader(props: Pr
try {
const res = await cycleService.cycleDateCheck(workspaceSlug, projectId, payload);
return res.status;
} catch (err) {
} catch (_err) {
return false;
Comment on lines +79 to 80
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Don’t collapse request failures into “date already exists.”

Swallowing every exception here and returning false makes network/server failures look like a validation conflict, so handleDateChange shows the wrong toast and hides the real failure mode. Please log the error and surface a distinct fallback path for request errors instead of reusing the invalid-date result.

As per coding guidelines, "Use try-catch with proper error types and log errors appropriately for error handling".

}
};
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/cycles/archived-cycles/view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { observer } from "mobx-react";
// assets
import AllFiltersImage from "@/app/assets/empty-state/cycle/all-filters.svg?url";
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/cycles/cycles-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { observer } from "mobx-react";
// components
import { useTranslation } from "@plane/i18n";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import React from "react";
// types
import { CycleGroupIcon, ChevronDownIcon } from "@plane/propel/icons";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import React from "react";
import { observer } from "mobx-react";
import { Logo } from "@plane/propel/emoji-icon-picker";
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/cycles/list/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import React from "react";
import { observer } from "mobx-react";
import { Disclosure } from "@headlessui/react";
Expand Down
4 changes: 2 additions & 2 deletions apps/web/core/components/cycles/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function CycleCreateUpdateModal(props: CycleModalProps) {

const selectedProjectId = payload.project_id ?? projectId.toString();
await createCycle(workspaceSlug, selectedProjectId, payload)
.then((res) => {
.then((_res) => {
// mutate when the current cycle creation is active
if (payload.start_date && payload.end_date) {
const currentDate = new Date();
Expand Down Expand Up @@ -81,7 +81,7 @@ export function CycleCreateUpdateModal(props: CycleModalProps) {

const selectedProjectId = payload.project_id ?? projectId.toString();
await updateCycleDetails(workspaceSlug, selectedProjectId, cycleId, payload)
.then((res) => {
.then((_res) => {
setToast({
type: TOAST_TYPE.SUCCESS,
title: "Success!",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { cn } from "@plane/utils";

type Props = {
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/estimates/create/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { useEffect, useMemo, useState } from "react";
import { observer } from "mobx-react";
// plane imports
Expand Down
2 changes: 1 addition & 1 deletion apps/web/core/components/estimates/delete/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const DeleteEstimateModal = observer(function DeleteEstimateModal(props:
message: "Estimate has been removed from your project.",
});
handleClose();
} catch (error) {
} catch (_error) {
setButtonLoader(false);
setToast({
type: TOAST_TYPE.ERROR,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const EstimateDisableSwitch = observer(function EstimateDisableSwitch(pro
? t("project_settings.estimates.toasts.disabled.success.message")
: t("project_settings.estimates.toasts.enabled.success.message"),
});
} catch (err) {
} catch (_err) {
setToast({
type: TOAST_TYPE.ERROR,
title: t("project_settings.estimates.toasts.disabled.error.title"),
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/estimates/estimate-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { observer } from "mobx-react";
// local imports
import { EstimateListItem } from "./estimate-list-item";
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/estimates/estimate-search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { observer } from "mobx-react";

export const EstimateSearch = observer(function EstimateSearch() {
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/estimates/inputs/number-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { useTranslation } from "@plane/i18n";
type TEstimateNumberInputProps = {
value?: number;
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/estimates/inputs/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
// plane imports
import type { TEstimateSystemKeys } from "@plane/types";
import { EEstimateSystem } from "@plane/types";
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/estimates/inputs/text-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { useTranslation } from "@plane/i18n";
type TEstimateTextInputProps = {
value?: string;
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/estimates/loader-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { Loader } from "@plane/ui";

export function EstimateLoaderScreen() {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/core/components/estimates/points/create-root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* See the LICENSE file for details.
*/

import type { Dispatch, FC, SetStateAction } from "react";
import type { Dispatch, SetStateAction } from "react";
import { useCallback, useState } from "react";
import { observer } from "mobx-react";
// plane imports
Expand Down
6 changes: 0 additions & 6 deletions apps/web/core/components/estimates/points/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,6 @@ export const EstimatePointCreate = observer(function EstimatePointCreate(props:
handleEstimatePointError(estimateInputValue, t("project_settings.estimates.validation.empty"));
};

// derived values
const inputProps = {
type: "text",
maxlength: MAX_ESTIMATE_POINT_INPUT_LENGTH,
};

return (
<form onSubmit={handleCreate} className="relative flex items-center gap-2 pr-2.5 text-14">
<div
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/estimates/points/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { useEffect, useRef, useState } from "react";
import { observer } from "mobx-react";
import { GripVertical } from "lucide-react";
Expand Down
2 changes: 1 addition & 1 deletion apps/web/core/components/exporter/export-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const ExportForm = observer(function ExportForm(props: Props) {
: "",
}),
});
} catch (error) {
} catch (_error) {
setExportLoading(false);
setToast({
type: TOAST_TYPE.ERROR,
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/exporter/single-export.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { useState } from "react";
// ui
import { Button } from "@plane/propel/button";
Expand Down
1 change: 0 additions & 1 deletion apps/web/core/components/gantt-chart/chart/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
* See the LICENSE file for details.
*/

import type { FC } from "react";
import { useEffect, useState } from "react";
import { observer } from "mobx-react";
import { createPortal } from "react-dom";
Expand Down
Loading
Loading