[WEB-5135] refactor: update sites ESLint configuration and refactor imports to use type imports (#7956)

- Enhanced ESLint configuration by adding new rules for import consistency and type imports.
- Refactored multiple files to replace regular imports with type imports for better clarity and performance.
- Ensured consistent use of type imports across the application to align with TypeScript best practices.

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
Prateek Shourya 2025-10-14 00:40:30 +05:30 committed by GitHub
parent ddf07dc993
commit 9f41e92d21
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
78 changed files with 170 additions and 116 deletions

View file

@ -1,4 +1,18 @@
module.exports = {
root: true,
extends: ["@plane/eslint-config/next.js"],
rules: {
"no-duplicate-imports": "off",
"import/no-duplicates": ["error", { "prefer-inline": false }],
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"@typescript-eslint/no-import-type-side-effects": "error",
"@typescript-eslint/consistent-type-imports": [
"error",
{
prefer: "type-imports",
fixStyle: "separate-type-imports",
disallowTypeAnnotations: false,
},
],
},
};

View file

@ -1,7 +1,7 @@
import { notFound, redirect } from "next/navigation";
// plane imports
import { SitesProjectPublishService } from "@plane/services";
import { TProjectPublishSettings } from "@plane/types";
import type { TProjectPublishSettings } from "@plane/types";
const publishService = new SitesProjectPublishService();

View file

@ -1,4 +1,4 @@
import { Metadata } from "next";
import type { Metadata } from "next";
// helpers
import { SPACE_BASE_PATH } from "@plane/constants";
// styles

View file

@ -1,6 +1,6 @@
"use client";
import { FC, ReactNode } from "react";
import type { ReactNode, FC } from "react";
import { ThemeProvider } from "next-themes";
// components
import { TranslationProvider } from "@plane/i18n";

View file

@ -1,4 +1,4 @@
// plane editor
import { TMentionComponentProps } from "@plane/editor";
import type { TMentionComponentProps } from "@plane/editor";
export const EditorAdditionalMentionsRoot: React.FC<TMentionComponentProps> = () => null;

View file

@ -1,5 +1,5 @@
// editor
import { TExtensions } from "@plane/editor";
import type { TExtensions } from "@plane/editor";
export type TEditorFlaggingHookReturnType = {
document: {

View file

@ -1,9 +1,9 @@
"use client";
import { FC } from "react";
import type { FC } from "react";
import { Info, X } from "lucide-react";
// helpers
import { TAuthErrorInfo } from "@/helpers/authentication.helper";
import type { TAuthErrorInfo } from "@/helpers/authentication.helper";
type TAuthBanner = {
bannerData: TAuthErrorInfo | undefined;

View file

@ -1,6 +1,6 @@
"use client";
import { FC } from "react";
import type { FC } from "react";
// helpers
import { EAuthModes } from "@/types/auth";

View file

@ -1,6 +1,7 @@
"use client";
import React, { FC, useEffect, useState } from "react";
import type { FC } from "react";
import React, { useEffect, useState } from "react";
import { observer } from "mobx-react";
import Image from "next/image";
import { useSearchParams } from "next/navigation";
@ -8,16 +9,12 @@ import { useTheme } from "next-themes";
// plane imports
import { API_BASE_URL } from "@plane/constants";
import { SitesAuthService } from "@plane/services";
import { IEmailCheckData } from "@plane/types";
import type { IEmailCheckData } from "@plane/types";
import { OAuthOptions } from "@plane/ui";
// components
// helpers
import {
EAuthenticationErrorCodes,
EErrorAlertType,
TAuthErrorInfo,
authErrorHandler,
} from "@/helpers/authentication.helper";
import type { TAuthErrorInfo } from "@/helpers/authentication.helper";
import { EErrorAlertType, authErrorHandler, EAuthenticationErrorCodes } from "@/helpers/authentication.helper";
// hooks
import { useInstance } from "@/hooks/store/use-instance";
// types

View file

@ -1,12 +1,13 @@
"use client";
import { FC, FormEvent, useMemo, useRef, useState } from "react";
import type { FC, FormEvent } from "react";
import { useMemo, useRef, useState } from "react";
import { observer } from "mobx-react";
// icons
import { CircleAlert, XCircle } from "lucide-react";
// types
import { Button } from "@plane/propel/button";
import { IEmailCheckData } from "@plane/types";
import type { IEmailCheckData } from "@plane/types";
// ui
import { Input, Spinner } from "@plane/ui";
// helpers

View file

@ -1,6 +1,7 @@
"use client";
import React, { FC } from "react";
import type { FC } from "react";
import React from "react";
import Link from "next/link";
type Props = {

View file

@ -1,6 +1,6 @@
"use client";
import { FC } from "react";
import type { FC } from "react";
import { WEBSITE_URL } from "@plane/constants";
// assets
import { PlaneLogo } from "@plane/propel/icons";

View file

@ -1,5 +1,5 @@
// types
import { TLogoProps } from "@plane/types";
import type { TLogoProps } from "@plane/types";
// helpers
import { cn } from "@plane/utils";

View file

@ -1,5 +1,5 @@
// plane editor
import { TMentionComponentProps } from "@plane/editor";
import type { TMentionComponentProps } from "@plane/editor";
// plane web components
import { EditorAdditionalMentionsRoot } from "@/plane-web/components/editor";
// local components

View file

@ -1,6 +1,7 @@
import React from "react";
// plane imports
import { type EditorRefApi, type ILiteTextEditorProps, LiteTextEditorWithRef, type TFileHandler } from "@plane/editor";
import { LiteTextEditorWithRef } from "@plane/editor";
import type { EditorRefApi, ILiteTextEditorProps, TFileHandler } from "@plane/editor";
import type { MakeOptional } from "@plane/types";
import { cn, isCommentEmpty } from "@plane/utils";
// helpers

View file

@ -1,6 +1,7 @@
import React, { forwardRef } from "react";
// plane imports
import { type EditorRefApi, type IRichTextEditorProps, RichTextEditorWithRef, type TFileHandler } from "@plane/editor";
import { RichTextEditorWithRef } from "@plane/editor";
import type { EditorRefApi, IRichTextEditorProps, TFileHandler } from "@plane/editor";
import type { MakeOptional } from "@plane/types";
// helpers
import { getEditorFileHandlers } from "@/helpers/editor.helper";

View file

@ -2,7 +2,8 @@
import React, { useEffect, useState, useCallback } from "react";
// plane imports
import { TOOLBAR_ITEMS, type ToolbarMenuItem, type EditorRefApi } from "@plane/editor";
import { TOOLBAR_ITEMS } from "@plane/editor";
import type { ToolbarMenuItem, EditorRefApi } from "@plane/editor";
import { Button } from "@plane/propel/button";
import { Tooltip } from "@plane/propel/tooltip";
import { cn } from "@plane/utils";

View file

@ -1,6 +1,6 @@
"use client";
import { FC } from "react";
import type { FC } from "react";
import Image from "next/image";
import { useTheme } from "next-themes";
import { Button } from "@plane/propel/button";

View file

@ -4,7 +4,7 @@ import { observer } from "mobx-react";
import { X } from "lucide-react";
// types
import { useTranslation } from "@plane/i18n";
import { TFilters } from "@/types/issue";
import type { TFilters } from "@/types/issue";
// components
import { AppliedPriorityFilters } from "./priority";
import { AppliedStateFilters } from "./state";

View file

@ -2,7 +2,7 @@
import { X } from "lucide-react";
// types
import { IIssueLabel } from "@/types/issue";
import type { IIssueLabel } from "@/types/issue";
type Props = {
handleRemove: (val: string) => void;

View file

@ -1,7 +1,8 @@
"use client";
import { X } from "lucide-react";
import { PriorityIcon, type TIssuePriorities } from "@plane/propel/icons";
import { PriorityIcon } from "@plane/propel/icons";
import type { TIssuePriorities } from "@plane/propel/icons";
type Props = {
handleRemove: (val: string) => void;

View file

@ -1,6 +1,7 @@
"use client";
import { FC, useCallback } from "react";
import type { FC } from "react";
import { useCallback } from "react";
import { cloneDeep } from "lodash-es";
import { observer } from "mobx-react";
import { useRouter } from "next/navigation";

View file

@ -1,7 +1,7 @@
"use client";
import React, { Fragment, useState } from "react";
import { Placement } from "@popperjs/core";
import type { Placement } from "@popperjs/core";
import { usePopper } from "react-popper";
import { Popover, Transition } from "@headlessui/react";
// ui

View file

@ -1,6 +1,7 @@
"use client";
import { FC, useCallback } from "react";
import type { FC } from "react";
import { useCallback } from "react";
import { cloneDeep } from "lodash-es";
import { observer } from "mobx-react";
import { useRouter } from "next/navigation";
@ -14,7 +15,7 @@ import { queryParamGenerator } from "@/helpers/query-param-generator";
// hooks
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
// types
import { TIssueQueryFilters } from "@/types/issue";
import type { TIssueQueryFilters } from "@/types/issue";
type IssueFiltersDropdownProps = {
anchor: string;

View file

@ -4,7 +4,7 @@ import { useCallback, useMemo, useRef } from "react";
import { debounce } from "lodash-es";
import { observer } from "mobx-react";
// types
import { IIssueDisplayProperties } from "@plane/types";
import type { IIssueDisplayProperties } from "@plane/types";
// components
import { IssueLayoutHOC } from "@/components/issues/issue-layouts/issue-layout-HOC";
// hooks

View file

@ -1,12 +1,12 @@
"use client";
import { MutableRefObject } from "react";
import type { MutableRefObject } from "react";
import { observer } from "mobx-react";
import Link from "next/link";
import { useParams, useSearchParams } from "next/navigation";
// plane types
import { Tooltip } from "@plane/propel/tooltip";
import { IIssueDisplayProperties } from "@plane/types";
import type { IIssueDisplayProperties } from "@plane/types";
// plane ui
// plane utils
import { cn } from "@plane/utils";
@ -18,7 +18,7 @@ import { queryParamGenerator } from "@/helpers/query-param-generator";
import { usePublish } from "@/hooks/store/publish";
import { useIssueDetails } from "@/hooks/store/use-issue-details";
//
import { IIssue } from "@/types/issue";
import type { IIssue } from "@/types/issue";
import { IssueProperties } from "../properties/all-properties";
import { getIssueBlockId } from "../utils";
import { BlockReactions } from "./block-reactions";

View file

@ -1,7 +1,7 @@
import { MutableRefObject } from "react";
import type { MutableRefObject } from "react";
import { observer } from "mobx-react";
//types
import { IIssueDisplayProperties } from "@plane/types";
import type { IIssueDisplayProperties } from "@plane/types";
// components
import { KanbanIssueBlock } from "./block";

View file

@ -1,8 +1,8 @@
import { MutableRefObject } from "react";
import type { MutableRefObject } from "react";
import { isNil } from "lodash-es";
import { observer } from "mobx-react";
// types
import {
import type {
GroupByColumnTypes,
IGroupByColumn,
TGroupedIssues,

View file

@ -1,10 +1,11 @@
"use client";
import React, { FC } from "react";
import type { FC } from "react";
import React from "react";
import { observer } from "mobx-react";
import { Circle } from "lucide-react";
// types
import { TIssueGroupByOptions } from "@plane/types";
import type { TIssueGroupByOptions } from "@plane/types";
interface IHeaderGroupByCard {
groupBy: TIssueGroupByOptions | undefined;

View file

@ -1,4 +1,5 @@
import React, { FC } from "react";
import type { FC } from "react";
import React from "react";
import { observer } from "mobx-react";
import { Circle, ChevronDown, ChevronUp } from "lucide-react";
// mobx

View file

@ -1,6 +1,7 @@
"use client";
import { MutableRefObject, forwardRef, useCallback, useRef, useState } from "react";
import type { MutableRefObject } from "react";
import { forwardRef, useCallback, useRef, useState } from "react";
import { observer } from "mobx-react";
//types
import type {

View file

@ -1,7 +1,8 @@
import { MutableRefObject, useState } from "react";
import type { MutableRefObject } from "react";
import { useState } from "react";
import { observer } from "mobx-react";
// types
import {
import type {
GroupByColumnTypes,
IGroupByColumn,
TGroupedIssues,

View file

@ -1,7 +1,7 @@
import { useCallback, useMemo } from "react";
import { observer } from "mobx-react";
// types
import { IIssueDisplayProperties, TGroupedIssues } from "@plane/types";
import type { IIssueDisplayProperties, TGroupedIssues } from "@plane/types";
// constants
// components
import { IssueLayoutHOC } from "@/components/issues/issue-layouts/issue-layout-HOC";

View file

@ -6,7 +6,7 @@ import Link from "next/link";
import { useParams, useSearchParams } from "next/navigation";
// plane types
import { Tooltip } from "@plane/propel/tooltip";
import { IIssueDisplayProperties } from "@plane/types";
import type { IIssueDisplayProperties } from "@plane/types";
// plane ui
// plane utils
import { cn } from "@plane/utils";

View file

@ -1,6 +1,6 @@
import { FC, MutableRefObject } from "react";
import type { FC, MutableRefObject } from "react";
// types
import { IIssueDisplayProperties } from "@plane/types";
import type { IIssueDisplayProperties } from "@plane/types";
import { IssueBlock } from "./block";
interface Props {

View file

@ -1,7 +1,7 @@
import { useRef } from "react";
import { observer } from "mobx-react";
// types
import {
import type {
GroupByColumnTypes,
TGroupedIssues,
IIssueDisplayProperties,

View file

@ -1,10 +1,17 @@
"use client";
import { Fragment, MutableRefObject, forwardRef, useRef, useState } from "react";
import type { MutableRefObject } from "react";
import { Fragment, forwardRef, useRef, useState } from "react";
import { observer } from "mobx-react";
import { useTranslation } from "@plane/i18n";
// plane types
import { IGroupByColumn, TIssueGroupByOptions, IIssueDisplayProperties, TPaginationData, TLoader } from "@plane/types";
import type {
IGroupByColumn,
TIssueGroupByOptions,
IIssueDisplayProperties,
TPaginationData,
TLoader,
} from "@plane/types";
// plane utils
import { cn } from "@plane/utils";
// hooks

View file

@ -12,7 +12,7 @@ import { WithDisplayPropertiesHOC } from "@/components/issues/issue-layouts/with
// helpers
import { getDate } from "@/helpers/date-time.helper";
//// hooks
import { IIssue } from "@/types/issue";
import type { IIssue } from "@/types/issue";
import { IssueBlockCycle } from "./cycle";
import { IssueBlockDate } from "./due-date";
import { IssueBlockLabels } from "./labels";

View file

@ -2,7 +2,8 @@
import { observer } from "mobx-react";
// icons
import { LucideIcon, Users } from "lucide-react";
import type { LucideIcon } from "lucide-react";
import { Users } from "lucide-react";
// plane ui
import { Avatar, AvatarGroup } from "@plane/ui";
// plane utils
@ -10,7 +11,7 @@ import { cn } from "@plane/utils";
// hooks
import { useMember } from "@/hooks/store/use-member";
//
import { TPublicMember } from "@/types/member";
import type { TPublicMember } from "@/types/member";
type Props = {
memberIds: string[];

View file

@ -5,7 +5,7 @@ import { useTranslation } from "@plane/i18n";
// types
import { PriorityIcon } from "@plane/propel/icons";
import { Tooltip } from "@plane/propel/tooltip";
import { TIssuePriorities } from "@plane/types";
import type { TIssuePriorities } from "@plane/types";
// constants
import { cn, getIssuePriorityFilters } from "@plane/utils";

View file

@ -1,6 +1,7 @@
"use client";
import { FC, useEffect } from "react";
import type { FC } from "react";
import { useEffect } from "react";
import { observer } from "mobx-react";
import useSWR from "swr";
// components

View file

@ -5,7 +5,7 @@ import { ContrastIcon } from "lucide-react";
// types
import { EIconSize, ISSUE_PRIORITIES } from "@plane/constants";
import { CycleGroupIcon, ModuleIcon, PriorityIcon, StateGroupIcon } from "@plane/propel/icons";
import {
import type {
GroupByColumnTypes,
IGroupByColumn,
TCycleGroups,
@ -17,11 +17,11 @@ import { Avatar } from "@plane/ui";
// components
// constants
// stores
import { ICycleStore } from "@/store/cycle.store";
import { IIssueLabelStore } from "@/store/label.store";
import { IIssueMemberStore } from "@/store/members.store";
import { IIssueModuleStore } from "@/store/module.store";
import { IStateStore } from "@/store/state.store";
import type { ICycleStore } from "@/store/cycle.store";
import type { IIssueLabelStore } from "@/store/label.store";
import type { IIssueMemberStore } from "@/store/members.store";
import type { IIssueModuleStore } from "@/store/module.store";
import type { IStateStore } from "@/store/state.store";
export const HIGHLIGHT_CLASS = "highlight";
export const HIGHLIGHT_WITH_LINE = "highlight-with-line";

View file

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

View file

@ -1,6 +1,7 @@
"use client";
import { useEffect, FC } from "react";
import type { FC } from "react";
import { useEffect } from "react";
import { observer } from "mobx-react";
import { useRouter, useSearchParams } from "next/navigation";
// components

View file

@ -1,5 +1,6 @@
import { List, Kanban, LucideProps } from "lucide-react";
import { TIssueLayout } from "@plane/constants";
import type { LucideProps } from "lucide-react";
import { List, Kanban } from "lucide-react";
import type { TIssueLayout } from "@plane/constants";
export const IssueLayoutIcon = ({ layout, ...props }: { layout: TIssueLayout } & LucideProps) => {
switch (layout) {

View file

@ -1,6 +1,6 @@
"use client";
import { FC } from "react";
import type { FC } from "react";
import { observer } from "mobx-react";
import { useRouter, useSearchParams } from "next/navigation";
// ui
@ -13,7 +13,7 @@ import { queryParamGenerator } from "@/helpers/query-param-generator";
// hooks
import { useIssueFilter } from "@/hooks/store/use-issue-filter";
// mobx
import { TIssueLayout } from "@/types/issue";
import type { TIssueLayout } from "@/types/issue";
import { IssueLayoutIcon } from "./layout-icon";
type Props = {

View file

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

View file

@ -1,6 +1,7 @@
"use client";
import { FC, Fragment, useEffect, useState } from "react";
import type { FC } from "react";
import { Fragment, useEffect, useState } from "react";
import { observer } from "mobx-react";
import Link from "next/link";
import { usePathname, useSearchParams } from "next/navigation";

View file

@ -4,10 +4,10 @@ import React, { useRef, useState } from "react";
import { observer } from "mobx-react";
import { useForm, Controller } from "react-hook-form";
// plane imports
import { EditorRefApi } from "@plane/editor";
import type { EditorRefApi } from "@plane/editor";
import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import { SitesFileService } from "@plane/services";
import { TIssuePublicComment } from "@plane/types";
import type { TIssuePublicComment } from "@plane/types";
// editor components
import { LiteTextEditor } from "@/components/editor/lite-text-editor";
// hooks

View file

@ -4,8 +4,8 @@ import { Controller, useForm } from "react-hook-form";
import { Check, MessageSquare, MoreVertical, X } from "lucide-react";
import { Menu, Transition } from "@headlessui/react";
// plane imports
import { EditorRefApi } from "@plane/editor";
import { TIssuePublicComment } from "@plane/types";
import type { EditorRefApi } from "@plane/editor";
import type { TIssuePublicComment } from "@plane/types";
import { getFileURL } from "@plane/utils";
// components
import { LiteTextEditor } from "@/components/editor/lite-text-editor";

View file

@ -13,7 +13,7 @@ import { copyTextToClipboard } from "@/helpers/string.helper";
import { useIssueDetails } from "@/hooks/store/use-issue-details";
import useClipboardWritePermission from "@/hooks/use-clipboard-write-permission";
// types
import { IIssue, IPeekMode } from "@/types/issue";
import type { IIssue, IPeekMode } from "@/types/issue";
type Props = {
handleClose: () => void;

View file

@ -16,7 +16,7 @@ import { useIssueDetails } from "@/hooks/store/use-issue-details";
import { useUser } from "@/hooks/store/use-user";
import useIsInIframe from "@/hooks/use-is-in-iframe";
// types
import { IIssue } from "@/types/issue";
import type { IIssue } from "@/types/issue";
type Props = {
anchor: string;

View file

@ -3,7 +3,7 @@ import { observer } from "mobx-react";
import { RichTextEditor } from "@/components/editor/rich-text-editor";
import { usePublish } from "@/hooks/store/publish";
// types
import { IIssue } from "@/types/issue";
import type { IIssue } from "@/types/issue";
// local imports
import { IssueReactions } from "./issue-reaction";

View file

@ -18,7 +18,7 @@ import { copyTextToClipboard, addSpaceIfCamelCase } from "@/helpers/string.helpe
import { usePublish } from "@/hooks/store/publish";
import { useStates } from "@/hooks/store/use-state";
// types
import { IIssue, IPeekMode } from "@/types/issue";
import type { IIssue, IPeekMode } from "@/types/issue";
type Props = {
issueDetails: IIssue;

View file

@ -1,6 +1,7 @@
"use client";
import { FC, Fragment, useEffect, useState } from "react";
import type { FC } from "react";
import { Fragment, useEffect, useState } from "react";
import { observer } from "mobx-react";
import { useRouter, useSearchParams } from "next/navigation";
import { Dialog, Transition } from "@headlessui/react";

View file

@ -6,7 +6,7 @@ import { Loader } from "@plane/ui";
// store hooks
import { usePublish } from "@/hooks/store/publish";
// types
import { IIssue } from "@/types/issue";
import type { IIssue } from "@/types/issue";
// local imports
import { PeekOverviewHeader } from "./header";
import { PeekOverviewIssueActivity } from "./issue-activity";

View file

@ -1,4 +1,5 @@
import { RefObject, useEffect } from "react";
import type { RefObject } from "react";
import { useEffect } from "react";
export type UseIntersectionObserverProps = {
containerRef: RefObject<HTMLDivElement | null> | undefined;

View file

@ -2,7 +2,7 @@ import { useRef, useEffect } from "react";
import useSWR from "swr";
// plane imports
import { UserService } from "@plane/services";
import { IUser } from "@plane/types";
import type { IUser } from "@plane/types";
export const useMention = () => {
const userService = new UserService();

View file

@ -1,6 +1,6 @@
"use client";
import { ReactNode } from "react";
import type { ReactNode } from "react";
import { observer } from "mobx-react";
import Image from "next/image";
import Link from "next/link";

View file

@ -1,6 +1,7 @@
"use client";
import { ReactNode, createContext } from "react";
import type { ReactNode } from "react";
import { createContext } from "react";
// plane web store
import { RootStore } from "@/plane-web/store/root.store";

View file

@ -1,6 +1,6 @@
"use client";
import { ReactNode } from "react";
import type { ReactNode } from "react";
import { useTheme } from "next-themes";
// plane imports
import { Toast } from "@plane/propel/toast";

View file

@ -1,7 +1,7 @@
import { action, makeObservable, observable, runInAction } from "mobx";
// plane imports
import { SitesCycleService } from "@plane/services";
import { TPublicCycle } from "@/types/cycle";
import type { TPublicCycle } from "@/types/cycle";
// store
import type { CoreRootStore } from "./root.store";

View file

@ -1,5 +1,5 @@
import { EIssueGroupByToServerOptions, EServerGroupByToFilterOptions } from "@plane/constants";
import { IssuePaginationOptions, TIssueParams } from "@plane/types";
import type { IssuePaginationOptions, TIssueParams } from "@plane/types";
/**
* This Method is used to construct the url params along with paginated values

View file

@ -2,7 +2,7 @@ import { set } from "lodash-es";
import { observable, action, makeObservable, runInAction } from "mobx";
// plane imports
import { InstanceService } from "@plane/services";
import { IInstance, IInstanceConfig } from "@plane/types";
import type { IInstance, IInstanceConfig } from "@plane/types";
// store
import type { CoreRootStore } from "@/store/root.store";

View file

@ -4,7 +4,8 @@ import { computedFn } from "mobx-utils";
import { v4 as uuidv4 } from "uuid";
// plane imports
import { SitesFileService, SitesIssueService } from "@plane/services";
import { EFileAssetType, TFileSignedURLResponse, TIssuePublicComment } from "@plane/types";
import type { TFileSignedURLResponse, TIssuePublicComment } from "@plane/types";
import { EFileAssetType } from "@plane/types";
// store
import type { CoreRootStore } from "@/store/root.store";
// types

View file

@ -5,7 +5,8 @@ import type { IssuePaginationOptions, TLoader } from "@plane/types";
// store
import type { CoreRootStore } from "@/store/root.store";
// types
import { BaseIssuesStore, type IBaseIssuesStore } from "./helpers/base-issues.store";
import { BaseIssuesStore } from "./helpers/base-issues.store";
import type { IBaseIssuesStore } from "./helpers/base-issues.store";
export interface IIssueStore extends IBaseIssuesStore {
// actions

View file

@ -2,7 +2,8 @@ import { set } from "lodash-es";
import { action, makeObservable, observable, runInAction } from "mobx";
// plane imports
import { UserService } from "@plane/services";
import { EStartOfTheWeek, TUserProfile } from "@plane/types";
import type { TUserProfile } from "@plane/types";
import { EStartOfTheWeek } from "@plane/types";
// store
import type { CoreRootStore } from "@/store/root.store";

View file

@ -1,6 +1,6 @@
import { observable, makeObservable, computed } from "mobx";
// types
import {
import type {
IWorkspaceLite,
TProjectDetails,
TPublishEntityType,

View file

@ -2,7 +2,7 @@ import { set } from "lodash-es";
import { makeObservable, observable, runInAction, action } from "mobx";
// plane imports
import { SitesProjectPublishService } from "@plane/services";
import { TProjectPublishSettings } from "@plane/types";
import type { TProjectPublishSettings } from "@plane/types";
// store
import { PublishStore } from "@/store/publish/publish.store";
import type { CoreRootStore } from "@/store/root.store";

View file

@ -1,16 +1,27 @@
import { enableStaticRendering } from "mobx-react";
// store imports
import { IInstanceStore, InstanceStore } from "@/store/instance.store";
import { IssueDetailStore, IIssueDetailStore } from "@/store/issue-detail.store";
import { IssueStore, IIssueStore } from "@/store/issue.store";
import { IUserStore, UserStore } from "@/store/user.store";
import { CycleStore, ICycleStore } from "./cycle.store";
import { IssueFilterStore, IIssueFilterStore } from "./issue-filters.store";
import { IIssueLabelStore, LabelStore } from "./label.store";
import { IIssueMemberStore, MemberStore } from "./members.store";
import { IIssueModuleStore, ModuleStore } from "./module.store";
import { IPublishListStore, PublishListStore } from "./publish/publish_list.store";
import { IStateStore, StateStore } from "./state.store";
import type { IInstanceStore } from "@/store/instance.store";
import { InstanceStore } from "@/store/instance.store";
import type { IIssueDetailStore } from "@/store/issue-detail.store";
import { IssueDetailStore } from "@/store/issue-detail.store";
import type { IIssueStore } from "@/store/issue.store";
import { IssueStore } from "@/store/issue.store";
import type { IUserStore } from "@/store/user.store";
import { UserStore } from "@/store/user.store";
import type { ICycleStore } from "./cycle.store";
import { CycleStore } from "./cycle.store";
import type { IIssueFilterStore } from "./issue-filters.store";
import { IssueFilterStore } from "./issue-filters.store";
import type { IIssueLabelStore } from "./label.store";
import { LabelStore } from "./label.store";
import type { IIssueMemberStore } from "./members.store";
import { MemberStore } from "./members.store";
import type { IIssueModuleStore } from "./module.store";
import { ModuleStore } from "./module.store";
import type { IPublishListStore } from "./publish/publish_list.store";
import { PublishListStore } from "./publish/publish_list.store";
import type { IStateStore } from "./state.store";
import { StateStore } from "./state.store";
enableStaticRendering(typeof window === "undefined");

View file

@ -2,7 +2,7 @@ import { clone } from "lodash-es";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// plane imports
import { SitesStateService } from "@plane/services";
import { IState } from "@plane/types";
import type { IState } from "@plane/types";
// helpers
import { sortStates } from "@/helpers/state.helper";
// store

View file

@ -3,9 +3,10 @@ import { set } from "lodash-es";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// plane imports
import { UserService } from "@plane/services";
import { ActorDetail, IUser } from "@plane/types";
import type { ActorDetail, IUser } from "@plane/types";
// store types
import { ProfileStore, IProfileStore } from "@/store/profile.store";
import type { IProfileStore } from "@/store/profile.store";
import { ProfileStore } from "@/store/profile.store";
// store
import type { CoreRootStore } from "@/store/root.store";

View file

@ -1,4 +1,4 @@
import { ActorDetail, TIssue, TIssuePriorities, TStateGroups, TIssuePublicComment } from "@plane/types";
import type { ActorDetail, TIssue, TIssuePriorities, TStateGroups, TIssuePublicComment } from "@plane/types";
export type TIssueLayout = "list" | "kanban" | "calendar" | "spreadsheet" | "gantt";
export type TIssueLayoutOptions = {

View file

@ -1,4 +1,4 @@
import { ReactNode } from "react";
import type { ReactNode } from "react";
import Link from "next/link";
// helpers
import { SUPPORT_EMAIL } from "./common.helper";

View file

@ -1,4 +1,5 @@
import { clsx, type ClassValue } from "clsx";
import { clsx } from "clsx";
import type { ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export const SUPPORT_EMAIL = process.env.NEXT_PUBLIC_SUPPORT_EMAIL || "";

View file

@ -1,6 +1,6 @@
// plane imports
import { MAX_FILE_SIZE } from "@plane/constants";
import { TFileHandler } from "@plane/editor";
import type { TFileHandler } from "@plane/editor";
import { SitesFileService } from "@plane/services";
import { getFileURL } from "@plane/utils";
// services

View file

@ -1,7 +1,7 @@
import { differenceInCalendarDays } from "date-fns/differenceInCalendarDays";
// plane internal
import { STATE_GROUPS } from "@plane/constants";
import { TStateGroups } from "@plane/types";
import type { TStateGroups } from "@plane/types";
// helpers
import { getDate } from "@/helpers/date-time.helper";

View file

@ -1,5 +1,5 @@
import { STATE_GROUPS } from "@plane/constants";
import { IState } from "@plane/types";
import type { IState } from "@plane/types";
export const sortStates = (states: IState[]) => {
if (!states || states.length === 0) return;