Skip to content

armgit / plane

Public Imported from GitHub
0

πŸ”₯πŸ”₯πŸ”₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.

fix: eslint config and errors

sriram veeraghantab8ee986636cf
diff --git a/packages/eslint-config-custom/index.js b/packages/eslint-config-custom/index.js
index 4b84256230..99a1019414 100644
--- a/packages/eslint-config-custom/index.js
+++ b/packages/eslint-config-custom/index.js
@@ -16,6 +16,7 @@ module.exports = {
},
},
rules: {
+ "no-useless-escape": "off",
"prefer-const": "error",
"no-irregular-whitespace": "error",
"no-trailing-spaces": "error",
@@ -36,6 +37,7 @@ module.exports = {
{
selector: ["function", "variable"],
format: ["camelCase", "snake_case", "UPPER_CASE", "PascalCase"],
+ leadingUnderscore: "allow",
},
],
},
diff --git a/web/.eslintignore b/web/.eslintignore
new file mode 100644
index 0000000000..84f01402dd
--- /dev/null
+++ b/web/.eslintignore
@@ -0,0 +1,3 @@
+.next/*
+out/*
+public/*
\ No newline at end of file
diff --git a/web/core/components/gantt-chart/sidebar/cycles/block.tsx b/web/core/components/gantt-chart/sidebar/cycles/block.tsx
index 8247dcacf4..d4e863af15 100644
--- a/web/core/components/gantt-chart/sidebar/cycles/block.tsx
+++ b/web/core/components/gantt-chart/sidebar/cycles/block.tsx
@@ -1,6 +1,4 @@
-import { MutableRefObject } from "react";
import { observer } from "mobx-react";
-import { MoreVertical } from "lucide-react";
// hooks
import { CycleGanttSidebarBlock } from "@/components/cycles";
import { BLOCK_HEIGHT } from "@/components/gantt-chart/constants";
diff --git a/web/core/components/gantt-chart/sidebar/cycles/sidebar.tsx b/web/core/components/gantt-chart/sidebar/cycles/sidebar.tsx
index 4df76eb469..c5a0a28ff4 100644
--- a/web/core/components/gantt-chart/sidebar/cycles/sidebar.tsx
+++ b/web/core/components/gantt-chart/sidebar/cycles/sidebar.tsx
@@ -1,6 +1,5 @@
"use client";
-import { MutableRefObject } from "react";
// ui
import { Loader } from "@plane/ui";
// components
@@ -43,12 +42,7 @@ export const CycleGanttSidebar: React.FC<Props> = (props) => {
isDragEnabled={enableReorder}
onDrop={handleOnDrop}
>
- {(isDragging: boolean) => (
- <CyclesSidebarBlock
- block={block}
- isDragging={isDragging}
- />
- )}
+ {(isDragging: boolean) => <CyclesSidebarBlock block={block} isDragging={isDragging} />}
</GanttDnDHOC>
);
})
diff --git a/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx b/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx
index eff7dcc563..4e9ee71938 100644
--- a/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx
+++ b/web/core/components/gantt-chart/sidebar/gantt-dnd-HOC.tsx
@@ -1,6 +1,6 @@
"use client";
-import { MutableRefObject, useEffect, useRef, useState } from "react";
+import { useEffect, useRef, useState } from "react";
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";
import { attachInstruction, extractInstruction } from "@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item";
diff --git a/web/core/components/gantt-chart/sidebar/issues/block.tsx b/web/core/components/gantt-chart/sidebar/issues/block.tsx
index 598a550e74..eaf0afd44c 100644
--- a/web/core/components/gantt-chart/sidebar/issues/block.tsx
+++ b/web/core/components/gantt-chart/sidebar/issues/block.tsx
@@ -1,6 +1,4 @@
-import React, { MutableRefObject } from "react";
import { observer } from "mobx-react";
-import { MoreVertical } from "lucide-react";
// components
import { MultipleSelectEntityAction } from "@/components/core";
import { useGanttChart } from "@/components/gantt-chart/hooks";
diff --git a/web/core/components/gantt-chart/sidebar/issues/sidebar.tsx b/web/core/components/gantt-chart/sidebar/issues/sidebar.tsx
index 786091ca16..e295737dfe 100644
--- a/web/core/components/gantt-chart/sidebar/issues/sidebar.tsx
+++ b/web/core/components/gantt-chart/sidebar/issues/sidebar.tsx
@@ -1,6 +1,6 @@
"use client";
-import { RefObject, MutableRefObject, useState } from "react";
+import { RefObject, useState } from "react";
import { observer } from "mobx-react";
// ui
import { Loader } from "@plane/ui";
@@ -38,7 +38,7 @@ export const IssueGanttSidebar: React.FC<Props> = observer((props) => {
canLoadMoreBlocks,
ganttContainerRef,
showAllBlocks = false,
- selectionHelpers
+ selectionHelpers,
} = props;
const [intersectionElement, setIntersectionElement] = useState<HTMLDivElement | null>(null);
diff --git a/web/core/components/gantt-chart/sidebar/modules/block.tsx b/web/core/components/gantt-chart/sidebar/modules/block.tsx
index 7ee9e53a44..b1489582da 100644
--- a/web/core/components/gantt-chart/sidebar/modules/block.tsx
+++ b/web/core/components/gantt-chart/sidebar/modules/block.tsx
@@ -1,6 +1,4 @@
-import { MutableRefObject } from "react";
import { observer } from "mobx-react";
-import { MoreVertical } from "lucide-react";
// hooks
import { BLOCK_HEIGHT } from "@/components/gantt-chart/constants";
import { useGanttChart } from "@/components/gantt-chart/hooks";
diff --git a/web/core/components/gantt-chart/sidebar/modules/sidebar.tsx b/web/core/components/gantt-chart/sidebar/modules/sidebar.tsx
index c7e70d0735..252c09b52b 100644
--- a/web/core/components/gantt-chart/sidebar/modules/sidebar.tsx
+++ b/web/core/components/gantt-chart/sidebar/modules/sidebar.tsx
@@ -1,6 +1,5 @@
"use client";
-import { MutableRefObject } from "react";
// ui
import { Loader } from "@plane/ui";
// components
diff --git a/web/core/components/instance/not-ready-view.tsx b/web/core/components/instance/not-ready-view.tsx
index 9f2e17dead..8d317634a8 100644
--- a/web/core/components/instance/not-ready-view.tsx
+++ b/web/core/components/instance/not-ready-view.tsx
@@ -8,12 +8,12 @@ import { Button } from "@plane/ui";
// helpers
import { GOD_MODE_URL } from "@/helpers/common.helper";
// images
-import PlaneTakeOffImage from "@/public/plane-takeoff.png";
// assets
import PlaneBackgroundPatternDark from "@/public/auth/background-pattern-dark.svg";
import PlaneBackgroundPattern from "@/public/auth/background-pattern.svg";
import BlackHorizontalLogo from "@/public/plane-logos/black-horizontal-with-blue-logo.png";
import WhiteHorizontalLogo from "@/public/plane-logos/white-horizontal-with-blue-logo.png";
+import PlaneTakeOffImage from "@/public/plane-takeoff.png";
export const InstanceNotReady: FC = () => {
const { resolvedTheme } = useTheme();
diff --git a/web/core/components/integration/github/root.tsx b/web/core/components/integration/github/root.tsx
index 883c8c9e79..812e1dc89a 100644
--- a/web/core/components/integration/github/root.tsx
+++ b/web/core/components/integration/github/root.tsx
@@ -25,8 +25,8 @@ import {
// icons
// images
import { APP_INTEGRATIONS, IMPORTER_SERVICES_LIST, WORKSPACE_INTEGRATIONS } from "@/constants/fetch-keys";
-import { IntegrationService, GithubIntegrationService } from "@/services/integrations";
import GithubLogo from "@/public/services/github.png";
+import { IntegrationService, GithubIntegrationService } from "@/services/integrations";
// hooks
// components
// icons
diff --git a/web/core/components/integration/jira/root.tsx b/web/core/components/integration/jira/root.tsx
index f25eceb1cc..f4109bead3 100644
--- a/web/core/components/integration/jira/root.tsx
+++ b/web/core/components/integration/jira/root.tsx
@@ -15,8 +15,8 @@ import { IJiraImporterForm } from "@plane/types";
import { Button } from "@plane/ui";
import { IMPORTER_SERVICES_LIST } from "@/constants/fetch-keys";
// assets
-import { JiraImporterService } from "@/services/integrations";
import JiraLogo from "@/public/services/jira.svg";
+import { JiraImporterService } from "@/services/integrations";
// types
import {
JiraGetImportDetail,
diff --git a/web/core/components/integration/single-integration-card.tsx b/web/core/components/integration/single-integration-card.tsx
index 91296f74d1..5159c4fc24 100644
--- a/web/core/components/integration/single-integration-card.tsx
+++ b/web/core/components/integration/single-integration-card.tsx
@@ -16,10 +16,10 @@ import { useUser, useInstance } from "@/hooks/store";
import useIntegrationPopup from "@/hooks/use-integration-popup";
import { usePlatformOS } from "@/hooks/use-platform-os";
// services
-import { IntegrationService } from "@/services/integrations";
// icons
import GithubLogo from "@/public/services/github.png";
import SlackLogo from "@/public/services/slack.png";
+import { IntegrationService } from "@/services/integrations";
type Props = {
integration: IAppIntegration;
diff --git a/web/core/components/onboarding/invite-members.tsx b/web/core/components/onboarding/invite-members.tsx
index f51e6db7b3..db4042caf1 100644
--- a/web/core/components/onboarding/invite-members.tsx
+++ b/web/core/components/onboarding/invite-members.tsx
@@ -30,10 +30,10 @@ import { getUserRole } from "@/helpers/user.helper";
import { useEventTracker } from "@/hooks/store";
import useDynamicDropdownPosition from "@/hooks/use-dynamic-dropdown";
// services
-import { WorkspaceService } from "@/services/workspace.service";
// assets
import InviteMembersDark from "@/public/onboarding/invite-members-dark.svg";
import InviteMembersLight from "@/public/onboarding/invite-members-light.svg";
+import { WorkspaceService } from "@/services/workspace.service";
// components
import { OnboardingHeader } from "./header";
import { SwitchAccountDropdown } from "./switch-account-dropdown";
diff --git a/web/core/components/onboarding/profile-setup.tsx b/web/core/components/onboarding/profile-setup.tsx
index 76d5af8d1a..b57b39550a 100644
--- a/web/core/components/onboarding/profile-setup.tsx
+++ b/web/core/components/onboarding/profile-setup.tsx
@@ -21,13 +21,13 @@ import { getPasswordStrength } from "@/helpers/password.helper";
// hooks
import { useEventTracker, useUser, useUserProfile } from "@/hooks/store";
// services
-import { AuthService } from "@/services/auth.service";
-import { FileService } from "@/services/file.service";
// assets
import ProfileSetupDark from "@/public/onboarding/profile-setup-dark.svg";
import ProfileSetupLight from "@/public/onboarding/profile-setup-light.svg";
import UserPersonalizationDark from "@/public/onboarding/user-personalization-dark.svg";
import UserPersonalizationLight from "@/public/onboarding/user-personalization-light.svg";
+import { AuthService } from "@/services/auth.service";
+import { FileService } from "@/services/file.service";
type TProfileSetupFormValues = {
first_name: string;
diff --git a/web/core/components/profile/overview/activity.tsx b/web/core/components/profile/overview/activity.tsx
index 7dd781afb9..5beeeb65ea 100644
--- a/web/core/components/profile/overview/activity.tsx
+++ b/web/core/components/profile/overview/activity.tsx
@@ -15,9 +15,9 @@ import { calculateTimeAgo } from "@/helpers/date-time.helper";
//hooks
// services
import { useUser } from "@/hooks/store";
+import recentActivityEmptyState from "@/public/empty-state/recent_activity.svg";
import { UserService } from "@/services/user.service";
// assets
-import recentActivityEmptyState from "@/public/empty-state/recent_activity.svg";
const userService = new UserService();
diff --git a/web/core/components/project/integration-card.tsx b/web/core/components/project/integration-card.tsx
index 8b31429071..b324d854ba 100644
--- a/web/core/components/project/integration-card.tsx
+++ b/web/core/components/project/integration-card.tsx
@@ -12,9 +12,9 @@ import { SelectRepository, SelectChannel } from "@/components/integration";
// constants
import { PROJECT_GITHUB_REPOSITORY } from "@/constants/fetch-keys";
// icons
-import { ProjectService } from "@/services/project";
import GithubLogo from "@/public/logos/github-square.png";
import SlackLogo from "@/public/services/slack.png";
+import { ProjectService } from "@/services/project";
// types
type Props = {
diff --git a/web/core/components/workspace/settings/members-list-item.tsx b/web/core/components/workspace/settings/members-list-item.tsx
index 17c6a4f614..d70d87b988 100644
--- a/web/core/components/workspace/settings/members-list-item.tsx
+++ b/web/core/components/workspace/settings/members-list-item.tsx
@@ -11,7 +11,7 @@ import { CustomSelect, TOAST_TYPE, Tooltip, setToast } from "@plane/ui";
// components
import { ConfirmWorkspaceMemberRemove } from "@/components/workspace";
// constants
-import { WORKSPACE_MEMBER_lEAVE } from "@/constants/event-tracker";
+import { WORKSPACE_MEMBER_LEAVE } from "@/constants/event-tracker";
import { EUserWorkspaceRoles, ROLE } from "@/constants/workspace";
// hooks
import { useEventTracker, useMember, useUser } from "@/hooks/store";
@@ -48,7 +48,7 @@ export const WorkspaceMembersListItem: FC<Props> = observer((props) => {
await leaveWorkspace(workspaceSlug.toString())
.then(() => {
- captureEvent(WORKSPACE_MEMBER_lEAVE, {
+ captureEvent(WORKSPACE_MEMBER_LEAVE, {
state: "SUCCESS",
element: "Workspace settings members page",
});
diff --git a/web/core/constants/event-tracker.ts b/web/core/constants/event-tracker.ts
index 7edfccba5f..74099fe7a3 100644
--- a/web/core/constants/event-tracker.ts
+++ b/web/core/constants/event-tracker.ts
@@ -183,7 +183,7 @@ export const MEMBER_INVITED = "Member invited";
export const MEMBER_ACCEPTED = "Member accepted";
export const PROJECT_MEMBER_ADDED = "Project member added";
export const PROJECT_MEMBER_LEAVE = "Project member leave";
-export const WORKSPACE_MEMBER_lEAVE = "Workspace member leave";
+export const WORKSPACE_MEMBER_LEAVE = "Workspace member leave";
// Sign-in & Sign-up Events
export const NAVIGATE_TO_SIGNUP = "Navigate to sign-up page";
export const NAVIGATE_TO_SIGNIN = "Navigate to sign-in page";
diff --git a/web/core/hooks/store/use-issues.ts b/web/core/hooks/store/use-issues.ts
index b535837bad..22356777e7 100644
--- a/web/core/hooks/store/use-issues.ts
+++ b/web/core/hooks/store/use-issues.ts
@@ -1,6 +1,7 @@
import { useContext } from "react";
import merge from "lodash/merge";
// mobx store
+import { TIssueMap } from "@plane/types";
import { EIssuesStoreType } from "@/constants/issue";
import { StoreContext } from "@/lib/store-context";
// types
@@ -12,7 +13,6 @@ import { IProfileIssues, IProfileIssuesFilter } from "@/store/issue/profile";
import { IProjectIssues, IProjectIssuesFilter } from "@/store/issue/project";
import { IProjectViewIssues, IProjectViewIssuesFilter } from "@/store/issue/project-views";
import { IWorkspaceIssues, IWorkspaceIssuesFilter } from "@/store/issue/workspace";
-import { TIssueMap } from "@plane/types";
// constants
type defaultIssueStore = {
diff --git a/web/core/hooks/use-issue-layout-store.ts b/web/core/hooks/use-issue-layout-store.ts
index 6a9f4237fd..bb12e576b7 100644
--- a/web/core/hooks/use-issue-layout-store.ts
+++ b/web/core/hooks/use-issue-layout-store.ts
@@ -1,5 +1,5 @@
-import { EIssuesStoreType } from "@/constants/issue";
import { createContext, useContext } from "react";
+import { EIssuesStoreType } from "@/constants/issue";
import { useIssues } from "./store";
export const IssuesStoreContext = createContext<EIssuesStoreType>(EIssuesStoreType.PROJECT);
diff --git a/web/core/hooks/use-reload-confirmation.tsx b/web/core/hooks/use-reload-confirmation.tsx
index 9bd324d06a..0342d25785 100644
--- a/web/core/hooks/use-reload-confirmation.tsx
+++ b/web/core/hooks/use-reload-confirmation.tsx
@@ -1,3 +1,4 @@
+/* eslint-disable @typescript-eslint/no-unused-vars */
import { useCallback, useEffect, useState } from "react";
import { useRouter } from "next/navigation";
diff --git a/web/core/hooks/use-user-notifications.tsx b/web/core/hooks/use-user-notifications.tsx
index c363754cc2..03e1eb355c 100644
--- a/web/core/hooks/use-user-notifications.tsx
+++ b/web/core/hooks/use-user-notifications.tsx
@@ -79,7 +79,7 @@ const useUserNotification = (): any => {
}, false);
};
- const mutateNotification = (notificationId: string, value: Object) => {
+ const mutateNotification = (notificationId: string, value: object) => {
notificationMutate((previousNotifications: any) => {
if (!previousNotifications) return previousNotifications;
diff --git a/web/core/services/analytics.service.ts b/web/core/services/analytics.service.ts
index a89ff004df..991407d165 100644
--- a/web/core/services/analytics.service.ts
+++ b/web/core/services/analytics.service.ts
@@ -1,7 +1,4 @@
// services
-import { API_BASE_URL } from "@/helpers/common.helper";
-import { APIService } from "@/services/api.service";
-// types
import {
IAnalyticsParams,
IAnalyticsResponse,
@@ -9,6 +6,9 @@ import {
IExportAnalyticsFormData,
ISaveAnalyticsFormData,
} from "@plane/types";
+import { API_BASE_URL } from "@/helpers/common.helper";
+import { APIService } from "@/services/api.service";
+// types
// helpers
export class AnalyticsService extends APIService {
diff --git a/web/core/services/api_token.service.ts b/web/core/services/api_token.service.ts
index 37a18ed555..51078396cd 100644
--- a/web/core/services/api_token.service.ts
+++ b/web/core/services/api_token.service.ts
@@ -1,5 +1,5 @@
-import { API_BASE_URL } from "@/helpers/common.helper";
import { IApiToken } from "@plane/types";
+import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "./api.service";
export class APITokenService extends APIService {
@@ -15,7 +15,7 @@ export class APITokenService extends APIService {
});
}
- async retrieveApiToken(workspaceSlug: string, tokenId: String): Promise<IApiToken> {
+ async retrieveApiToken(workspaceSlug: string, tokenId: string): Promise<IApiToken> {
return this.get(`/api/workspaces/${workspaceSlug}/api-tokens/${tokenId}`)
.then((response) => response?.data)
.catch((error) => {
@@ -31,7 +31,7 @@ export class APITokenService extends APIService {
});
}
- async deleteApiToken(workspaceSlug: string, tokenId: String): Promise<IApiToken> {
+ async deleteApiToken(workspaceSlug: string, tokenId: string): Promise<IApiToken> {
return this.delete(`/api/workspaces/${workspaceSlug}/api-tokens/${tokenId}`)
.then((response) => response?.data)
.catch((error) => {
diff --git a/web/core/services/cycle.service.ts b/web/core/services/cycle.service.ts
index 9040b83407..c74f6485ad 100644
--- a/web/core/services/cycle.service.ts
+++ b/web/core/services/cycle.service.ts
@@ -1,8 +1,8 @@
// services
+import type { CycleDateCheckData, ICycle, TIssuesResponse } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// types
-import type { CycleDateCheckData, ICycle, TIssuesResponse } from "@plane/types";
// helpers
export class CycleService extends APIService {
diff --git a/web/core/services/dashboard.service.ts b/web/core/services/dashboard.service.ts
index d569df927a..ad86932f94 100644
--- a/web/core/services/dashboard.service.ts
+++ b/web/core/services/dashboard.service.ts
@@ -1,8 +1,8 @@
+import { THomeDashboardResponse, TWidget, TWidgetStatsResponse, TWidgetStatsRequestParams } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// helpers
// types
-import { THomeDashboardResponse, TWidget, TWidgetStatsResponse, TWidgetStatsRequestParams } from "@plane/types";
export class DashboardService extends APIService {
constructor() {
diff --git a/web/core/services/integrations/github.service.ts b/web/core/services/integrations/github.service.ts
index 9f673c5c07..634eb64362 100644
--- a/web/core/services/integrations/github.service.ts
+++ b/web/core/services/integrations/github.service.ts
@@ -1,8 +1,8 @@
+import { IGithubRepoInfo, IGithubServiceImportFormData } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// helpers
// types
-import { IGithubRepoInfo, IGithubServiceImportFormData } from "@plane/types";
const integrationServiceType: string = "github";
diff --git a/web/core/services/integrations/integration.service.ts b/web/core/services/integrations/integration.service.ts
index 66e4ae6ccb..bf62f8fbe0 100644
--- a/web/core/services/integrations/integration.service.ts
+++ b/web/core/services/integrations/integration.service.ts
@@ -1,7 +1,7 @@
+import { IAppIntegration, IImporterService, IWorkspaceIntegration, IExportServiceResponse } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// types
-import { IAppIntegration, IImporterService, IWorkspaceIntegration, IExportServiceResponse } from "@plane/types";
// helper
export class IntegrationService extends APIService {
diff --git a/web/core/services/integrations/jira.service.ts b/web/core/services/integrations/jira.service.ts
index 910d5f8b93..14130ed169 100644
--- a/web/core/services/integrations/jira.service.ts
+++ b/web/core/services/integrations/jira.service.ts
@@ -1,7 +1,7 @@
+import { IJiraMetadata, IJiraResponse, IJiraImporterForm } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// types
-import { IJiraMetadata, IJiraResponse, IJiraImporterForm } from "@plane/types";
export class JiraImporterService extends APIService {
constructor() {
diff --git a/web/core/services/issue/issue_activity.service.ts b/web/core/services/issue/issue_activity.service.ts
index b2999237fc..b99d07d889 100644
--- a/web/core/services/issue/issue_activity.service.ts
+++ b/web/core/services/issue/issue_activity.service.ts
@@ -1,7 +1,7 @@
+import { TIssueActivity } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// types
-import { TIssueActivity } from "@plane/types";
// helper
export class IssueActivityService extends APIService {
@@ -17,7 +17,7 @@ export class IssueActivityService extends APIService {
| {
created_at__gt: string;
}
- | {} = {}
+ | object = {}
): Promise<TIssueActivity[]> {
return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/issues/${issueId}/history/`, {
params: {
diff --git a/web/core/services/issue/issue_archive.service.ts b/web/core/services/issue/issue_archive.service.ts
index 5901daa5a9..9012fce5b8 100644
--- a/web/core/services/issue/issue_archive.service.ts
+++ b/web/core/services/issue/issue_archive.service.ts
@@ -1,7 +1,7 @@
+import { TIssue } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// types
-import { TIssue } from "@plane/types";
// constants
export class IssueArchiveService extends APIService {
diff --git a/web/core/services/issue/issue_comment.service.ts b/web/core/services/issue/issue_comment.service.ts
index 765a15fbb5..92ed6bf671 100644
--- a/web/core/services/issue/issue_comment.service.ts
+++ b/web/core/services/issue/issue_comment.service.ts
@@ -1,7 +1,7 @@
+import { TIssueComment } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// types
-import { TIssueComment } from "@plane/types";
// helper
export class IssueCommentService extends APIService {
@@ -17,7 +17,7 @@ export class IssueCommentService extends APIService {
| {
created_at__gt: string;
}
- | {} = {}
+ | object = {}
): Promise<TIssueComment[]> {
return this.get(`/api/workspaces/${workspaceSlug}/projects/${projectId}/issues/${issueId}/history/`, {
params: {
diff --git a/web/core/services/issue/issue_draft.service.ts b/web/core/services/issue/issue_draft.service.ts
index 15152798d4..919031285b 100644
--- a/web/core/services/issue/issue_draft.service.ts
+++ b/web/core/services/issue/issue_draft.service.ts
@@ -1,7 +1,7 @@
+import { TIssue, TIssuesResponse } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// helpers
-import { TIssue, TIssuesResponse } from "@plane/types";
export class IssueDraftService extends APIService {
constructor() {
diff --git a/web/core/services/issue/issue_label.service.ts b/web/core/services/issue/issue_label.service.ts
index b20a02baec..7a685218c6 100644
--- a/web/core/services/issue/issue_label.service.ts
+++ b/web/core/services/issue/issue_label.service.ts
@@ -1,8 +1,8 @@
+import { IIssueLabel } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
// services
import { APIService } from "@/services/api.service";
// types
-import { IIssueLabel } from "@plane/types";
export class IssueLabelService extends APIService {
constructor() {
diff --git a/web/core/services/issue/issue_reaction.service.ts b/web/core/services/issue/issue_reaction.service.ts
index 1ac1416ca0..9e2d355e12 100644
--- a/web/core/services/issue/issue_reaction.service.ts
+++ b/web/core/services/issue/issue_reaction.service.ts
@@ -1,8 +1,8 @@
+import type { TIssueCommentReaction, TIssueReaction } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
// services
import { APIService } from "@/services/api.service";
// types
-import type { TIssueCommentReaction, TIssueReaction } from "@plane/types";
export class IssueReactionService extends APIService {
constructor() {
diff --git a/web/core/services/issue/issue_relation.service.ts b/web/core/services/issue/issue_relation.service.ts
index 73f94a9fce..927d3af42b 100644
--- a/web/core/services/issue/issue_relation.service.ts
+++ b/web/core/services/issue/issue_relation.service.ts
@@ -1,8 +1,8 @@
+import type { TIssueRelation, TIssue, TIssueRelationTypes } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
// services
import { APIService } from "@/services/api.service";
// types
-import type { TIssueRelation, TIssue, TIssueRelationTypes } from "@plane/types";
export class IssueRelationService extends APIService {
constructor() {
diff --git a/web/core/services/issue_filter.service.ts b/web/core/services/issue_filter.service.ts
index 5567c79ad5..d051c685cd 100644
--- a/web/core/services/issue_filter.service.ts
+++ b/web/core/services/issue_filter.service.ts
@@ -1,8 +1,8 @@
// services
+import type { IIssueFiltersResponse } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// types
-import type { IIssueFiltersResponse } from "@plane/types";
export class IssueFiltersService extends APIService {
constructor() {
diff --git a/web/core/services/notification.service.ts b/web/core/services/notification.service.ts
index b96d7f3e1b..ff1cc81771 100644
--- a/web/core/services/notification.service.ts
+++ b/web/core/services/notification.service.ts
@@ -1,7 +1,4 @@
// services
-import { API_BASE_URL } from "@/helpers/common.helper";
-import { APIService } from "@/services/api.service";
-// types
import type {
IUserNotification,
INotificationParams,
@@ -9,6 +6,9 @@ import type {
PaginatedUserNotification,
IMarkAllAsReadPayload,
} from "@plane/types";
+import { API_BASE_URL } from "@/helpers/common.helper";
+import { APIService } from "@/services/api.service";
+// types
// helpers
export class NotificationService extends APIService {
diff --git a/web/core/services/project/project-state.service.ts b/web/core/services/project/project-state.service.ts
index 0760ca2317..17d3468d8c 100644
--- a/web/core/services/project/project-state.service.ts
+++ b/web/core/services/project/project-state.service.ts
@@ -1,9 +1,9 @@
// services
+import type { IState } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// helpers
// types
-import type { IState } from "@plane/types";
export class ProjectStateService extends APIService {
constructor() {
diff --git a/web/core/services/view.service.ts b/web/core/services/view.service.ts
index bf9b0816bd..f4fccbae03 100644
--- a/web/core/services/view.service.ts
+++ b/web/core/services/view.service.ts
@@ -1,7 +1,7 @@
+import { IProjectView } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// types
-import { IProjectView } from "@plane/types";
// helpers
export class ViewService extends APIService {
diff --git a/web/core/services/webhook.service.ts b/web/core/services/webhook.service.ts
index 1c9110457c..f85d4966a4 100644
--- a/web/core/services/webhook.service.ts
+++ b/web/core/services/webhook.service.ts
@@ -1,9 +1,9 @@
// api services
+import { IWebhook } from "@plane/types";
import { API_BASE_URL } from "@/helpers/common.helper";
import { APIService } from "@/services/api.service";
// helpers
// types
-import { IWebhook } from "@plane/types";
export class WebhookService extends APIService {
constructor() {
@@ -26,7 +26,7 @@ export class WebhookService extends APIService {
});
}
- async createWebhook(workspaceSlug: string, data: {}): Promise<IWebhook> {
+ async createWebhook(workspaceSlug: string, data = {}): Promise<IWebhook> {
return this.post(`/api/workspaces/${workspaceSlug}/webhooks/`, data)
.then((response) => response?.data)
.catch((error) => {
@@ -34,7 +34,7 @@ export class WebhookService extends APIService {
});
}
- async updateWebhook(workspaceSlug: string, webhookId: string, data: {}): Promise<IWebhook> {
+ async updateWebhook(workspaceSlug: string, webhookId: string, data = {}): Promise<IWebhook> {
return this.patch(`/api/workspaces/${workspaceSlug}/webhooks/${webhookId}/`, data)
.then((response) => response?.data)
.catch((error) => {
diff --git a/web/core/services/workspace.service.ts b/web/core/services/workspace.service.ts
index 9ba8eedf10..79bde3b8c7 100644
--- a/web/core/services/workspace.service.ts
+++ b/web/core/services/workspace.service.ts
@@ -1,8 +1,4 @@
// services
-import { API_BASE_URL } from "@/helpers/common.helper";
-import { APIService } from "@/services/api.service";
-// helpers
-// types
import {
IWorkspace,
IWorkspaceMemberMe,
@@ -17,6 +13,10 @@ import {
IWorkspaceView,
TIssuesResponse,
} from "@plane/types";
+import { API_BASE_URL } from "@/helpers/common.helper";
+import { APIService } from "@/services/api.service";
+// helpers
+// types
export class WorkspaceService extends APIService {
constructor() {
diff --git a/web/core/store/issue/archived/filter.store.ts b/web/core/store/issue/archived/filter.store.ts
index 16a790d05f..35bf0f55ae 100644
--- a/web/core/store/issue/archived/filter.store.ts
+++ b/web/core/store/issue/archived/filter.store.ts
@@ -4,9 +4,7 @@ import pickBy from "lodash/pickBy";
import set from "lodash/set";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// base class
-import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
-import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
-import { IssueFiltersService } from "@/services/issue_filter.service";
+import { computedFn } from "mobx-utils";
import {
IIssueFilterOptions,
IIssueDisplayFilterOptions,
@@ -16,11 +14,13 @@ import {
TIssueParams,
IssuePaginationOptions,
} from "@plane/types";
+import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
+import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
+import { IssueFiltersService } from "@/services/issue_filter.service";
import { IBaseIssueFilterStore, IssueFilterHelperStore } from "../helpers/issue-filter-helper.store";
// helpers
// types
import { IIssueRootStore } from "../root.store";
-import { computedFn } from "mobx-utils";
// constants
// services
diff --git a/web/core/store/issue/archived/issue.store.ts b/web/core/store/issue/archived/issue.store.ts
index 7810737790..2b90bd6096 100644
--- a/web/core/store/issue/archived/issue.store.ts
+++ b/web/core/store/issue/archived/issue.store.ts
@@ -3,9 +3,9 @@ import { action, makeObservable, runInAction } from "mobx";
import { TLoader, IssuePaginationOptions, TIssuesResponse, ViewFlags, TBulkOperationsPayload } from "@plane/types";
// services
// types
+import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
import { IIssueRootStore } from "../root.store";
import { IArchivedIssuesFilter } from "./filter.store";
-import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
export interface IArchivedIssues extends IBaseIssuesStore {
// observable
diff --git a/web/core/store/issue/cycle/filter.store.ts b/web/core/store/issue/cycle/filter.store.ts
index 8557aa36db..a813c94545 100644
--- a/web/core/store/issue/cycle/filter.store.ts
+++ b/web/core/store/issue/cycle/filter.store.ts
@@ -4,9 +4,7 @@ import pickBy from "lodash/pickBy";
import set from "lodash/set";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// base class
-import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
-import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
-import { IssueFiltersService } from "@/services/issue_filter.service";
+import { computedFn } from "mobx-utils";
import {
IIssueFilterOptions,
IIssueDisplayFilterOptions,
@@ -16,11 +14,13 @@ import {
TIssueParams,
IssuePaginationOptions,
} from "@plane/types";
+import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
+import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
+import { IssueFiltersService } from "@/services/issue_filter.service";
import { IBaseIssueFilterStore, IssueFilterHelperStore } from "../helpers/issue-filter-helper.store";
// helpers
// types
import { IIssueRootStore } from "../root.store";
-import { computedFn } from "mobx-utils";
// constants
// services
diff --git a/web/core/store/issue/cycle/issue.store.ts b/web/core/store/issue/cycle/issue.store.ts
index 75bf5001f9..263a2a2beb 100644
--- a/web/core/store/issue/cycle/issue.store.ts
+++ b/web/core/store/issue/cycle/issue.store.ts
@@ -1,4 +1,3 @@
-import { action, observable, makeObservable, runInAction } from "mobx";
// base class
// types
import concat from "lodash/concat";
@@ -6,7 +5,9 @@ import get from "lodash/get";
import set from "lodash/set";
import uniq from "lodash/uniq";
import update from "lodash/update";
+import { action, observable, makeObservable, runInAction } from "mobx";
// types
+import { computedFn } from "mobx-utils";
import {
TIssue,
TLoader,
@@ -15,11 +16,10 @@ import {
ViewFlags,
TBulkOperationsPayload,
} from "@plane/types";
-import { IIssueRootStore } from "../root.store";
+import { ALL_ISSUES } from "@/constants/issue";
import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
+import { IIssueRootStore } from "../root.store";
import { ICycleIssuesFilter } from "./filter.store";
-import { computedFn } from "mobx-utils";
-import { ALL_ISSUES } from "@/constants/issue";
export const ACTIVE_CYCLE_ISSUES = "ACTIVE_CYCLE_ISSUES";
@@ -369,9 +369,7 @@ export class CycleIssues extends BaseIssuesStore implements ICycleIssues {
set(this.activeCycleIds, [cycleId, "nextCursor"], response.next_cursor);
set(this.activeCycleIds, [cycleId, "nextPageResults"], response.next_page_results);
set(this.activeCycleIds, [cycleId, "issueCount"], response.total_count);
- update(this.activeCycleIds, [cycleId, "issueIds"], (issueIds: string[] = []) => {
- return this.issuesSortWithOrderBy(uniq(concat(issueIds, activeIssueIds)), this.orderBy);
- });
+ update(this.activeCycleIds, [cycleId, "issueIds"], (issueIds: string[] = []) => this.issuesSortWithOrderBy(uniq(concat(issueIds, activeIssueIds)), this.orderBy));
return response;
} catch (error) {
diff --git a/web/core/store/issue/draft/filter.store.ts b/web/core/store/issue/draft/filter.store.ts
index 0bd8da8f31..8756bf1308 100644
--- a/web/core/store/issue/draft/filter.store.ts
+++ b/web/core/store/issue/draft/filter.store.ts
@@ -4,9 +4,7 @@ import pickBy from "lodash/pickBy";
import set from "lodash/set";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// base class
-import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
-import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
-import { IssueFiltersService } from "@/services/issue_filter.service";
+import { computedFn } from "mobx-utils";
import {
IIssueFilterOptions,
IIssueDisplayFilterOptions,
@@ -16,11 +14,13 @@ import {
TIssueParams,
IssuePaginationOptions,
} from "@plane/types";
+import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
+import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
+import { IssueFiltersService } from "@/services/issue_filter.service";
import { IBaseIssueFilterStore, IssueFilterHelperStore } from "../helpers/issue-filter-helper.store";
// helpers
// types
import { IIssueRootStore } from "../root.store";
-import { computedFn } from "mobx-utils";
// constants
// services
diff --git a/web/core/store/issue/draft/issue.store.ts b/web/core/store/issue/draft/issue.store.ts
index cc48f48d19..db1ea1e9b8 100644
--- a/web/core/store/issue/draft/issue.store.ts
+++ b/web/core/store/issue/draft/issue.store.ts
@@ -3,9 +3,9 @@ import { action, makeObservable, runInAction } from "mobx";
// services
// types
import { TIssue, TLoader, ViewFlags, IssuePaginationOptions, TIssuesResponse, TBulkOperationsPayload } from "@plane/types";
+import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
import { IIssueRootStore } from "../root.store";
import { IDraftIssuesFilter } from "./filter.store";
-import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
export interface IDraftIssues extends IBaseIssuesStore {
// observable
diff --git a/web/core/store/issue/helpers/base-issues-utils.ts b/web/core/store/issue/helpers/base-issues-utils.ts
index 8324c07e55..273355a737 100644
--- a/web/core/store/issue/helpers/base-issues-utils.ts
+++ b/web/core/store/issue/helpers/base-issues-utils.ts
@@ -1,8 +1,8 @@
import isEmpty from "lodash/isEmpty";
-import { EIssueGroupedAction } from "./base-issues.store";
import uniq from "lodash/uniq";
import { TIssue } from "@plane/types";
import { ALL_ISSUES } from "@/constants/issue";
+import { EIssueGroupedAction } from "./base-issues.store";
/**
* returns,
@@ -172,6 +172,4 @@ export const getSortOrderToFilterEmptyValues = (key: string, object: any) => {
};
// get IssueIds from Issue data List
-export const getIssueIds = (issues: TIssue[]) => {
- return issues.map((issue) => issue?.id);
-};
+export const getIssueIds = (issues: TIssue[]) => issues.map((issue) => issue?.id);
diff --git a/web/core/store/issue/helpers/base-issues.store.ts b/web/core/store/issue/helpers/base-issues.store.ts
index 6f4156623e..44cd2fc114 100644
--- a/web/core/store/issue/helpers/base-issues.store.ts
+++ b/web/core/store/issue/helpers/base-issues.store.ts
@@ -1,16 +1,17 @@
-import { action, computed, makeObservable, observable, runInAction } from "mobx";
-import { computedFn } from "mobx-utils";
-import update from "lodash/update";
-import uniq from "lodash/uniq";
-import concat from "lodash/concat";
-import pull from "lodash/pull";
-import orderBy from "lodash/orderBy";
import clone from "lodash/clone";
-import indexOf from "lodash/indexOf";
-import set from "lodash/set";
+import concat from "lodash/concat";
import get from "lodash/get";
+import indexOf from "lodash/indexOf";
+import isEmpty from "lodash/isEmpty";
import isEqual from "lodash/isEqual";
import isNil from "lodash/isNil";
+import orderBy from "lodash/orderBy";
+import pull from "lodash/pull";
+import set from "lodash/set";
+import uniq from "lodash/uniq";
+import update from "lodash/update";
+import { action, computed, makeObservable, observable, runInAction } from "mobx";
+import { computedFn } from "mobx-utils";
// types
import {
TIssue,
@@ -27,15 +28,12 @@ import {
TPaginationData,
TBulkOperationsPayload,
} from "@plane/types";
-import { IIssueRootStore } from "../root.store";
-import { IBaseIssueFilterStore } from "./issue-filter-helper.store";
-// constants
import { ALL_ISSUES, EIssueLayoutTypes, ISSUE_PRIORITIES } from "@/constants/issue";
-// helpers
-// services
+import { convertToISODateString } from "@/helpers/date-time.helper";
+import { CycleService } from "@/services/cycle.service";
import { IssueArchiveService, IssueDraftService, IssueService } from "@/services/issue";
import { ModuleService } from "@/services/module.service";
-import { CycleService } from "@/services/cycle.service";
+import { IIssueRootStore } from "../root.store";
import {
getDifference,
getGroupIssueKeyActions,
@@ -44,8 +42,10 @@ import {
getSortOrderToFilterEmptyValues,
getSubGroupIssueKeyActions,
} from "./base-issues-utils";
-import { convertToISODateString } from "@/helpers/date-time.helper";
-import isEmpty from "lodash/isEmpty";
+import { IBaseIssueFilterStore } from "./issue-filter-helper.store";
+// constants
+// helpers
+// services
export type TIssueDisplayFilterOptions = Exclude<TIssueGroupByOptions, null> | "target_date";
@@ -385,17 +385,14 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore {
/**
* gets the Loader value of particular group/subgroup/ALL_ISSUES
*/
- getIssueLoader = (groupId?: string, subGroupId?: string) => {
- return get(this.loader, getGroupKey(groupId, subGroupId));
- };
+ getIssueLoader = (groupId?: string, subGroupId?: string) => get(this.loader, getGroupKey(groupId, subGroupId));
/**
* gets the pagination data of particular group/subgroup/ALL_ISSUES
*/
getPaginationData = computedFn(
- (groupId: string | undefined, subGroupId: string | undefined): TPaginationData | undefined => {
- return get(this.issuePaginationData, [getGroupKey(groupId, subGroupId)]);
- }
+ (groupId: string | undefined, subGroupId: string | undefined): TPaginationData | undefined =>
+ get(this.issuePaginationData, [getGroupKey(groupId, subGroupId)])
);
/**
@@ -1165,17 +1162,15 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore {
//if update is add, add it at a particular path
if (issueUpdate.action === EIssueGroupedAction.ADD) {
// add issue Id at the path
- update(this, ["groupedIssueIds", ...issueUpdate.path], (issueIds: string[] = []) => {
- return this.issuesSortWithOrderBy(uniq(concat(issueIds, issueId)), this.orderBy);
- });
+ update(this, ["groupedIssueIds", ...issueUpdate.path], (issueIds: string[] = []) =>
+ this.issuesSortWithOrderBy(uniq(concat(issueIds, issueId)), this.orderBy)
+ );
}
//if update is delete, remove it at a particular path
if (issueUpdate.action === EIssueGroupedAction.DELETE) {
// remove issue Id from the path
- update(this, ["groupedIssueIds", ...issueUpdate.path], (issueIds: string[] = []) => {
- return pull(issueIds, issueId);
- });
+ update(this, ["groupedIssueIds", ...issueUpdate.path], (issueIds: string[] = []) => pull(issueIds, issueId));
}
// accumulate the updates so that we don't end up updating the count twice for the same issue
@@ -1184,9 +1179,9 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore {
//if update is reorder, reorder it at a particular path
if (issueUpdate.action === EIssueGroupedAction.REORDER) {
// re-order/re-sort the issue Ids at the path
- update(this, ["groupedIssueIds", ...issueUpdate.path], (issueIds: string[] = []) => {
- return this.issuesSortWithOrderBy(issueIds, this.orderBy);
- });
+ update(this, ["groupedIssueIds", ...issueUpdate.path], (issueIds: string[] = []) =>
+ this.issuesSortWithOrderBy(issueIds, this.orderBy)
+ );
}
}
@@ -1363,9 +1358,9 @@ export abstract class BaseIssuesStore implements IBaseIssuesStore {
// if groupedIssueIds is an array, update the `groupedIssueIds` store at the issuePath
if (groupedIssueIds && Array.isArray(groupedIssueIds)) {
- update(this, ["groupedIssueIds", ...issuePath], (issueIds: string[] = []) => {
- return this.issuesSortWithOrderBy(uniq(concat(issueIds, groupedIssueIds as string[])), this.orderBy);
- });
+ update(this, ["groupedIssueIds", ...issuePath], (issueIds: string[] = []) =>
+ this.issuesSortWithOrderBy(uniq(concat(issueIds, groupedIssueIds as string[])), this.orderBy)
+ );
// return true to indicate the store has been updated
return true;
}
diff --git a/web/core/store/issue/issue-details/comment.store.ts b/web/core/store/issue/issue-details/comment.store.ts
index b09f191c12..b53eb95256 100644
--- a/web/core/store/issue/issue-details/comment.store.ts
+++ b/web/core/store/issue/issue-details/comment.store.ts
@@ -5,9 +5,9 @@ import uniq from "lodash/uniq";
import update from "lodash/update";
import { action, makeObservable, observable, runInAction } from "mobx";
// services
+import { TIssueComment, TIssueCommentMap, TIssueCommentIdMap } from "@plane/types";
import { IssueCommentService } from "@/services/issue";
// types
-import { TIssueComment, TIssueCommentMap, TIssueCommentIdMap } from "@plane/types";
import { IIssueDetail } from "./root.store";
export type TCommentLoader = "fetch" | "create" | "update" | "delete" | "mutate" | undefined;
diff --git a/web/core/store/issue/issue-details/comment_reaction.store.ts b/web/core/store/issue/issue-details/comment_reaction.store.ts
index 6230f39360..e965ba97ee 100644
--- a/web/core/store/issue/issue-details/comment_reaction.store.ts
+++ b/web/core/store/issue/issue-details/comment_reaction.store.ts
@@ -7,9 +7,9 @@ import { action, makeObservable, observable, runInAction } from "mobx";
// services
// types
// helpers
+import { TIssueCommentReaction, TIssueCommentReactionIdMap, TIssueCommentReactionMap } from "@plane/types";
import { groupReactions } from "@/helpers/emoji.helper";
import { IssueReactionService } from "@/services/issue";
-import { TIssueCommentReaction, TIssueCommentReactionIdMap, TIssueCommentReactionMap } from "@plane/types";
import { IIssueDetail } from "./root.store";
export interface IIssueCommentReactionStoreActions {
diff --git a/web/core/store/issue/issue-details/link.store.ts b/web/core/store/issue/issue-details/link.store.ts
index 3c361beb9d..b6606ef318 100644
--- a/web/core/store/issue/issue-details/link.store.ts
+++ b/web/core/store/issue/issue-details/link.store.ts
@@ -1,9 +1,9 @@
import set from "lodash/set";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// services
+import { TIssueLink, TIssueLinkMap, TIssueLinkIdMap } from "@plane/types";
import { IssueService } from "@/services/issue";
// types
-import { TIssueLink, TIssueLinkMap, TIssueLinkIdMap } from "@plane/types";
import { IIssueDetail } from "./root.store";
export interface IIssueLinkStoreActions {
diff --git a/web/core/store/issue/issue-details/reaction.store.ts b/web/core/store/issue/issue-details/reaction.store.ts
index 9a7df80df8..5e86eb1fbc 100644
--- a/web/core/store/issue/issue-details/reaction.store.ts
+++ b/web/core/store/issue/issue-details/reaction.store.ts
@@ -7,9 +7,9 @@ import { action, makeObservable, observable, runInAction } from "mobx";
// services
// types
// helpers
+import { TIssueReaction, TIssueReactionMap, TIssueReactionIdMap } from "@plane/types";
import { groupReactions } from "@/helpers/emoji.helper";
import { IssueReactionService } from "@/services/issue";
-import { TIssueReaction, TIssueReactionMap, TIssueReactionIdMap } from "@plane/types";
import { IIssueDetail } from "./root.store";
export interface IIssueReactionStoreActions {
diff --git a/web/core/store/issue/issue-details/relation.store.ts b/web/core/store/issue/issue-details/relation.store.ts
index ec79cd74ed..e0c3869a79 100644
--- a/web/core/store/issue/issue-details/relation.store.ts
+++ b/web/core/store/issue/issue-details/relation.store.ts
@@ -1,9 +1,9 @@
import set from "lodash/set";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// services
+import { TIssueRelationIdMap, TIssueRelationMap, TIssueRelationTypes, TIssueRelation, TIssue } from "@plane/types";
import { IssueRelationService } from "@/services/issue";
// types
-import { TIssueRelationIdMap, TIssueRelationMap, TIssueRelationTypes, TIssueRelation, TIssue } from "@plane/types";
import { IIssueDetail } from "./root.store";
export interface IIssueRelationStoreActions {
diff --git a/web/core/store/issue/issue_calendar_view.store.ts b/web/core/store/issue/issue_calendar_view.store.ts
index ddf8cae673..decf7cf22c 100644
--- a/web/core/store/issue/issue_calendar_view.store.ts
+++ b/web/core/store/issue/issue_calendar_view.store.ts
@@ -1,11 +1,11 @@
import { observable, action, makeObservable, runInAction, computed } from "mobx";
// helpers
+import { computedFn } from "mobx-utils";
import { ICalendarPayload, ICalendarWeek } from "@/components/issues";
import { generateCalendarData } from "@/helpers/calendar.helper";
// types
import { getWeekNumberOfDate } from "@/helpers/date-time.helper";
-import { computedFn } from "mobx-utils";
export interface ICalendarStore {
calendarFilters: {
diff --git a/web/core/store/issue/module/filter.store.ts b/web/core/store/issue/module/filter.store.ts
index 297320f1ec..bfc4cee08a 100644
--- a/web/core/store/issue/module/filter.store.ts
+++ b/web/core/store/issue/module/filter.store.ts
@@ -4,9 +4,7 @@ import pickBy from "lodash/pickBy";
import set from "lodash/set";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// base class
-import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
-import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
-import { IssueFiltersService } from "@/services/issue_filter.service";
+import { computedFn } from "mobx-utils";
import {
IIssueFilterOptions,
IIssueDisplayFilterOptions,
@@ -16,11 +14,13 @@ import {
TIssueParams,
IssuePaginationOptions,
} from "@plane/types";
+import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
+import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
+import { IssueFiltersService } from "@/services/issue_filter.service";
import { IBaseIssueFilterStore, IssueFilterHelperStore } from "../helpers/issue-filter-helper.store";
// helpers
// types
import { IIssueRootStore } from "../root.store";
-import { computedFn } from "mobx-utils";
// constants
// services
diff --git a/web/core/store/issue/module/issue.store.ts b/web/core/store/issue/module/issue.store.ts
index 46fc577ba4..617302af63 100644
--- a/web/core/store/issue/module/issue.store.ts
+++ b/web/core/store/issue/module/issue.store.ts
@@ -1,8 +1,5 @@
import { action, makeObservable, runInAction } from "mobx";
// base class
-import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
-// services
-// types
import {
TIssue,
TLoader,
@@ -11,6 +8,9 @@ import {
TIssuesResponse,
TBulkOperationsPayload,
} from "@plane/types";
+import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
+// services
+// types
// store
import { IIssueRootStore } from "../root.store";
import { IModuleIssuesFilter } from "./filter.store";
diff --git a/web/core/store/issue/profile/filter.store.ts b/web/core/store/issue/profile/filter.store.ts
index a13933fd75..9e0eed7ab2 100644
--- a/web/core/store/issue/profile/filter.store.ts
+++ b/web/core/store/issue/profile/filter.store.ts
@@ -4,9 +4,7 @@ import pickBy from "lodash/pickBy";
import set from "lodash/set";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// base class
-import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
-import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
-import { IssueFiltersService } from "@/services/issue_filter.service";
+import { computedFn } from "mobx-utils";
import {
IIssueFilterOptions,
IIssueDisplayFilterOptions,
@@ -16,11 +14,13 @@ import {
TIssueParams,
IssuePaginationOptions,
} from "@plane/types";
+import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
+import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
+import { IssueFiltersService } from "@/services/issue_filter.service";
import { IBaseIssueFilterStore, IssueFilterHelperStore } from "../helpers/issue-filter-helper.store";
// helpers
// types
import { IIssueRootStore } from "../root.store";
-import { computedFn } from "mobx-utils";
// constants
// services
diff --git a/web/core/store/issue/profile/issue.store.ts b/web/core/store/issue/profile/issue.store.ts
index 6e164ab7a1..1a7e2127db 100644
--- a/web/core/store/issue/profile/issue.store.ts
+++ b/web/core/store/issue/profile/issue.store.ts
@@ -1,13 +1,13 @@
import { action, observable, makeObservable, computed, runInAction } from "mobx";
// base class
-import { UserService } from "@/services/user.service";
import { TIssue, TLoader, IssuePaginationOptions, TIssuesResponse, ViewFlags, TBulkOperationsPayload } from "@plane/types";
+import { UserService } from "@/services/user.service";
// services
// types
+import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
import { IIssueRootStore } from "../root.store";
import { IProfileIssuesFilter } from "./filter.store";
-import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
export interface IProfileIssues extends IBaseIssuesStore {
// observable
diff --git a/web/core/store/issue/project-views/filter.store.ts b/web/core/store/issue/project-views/filter.store.ts
index da0cb4a922..c304299cd0 100644
--- a/web/core/store/issue/project-views/filter.store.ts
+++ b/web/core/store/issue/project-views/filter.store.ts
@@ -4,9 +4,7 @@ import pickBy from "lodash/pickBy";
import set from "lodash/set";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// base class
-import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
-import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
-import { ViewService } from "@/services/view.service";
+import { computedFn } from "mobx-utils";
import {
IIssueFilterOptions,
IIssueDisplayFilterOptions,
@@ -16,11 +14,13 @@ import {
TIssueParams,
IssuePaginationOptions,
} from "@plane/types";
+import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
+import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
+import { ViewService } from "@/services/view.service";
import { IBaseIssueFilterStore, IssueFilterHelperStore } from "../helpers/issue-filter-helper.store";
// helpers
// types
import { IIssueRootStore } from "../root.store";
-import { computedFn } from "mobx-utils";
// constants
// services
diff --git a/web/core/store/issue/project-views/issue.store.ts b/web/core/store/issue/project-views/issue.store.ts
index e17c51af9b..cf7c337885 100644
--- a/web/core/store/issue/project-views/issue.store.ts
+++ b/web/core/store/issue/project-views/issue.store.ts
@@ -10,8 +10,8 @@ import {
} from "@plane/types";
// services
// types
-import { IIssueRootStore } from "../root.store";
import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
+import { IIssueRootStore } from "../root.store";
import { IProjectViewIssuesFilter } from "./filter.store";
export interface IProjectViewIssues extends IBaseIssuesStore {
@@ -125,7 +125,7 @@ export class ProjectViewIssues extends BaseIssuesStore implements IProjectViewIs
this.setLoader("pagination", groupId, subGroupId);
// get params from stored pagination options
- let params = this.issueFilterStore?.getFilterParams(
+ const params = this.issueFilterStore?.getFilterParams(
this.paginationOptions,
cursorObject?.nextCursor,
groupId,
diff --git a/web/core/store/issue/project/filter.store.ts b/web/core/store/issue/project/filter.store.ts
index 2b8cfd974d..87c0c9a231 100644
--- a/web/core/store/issue/project/filter.store.ts
+++ b/web/core/store/issue/project/filter.store.ts
@@ -4,8 +4,7 @@ import pickBy from "lodash/pickBy";
import set from "lodash/set";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// base class
-import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
-import { IssueFiltersService } from "@/services/issue_filter.service";
+import { computedFn } from "mobx-utils";
import {
IIssueFilterOptions,
IIssueDisplayFilterOptions,
@@ -15,13 +14,14 @@ import {
TIssueParams,
IssuePaginationOptions,
} from "@plane/types";
+import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
+import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
+import { IssueFiltersService } from "@/services/issue_filter.service";
import { IBaseIssueFilterStore, IssueFilterHelperStore } from "../helpers/issue-filter-helper.store";
// helpers
// types
import { IIssueRootStore } from "../root.store";
// constants
-import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue";
-import { computedFn } from "mobx-utils";
// services
export interface IProjectIssuesFilter extends IBaseIssueFilterStore {
diff --git a/web/core/store/issue/workspace/filter.store.ts b/web/core/store/issue/workspace/filter.store.ts
index 8e64483411..a8a00635f4 100644
--- a/web/core/store/issue/workspace/filter.store.ts
+++ b/web/core/store/issue/workspace/filter.store.ts
@@ -4,9 +4,7 @@ import pickBy from "lodash/pickBy";
import set from "lodash/set";
import { action, computed, makeObservable, observable, runInAction } from "mobx";
// base class
-import { EIssueFilterType, EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue";
-import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
-import { WorkspaceService } from "@/services/workspace.service";
+import { computedFn } from "mobx-utils";
import {
IIssueFilterOptions,
IIssueDisplayFilterOptions,
@@ -17,11 +15,13 @@ import {
TStaticViewTypes,
IssuePaginationOptions,
} from "@plane/types";
+import { EIssueFilterType, EIssueLayoutTypes, EIssuesStoreType } from "@/constants/issue";
+import { handleIssueQueryParamsByLayout } from "@/helpers/issue.helper";
+import { WorkspaceService } from "@/services/workspace.service";
import { IBaseIssueFilterStore, IssueFilterHelperStore } from "../helpers/issue-filter-helper.store";
// helpers
// types
import { IIssueRootStore } from "../root.store";
-import { computedFn } from "mobx-utils";
// constants
// services
diff --git a/web/core/store/issue/workspace/issue.store.ts b/web/core/store/issue/workspace/issue.store.ts
index 20191fa544..12d3a71528 100644
--- a/web/core/store/issue/workspace/issue.store.ts
+++ b/web/core/store/issue/workspace/issue.store.ts
@@ -1,11 +1,11 @@
import { action, makeObservable, runInAction } from "mobx";
// base class
-import { WorkspaceService } from "@/services/workspace.service";
import { IssuePaginationOptions, TBulkOperationsPayload, TIssue, TIssuesResponse, TLoader, ViewFlags } from "@plane/types";
+import { WorkspaceService } from "@/services/workspace.service";
// services
// types
-import { IIssueRootStore } from "../root.store";
import { BaseIssuesStore, IBaseIssuesStore } from "../helpers/base-issues.store";
+import { IIssueRootStore } from "../root.store";
import { IWorkspaceIssuesFilter } from "./filter.store";
export interface IWorkspaceIssues extends IBaseIssuesStore {
diff --git a/web/helpers/dashboard.helper.ts b/web/helpers/dashboard.helper.ts
index 97286bc3a9..a2d6a8c28a 100644
--- a/web/helpers/dashboard.helper.ts
+++ b/web/helpers/dashboard.helper.ts
@@ -1,10 +1,10 @@
import { endOfMonth, endOfWeek, endOfYear, startOfMonth, startOfWeek, startOfYear } from "date-fns";
// helpers
-import { renderFormattedDate, renderFormattedPayloadDate } from "./date-time.helper";
// types
import { TIssuesListTypes } from "@plane/types";
// constants
import { DURATION_FILTER_OPTIONS, EDurationFilters } from "@/constants/dashboard";
+import { renderFormattedDate, renderFormattedPayloadDate } from "./date-time.helper";
/**
* @description returns date range based on the duration filter
diff --git a/web/helpers/issue.helper.ts b/web/helpers/issue.helper.ts
index ae12ec84f8..e8ec791c41 100644
--- a/web/helpers/issue.helper.ts
+++ b/web/helpers/issue.helper.ts
@@ -168,14 +168,13 @@ export const shouldHighlightIssueDueDate = (
// if the issue is overdue, highlight the due date
return targetDateDistance <= 0;
};
-export const getIssueBlocksStructure = (block: TIssue): IGanttBlock => {
- return {
+export const getIssueBlocksStructure = (block: TIssue): IGanttBlock => ({
data: block,
id: block?.id,
sort_order: block?.sort_order,
start_date: getDate(block?.start_date),
target_date: getDate(block?.target_date),
- };};
+ });
export function getChangedIssuefields(formData: Partial<TIssue>, dirtyFields: { [key: string]: boolean | undefined }) {
const changedFields: Partial<TIssue> = {};
diff --git a/web/helpers/state.helper.ts b/web/helpers/state.helper.ts
index a7f07c72e8..cf57b52370 100644
--- a/web/helpers/state.helper.ts
+++ b/web/helpers/state.helper.ts
@@ -1,6 +1,6 @@
// types
-import { STATE_GROUPS } from "@/constants/state";
import { IState, IStateResponse } from "@plane/types";
+import { STATE_GROUPS } from "@/constants/state";
export const orderStateGroups = (unorderedStateGroups: IStateResponse | undefined): IStateResponse | undefined => {
if (!unorderedStateGroups) return undefined;
diff --git a/web/helpers/string.helper.ts b/web/helpers/string.helper.ts
index d8c879d431..048c83ecd6 100644
--- a/web/helpers/string.helper.ts
+++ b/web/helpers/string.helper.ts
@@ -50,7 +50,9 @@ const fallbackCopyTextToClipboard = (text: string) => {
// FIXME: Even though we are using this as a fallback, execCommand is deprecated πŸ‘Ž. We should find a better way to do this.
// https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand
document.execCommand("copy");
- } catch (err) {}
+ } catch (err) {
+ // catch fallback error
+ }
document.body.removeChild(textArea);
};
diff --git a/web/next-auth.d.ts b/web/next-auth.d.ts
deleted file mode 100644
index 1ff13c437e..0000000000
--- a/web/next-auth.d.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import NextAuth from "next-auth/next";
-
-declare module "next-auth" {
- interface Session {
- user: {
- name: string;
- email: string;
- image: string;
- accessToken: string;
- refreshToken: string;
- };
- }
-}
diff --git a/web/package.json b/web/package.json
index ca2be48294..068867902b 100644
--- a/web/package.json
+++ b/web/package.json
@@ -7,7 +7,7 @@
"develop": "next dev --port 3000",
"build": "next build",
"start": "next start",
- "lint": "next lint",
+ "lint": "eslint . --ext .ts,.tsx,.js,.jsx",
"export": "next export",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
},