[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,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;