Skip to content

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

Merged
sriramveeraghanta merged 2 commits intopreviewfrom
refactor-types-import-space
Oct 13, 2025
Merged

[WEB-5135] refactor: update sites ESLint configuration and refactor imports to use type imports#7956
sriramveeraghanta merged 2 commits intopreviewfrom
refactor-types-import-space

Conversation

@prateekshourya29
Copy link
Member

@prateekshourya29 prateekshourya29 commented Oct 13, 2025

Description

  • 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.

Type of Change

  • Code refactoring

Summary by CodeRabbit

  • Refactor
    • Converted many imports to type-only to reduce runtime bindings and clarify intent; no functional or UI changes.
  • Chores
    • Updated linting rules to prefer consistent type-import patterns and to adjust duplicate-import handling.
    • Standardized import patterns across the app for improved consistency and maintainability.

… imports to use type imports

- 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.
@makeplane
Copy link

makeplane bot commented Oct 13, 2025

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 13, 2025

Walkthrough

Adds ESLint import/type-import rules and converts many value imports to TypeScript type-only imports across the Space app. Changes are limited to import forms and linting configuration; there are no runtime control-flow, logic, or public API signature changes.

Changes

Cohort / File(s) Summary of changes
ESLint rules
apps/space/.eslintrc.js
Adds top-level rules enabling import/no-duplicates, consistent type specifier style, @typescript-eslint no-import-type-side-effects and consistent-type-imports; disables no-duplicate-imports.
App scaffolding
apps/space/app/layout.tsx, apps/space/app/provider.tsx, apps/space/app/[workspaceSlug]/[projectId]/page.ts
Convert runtime imports (Metadata, React types, project types) to type-only imports; no runtime change.
Account & common components
apps/space/core/components/account/*, apps/space/core/components/common/*
Move FC and other symbols to import type and reorganize imports; runtime behavior unchanged.
Editor components & hooks
apps/space/ce/.../root.tsx, apps/space/ce/hooks/use-editor-flagging.ts, apps/space/core/components/editor/*, apps/space/helpers/editor.helper.ts
Separate type vs value imports for editor types (TMentionComponentProps, EditorRefApi, TFileHandler, etc.); convert to import type.
Issues — filters & navbar
apps/space/core/components/issues/filters/*, apps/space/core/components/issues/navbar/*
Convert filter and navbar related types (TFilters, Placement, TIssueLayout, LucideProps) to type-only imports; split React FC from runtime hooks.
Issues — peek overview
apps/space/core/components/issues/peek-overview/*
Convert IIssue, IPeekMode, EditorRefApi, TIssuePublicComment and similar to type-only imports.
Issue layouts — Kanban & List
apps/space/core/components/issues/issue-layouts/kanban/*, apps/space/core/components/issues/issue-layouts/list/*, apps/space/core/components/issues/issue-layouts/*
Convert many @plane/types and React type symbols (MutableRefObject, IIssueDisplayProperties, grouping types, etc.) to import type; split React imports into type vs value.
Issue layout utils & HOCs
apps/space/core/components/issues/issue-layouts/utils.tsx, .../with-display-properties-HOC.tsx
Move store and grouping interfaces to type-only imports; runtime classes unchanged.
Hooks & helpers
apps/space/core/hooks/*, apps/space/helpers/*
Convert React types (RefObject, ReactNode) and domain types (IUser, IState, TStateGroups, ClassValue) to import type; keep value imports as needed.
Lib providers
apps/space/core/lib/{instance-provider,store-provider,toast-provider}.tsx
Import ReactNode as type-only; retain runtime imports like createContext.
Stores
apps/space/core/store/*, apps/space/core/store/publish/*
Convert interface/DTO imports to import type; preserve runtime enums/classes and add concrete ProfileStore value import where instantiated.
Types declarations
apps/space/core/types/issue.d.ts
Convert multiple @plane/types imports to type-only imports.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

Hop hop, I tweak my imports light,
Types tucked in day, no runtime in sight.
ESLint hums a tidy tune,
I nibble lines beneath the moon.
Rabbit trails of types—gentle and bright. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly references both the ESLint configuration update and the import refactoring, clearly summarizing the primary changes in the PR.
Description Check ✅ Passed The description includes the required Description and Type of Change sections as per the template and clearly outlines the changes, though optional sections like Test Scenarios and References are not present.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor-types-import-space

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between caa5e89 and a9cea7d.

📒 Files selected for processing (3)
  • apps/space/core/components/issues/issue-layouts/properties/all-properties.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/utils.tsx (2 hunks)
  • apps/space/core/components/issues/navbar/root.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/space/core/components/issues/issue-layouts/properties/all-properties.tsx
  • apps/space/core/components/issues/navbar/root.tsx
🔇 Additional comments (1)
apps/space/core/components/issues/issue-layouts/utils.tsx (1)

8-24: LGTM! Type-only imports correctly applied.

The conversion of value imports to import type for all types and interfaces is appropriate. All imported entities (GroupByColumnTypes, IGroupByColumn, TCycleGroups, IIssueDisplayProperties, TGroupedIssues, and the store interfaces) are used exclusively in type positions throughout the file, never as runtime values. This change improves bundle size and makes type usage explicit, aligning with TypeScript best practices.

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
apps/space/core/components/issues/issue-layouts/kanban/block.tsx (1)

3-3: Optional: Align component typing with FC for consistency.

To match the PR’s pattern (e.g., navbar files), consider importing FC as a type and using it instead of React.FC.

-import type { MutableRefObject } from "react";
+import type { FC, MutableRefObject } from "react";
@@
-const KanbanIssueDetailsBlock: React.FC<IssueDetailsBlockProps> = observer((props) => {
+const KanbanIssueDetailsBlock: FC<IssueDetailsBlockProps> = observer((props) => {
@@
-export const KanbanIssueBlock: React.FC<IssueBlockProps> = observer((props) => {
+export const KanbanIssueBlock: FC<IssueBlockProps> = observer((props) => {

Also applies to: 39-39, 70-70

apps/space/core/components/issues/navbar/layout-selection.tsx (1)

57-58: Use strict equality (===) for comparisons.

Avoid loose equality to prevent surprises and satisfy common ESLint rules (eqeqeq).

-                activeLayout == layout.key ? "bg-custom-background-100 shadow-custom-shadow-2xs" : ""
+                activeLayout === layout.key ? "bg-custom-background-100 shadow-custom-shadow-2xs" : ""
@@
-                className={`size-3.5 ${activeLayout == layout.key ? "text-custom-text-100" : "text-custom-text-200"}`}
+                className={`size-3.5 ${activeLayout === layout.key ? "text-custom-text-100" : "text-custom-text-200"}`}

Also applies to: 63-64

apps/space/core/components/issues/issue-layouts/kanban/swimlanes.tsx (1)

1-2: Type-only imports look correct. Optional: unify component typings.

Types are correctly erased at runtime. Optionally, mirror navbar files by importing FC as a type and using FC<...> instead of React.FC for consistency.

Also applies to: 5-15

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3eecec5 and caa5e89.

📒 Files selected for processing (78)
  • apps/space/.eslintrc.js (1 hunks)
  • apps/space/app/[workspaceSlug]/[projectId]/page.ts (1 hunks)
  • apps/space/app/layout.tsx (1 hunks)
  • apps/space/app/provider.tsx (1 hunks)
  • apps/space/ce/components/editor/embeds/mentions/root.tsx (1 hunks)
  • apps/space/ce/hooks/use-editor-flagging.ts (1 hunks)
  • apps/space/core/components/account/auth-forms/auth-banner.tsx (1 hunks)
  • apps/space/core/components/account/auth-forms/auth-header.tsx (1 hunks)
  • apps/space/core/components/account/auth-forms/auth-root.tsx (1 hunks)
  • apps/space/core/components/account/auth-forms/email.tsx (1 hunks)
  • apps/space/core/components/account/terms-and-conditions.tsx (1 hunks)
  • apps/space/core/components/common/powered-by.tsx (1 hunks)
  • apps/space/core/components/common/project-logo.tsx (1 hunks)
  • apps/space/core/components/editor/embeds/mentions/root.tsx (1 hunks)
  • apps/space/core/components/editor/lite-text-editor.tsx (1 hunks)
  • apps/space/core/components/editor/rich-text-editor.tsx (1 hunks)
  • apps/space/core/components/editor/toolbar.tsx (1 hunks)
  • apps/space/core/components/instance/instance-failure-view.tsx (1 hunks)
  • apps/space/core/components/issues/filters/applied-filters/filters-list.tsx (1 hunks)
  • apps/space/core/components/issues/filters/applied-filters/label.tsx (1 hunks)
  • apps/space/core/components/issues/filters/applied-filters/priority.tsx (1 hunks)
  • apps/space/core/components/issues/filters/applied-filters/root.tsx (1 hunks)
  • apps/space/core/components/issues/filters/helpers/dropdown.tsx (1 hunks)
  • apps/space/core/components/issues/filters/root.tsx (2 hunks)
  • apps/space/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/kanban/block.tsx (2 hunks)
  • apps/space/core/components/issues/issue-layouts/kanban/blocks-list.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/kanban/default.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/kanban/headers/group-by-card.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/kanban/headers/sub-group-by-card.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/kanban/kanban-group.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/kanban/swimlanes.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/list/base-list-root.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/list/block.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/list/blocks-list.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/list/default.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/list/list-group.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/properties/all-properties.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/properties/member.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/properties/priority.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/root.tsx (1 hunks)
  • apps/space/core/components/issues/issue-layouts/utils.tsx (2 hunks)
  • apps/space/core/components/issues/issue-layouts/with-display-properties-HOC.tsx (1 hunks)
  • apps/space/core/components/issues/navbar/controls.tsx (1 hunks)
  • apps/space/core/components/issues/navbar/layout-icon.tsx (1 hunks)
  • apps/space/core/components/issues/navbar/layout-selection.tsx (2 hunks)
  • apps/space/core/components/issues/navbar/root.tsx (1 hunks)
  • apps/space/core/components/issues/navbar/user-avatar.tsx (1 hunks)
  • apps/space/core/components/issues/peek-overview/comment/add-comment.tsx (1 hunks)
  • apps/space/core/components/issues/peek-overview/comment/comment-detail-card.tsx (1 hunks)
  • apps/space/core/components/issues/peek-overview/header.tsx (1 hunks)
  • apps/space/core/components/issues/peek-overview/issue-activity.tsx (1 hunks)
  • apps/space/core/components/issues/peek-overview/issue-details.tsx (1 hunks)
  • apps/space/core/components/issues/peek-overview/issue-properties.tsx (1 hunks)
  • apps/space/core/components/issues/peek-overview/layout.tsx (1 hunks)
  • apps/space/core/components/issues/peek-overview/side-peek-view.tsx (1 hunks)
  • apps/space/core/hooks/use-intersection-observer.tsx (1 hunks)
  • apps/space/core/hooks/use-mention.tsx (1 hunks)
  • apps/space/core/lib/instance-provider.tsx (1 hunks)
  • apps/space/core/lib/store-provider.tsx (1 hunks)
  • apps/space/core/lib/toast-provider.tsx (1 hunks)
  • apps/space/core/store/cycle.store.ts (1 hunks)
  • apps/space/core/store/helpers/filter.helpers.ts (1 hunks)
  • apps/space/core/store/instance.store.ts (1 hunks)
  • apps/space/core/store/issue-detail.store.ts (1 hunks)
  • apps/space/core/store/issue.store.ts (1 hunks)
  • apps/space/core/store/profile.store.ts (1 hunks)
  • apps/space/core/store/publish/publish.store.ts (1 hunks)
  • apps/space/core/store/publish/publish_list.store.ts (1 hunks)
  • apps/space/core/store/root.store.ts (1 hunks)
  • apps/space/core/store/state.store.ts (1 hunks)
  • apps/space/core/store/user.store.ts (1 hunks)
  • apps/space/core/types/issue.d.ts (1 hunks)
  • apps/space/helpers/authentication.helper.tsx (1 hunks)
  • apps/space/helpers/common.helper.ts (1 hunks)
  • apps/space/helpers/editor.helper.ts (1 hunks)
  • apps/space/helpers/issue.helper.ts (1 hunks)
  • apps/space/helpers/state.helper.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-01T15:30:17.605Z
Learnt from: lifeiscontent
PR: makeplane/plane#7888
File: packages/propel/src/avatar/avatar.stories.tsx:2-3
Timestamp: 2025-10-01T15:30:17.605Z
Learning: In the makeplane/plane repository, avoid suggesting inline type imports (e.g., `import { Avatar, type TAvatarSize }`) due to bundler compatibility issues. Keep type imports and value imports as separate statements.

Applied to files:

  • apps/space/core/components/issues/filters/applied-filters/priority.tsx
  • apps/space/core/store/issue-detail.store.ts
  • apps/space/core/store/publish/publish.store.ts
  • apps/space/helpers/issue.helper.ts
📚 Learning: 2025-10-09T20:42:31.843Z
Learnt from: lifeiscontent
PR: makeplane/plane#7922
File: apps/admin/app/(all)/(dashboard)/ai/form.tsx:19-19
Timestamp: 2025-10-09T20:42:31.843Z
Learning: In the makeplane/plane repository, React types are globally available through TypeScript configuration. Type annotations like React.FC, React.ReactNode, etc. can be used without explicitly importing the React namespace. The codebase uses the modern JSX transform, so React imports are not required for JSX or type references.

Applied to files:

  • apps/space/core/components/editor/lite-text-editor.tsx
  • apps/space/core/components/instance/instance-failure-view.tsx
  • apps/space/core/lib/store-provider.tsx
  • apps/space/core/components/issues/issue-layouts/with-display-properties-HOC.tsx
  • apps/space/core/components/editor/rich-text-editor.tsx
  • apps/space/core/components/common/powered-by.tsx
  • apps/space/core/components/issues/issue-layouts/list/list-group.tsx
  • apps/space/core/components/issues/issue-layouts/kanban/headers/sub-group-by-card.tsx
  • apps/space/app/provider.tsx
  • apps/space/core/components/issues/peek-overview/comment/add-comment.tsx
  • apps/space/core/components/issues/issue-layouts/kanban/block.tsx
  • apps/space/core/lib/toast-provider.tsx
📚 Learning: 2025-10-09T22:12:26.424Z
Learnt from: lifeiscontent
PR: makeplane/plane#7922
File: apps/admin/app/(all)/(dashboard)/ai/form.tsx:19-19
Timestamp: 2025-10-09T22:12:26.424Z
Learning: When `types/react` is installed in a TypeScript project (which is standard for React + TypeScript codebases), React types (React.FC, React.ReactNode, React.ComponentProps, etc.) are globally available by design. These type annotations can and should be used without explicitly importing the React namespace. This is a TypeScript/DefinitelyTyped feature, not codebase-specific configuration.

Applied to files:

  • apps/space/core/components/common/powered-by.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Build and lint web apps
🔇 Additional comments (73)
apps/space/core/lib/store-provider.tsx (1)

3-4: LGTM! Clean type/value import separation.

The split between type-only import for ReactNode and value import for createContext is correct and follows TypeScript best practices. ReactNode is used exclusively as a type annotation (line 22), while createContext is invoked at runtime (line 10).

apps/space/core/components/account/auth-forms/email.tsx (1)

3-10: LGTM! Clean type-only import refactoring.

The import changes correctly separate type-only imports (FC, FormEvent, IEmailCheckData) from runtime imports (React hooks). This follows TypeScript best practices and can improve tree-shaking. All imports are used appropriately in their respective contexts.

apps/space/core/components/editor/rich-text-editor.tsx (1)

3-4: LGTM! Type imports correctly separated.

The refactor correctly distinguishes runtime values from type-only imports. RichTextEditorWithRef remains a value import (used as a component), while EditorRefApi, IRichTextEditorProps, and TFileHandler are properly marked as type-only imports (used only in type annotations). This aligns with TypeScript best practices and the PR's objective.

apps/space/core/components/editor/toolbar.tsx (1)

5-6: LGTM! Excellent refactor to separate type imports.

The separation of type-only imports (ToolbarMenuItem, EditorRefApi) from the runtime value import (TOOLBAR_ITEMS) follows TypeScript best practices. Both types are used exclusively in type annotations (lines 12, 17), making this a correct application of the import type syntax. This improves code clarity and enables better tree-shaking.

apps/space/ce/hooks/use-editor-flagging.ts (1)

2-2: LGTM! Correct use of type-only import.

The conversion to import type is appropriate since TExtensions is only used in type positions within TEditorFlaggingHookReturnType. This aligns with TypeScript best practices and the PR's objective to standardize type imports across the codebase.

apps/space/core/components/issues/peek-overview/comment/add-comment.tsx (1)

7-10: LGTM! Correct conversion to type-only imports.

Both EditorRefApi and TIssuePublicComment are used exclusively in type positions (type annotations, generic parameters), making the type-only import conversion correct and aligned with TypeScript best practices.

apps/space/core/components/issues/peek-overview/comment/comment-detail-card.tsx (1)

7-8: LGTM! Correct conversion to type-only imports.

Both EditorRefApi and TIssuePublicComment are used exclusively in type positions (type annotations, generic parameters), making the type-only import conversion correct and aligned with TypeScript best practices.

apps/space/core/components/editor/lite-text-editor.tsx (1)

3-4: LGTM! Clean type/value import separation.

The refactoring correctly splits type-only imports (EditorRefApi, ILiteTextEditorProps, TFileHandler) from the value import (LiteTextEditorWithRef). All type imports are used exclusively in type positions, and the runtime component remains as a regular import. This optimization improves tree-shaking and build performance while maintaining clarity.

apps/space/core/components/issues/issue-layouts/with-display-properties-HOC.tsx (1)

1-1: LGTM! Correct conversion to type-only import.

Converting ReactNode to a type-only import is appropriate since it's used exclusively as a type annotation (line 10). This change improves TypeScript clarity and aligns with the PR's objective to adopt type-only imports.

Based on learnings: Note that React types are globally available in this codebase through TypeScript configuration, meaning React.ReactNode could be used without imports. However, the explicit type-only import for the destructured ReactNode identifier is a valid and clear approach.

apps/space/core/components/common/project-logo.tsx (1)

2-2: LGTM: Correct type-only import conversion.

The conversion of TLogoProps to a type-only import is correct since it's used exclusively as a type annotation (line 8). This aligns with TypeScript best practices and improves tree-shaking.

apps/space/core/types/issue.d.ts (1)

1-1: LGTM: Appropriate type-only import for type definition file.

Converting to type-only imports in a .d.ts file is correct and semantically accurate, as type definition files contain no runtime code.

apps/space/core/components/issues/peek-overview/header.tsx (1)

16-16: LGTM: Correct type-only import conversion.

Both IIssue and IPeekMode are used exclusively in type annotations (lines 20, 24), making the type-only import conversion accurate.

apps/space/core/components/account/terms-and-conditions.tsx (1)

3-4: LGTM: Correct separation of type and value imports.

The split between type-only (FC) and runtime (React) imports is correct. FC is used only as a type annotation (line 11), while the runtime React import is retained for compatibility.

apps/space/core/store/state.store.ts (1)

5-5: LGTM: Correct type-only import conversion.

The conversion of IState to a type-only import is correct since it's used exclusively in type annotations throughout the file (lines 13, 15, 17, 19, 23, 45). No runtime usage detected.

apps/space/core/components/issues/peek-overview/issue-properties.tsx (1)

21-21: LGTM: Correct type-only import conversion.

Both IIssue and IPeekMode are used exclusively in type annotations (lines 24, 25), making the type-only import conversion accurate.

apps/space/core/store/issue-detail.store.ts (1)

7-8: LGTM: Correct separation of type-only and value imports.

The split between type-only imports (TFileSignedURLResponse, TIssuePublicComment) and the value import (EFileAssetType) is correct:

  • Type-only imports are used exclusively in type annotations (lines 32, 35, 36)
  • EFileAssetType is used at runtime (lines 236, 253) and correctly remains a value import

This follows the repository guideline of keeping type and value imports as separate statements rather than using inline type imports.

Based on learnings.

apps/space/core/components/issues/issue-layouts/root.tsx (1)

3-4: LGTM: Correct separation of type and value imports.

The split between type-only (FC) and runtime (useEffect) imports is correct:

  • FC is used exclusively as a type annotation (line 26)
  • useEffect is used at runtime (line 46)

The removal of the React runtime import is appropriate for modern Next.js projects using the new JSX transform.

apps/space/core/store/cycle.store.ts (1)

4-4: LGTM!

Correct conversion to type-only import. TPublicCycle is used exclusively in type positions throughout the file.

apps/space/core/components/editor/embeds/mentions/root.tsx (1)

2-2: LGTM!

Correct conversion to type-only import. TMentionComponentProps is used exclusively as a type annotation.

apps/space/core/store/publish/publish_list.store.ts (1)

5-5: LGTM!

Correct conversion to type-only import. TProjectPublishSettings is used exclusively in type positions.

apps/space/core/components/account/auth-forms/auth-header.tsx (1)

3-3: LGTM!

Correct conversion to type-only import. FC is used exclusively as a type annotation.

apps/space/core/components/issues/filters/helpers/dropdown.tsx (1)

4-4: LGTM!

Correct conversion to type-only import. Placement is used exclusively as a type annotation.

apps/space/core/components/issues/issue-layouts/list/default.tsx (1)

4-12: LGTM!

Correct conversion to type-only imports. All imported types (GroupByColumnTypes, TGroupedIssues, IIssueDisplayProperties, TIssueGroupByOptions, IGroupByColumn, TPaginationData, TLoader) are used exclusively in type positions.

apps/space/core/store/instance.store.ts (1)

5-5: LGTM!

Correct conversion to type-only imports. IInstance and IInstanceConfig are used exclusively in type positions.

apps/space/core/components/issues/issue-layouts/kanban/headers/sub-group-by-card.tsx (1)

1-2: LGTM!

Correct separation of type-only import for FC while keeping React as a value import for JSX usage. The change properly distinguishes between type-only and runtime imports.

apps/space/app/provider.tsx (1)

3-3: LGTM! Type-only import is correct.

Converting FC and ReactNode to type-only imports is appropriate since they're used exclusively for type annotations in this file.

apps/space/ce/components/editor/embeds/mentions/root.tsx (1)

2-2: LGTM! Type-only import is correct.

TMentionComponentProps is used exclusively in the component's type annotation, making the type-only import appropriate.

apps/space/core/components/issues/issue-layouts/properties/all-properties.tsx (1)

14-14: LGTM! Type-only import is correct.

IIssue is used exclusively for type annotations in the interface definition and component signature.

apps/space/app/[workspaceSlug]/[projectId]/page.ts (1)

4-4: LGTM! Type-only import is correct.

TProjectPublishSettings is used exclusively in the type annotation on line 22.

apps/space/core/store/profile.store.ts (1)

5-6: LGTM! Import split is correct.

The changes correctly separate TUserProfile as a type-only import (used for typing) from EStartOfTheWeek as a value import (used as a runtime value on line 59).

apps/space/core/components/issues/issue-layouts/properties/priority.tsx (1)

8-8: LGTM! Type-only import is correct.

TIssuePriorities is used exclusively in type annotations for function parameters.

apps/space/core/components/issues/peek-overview/side-peek-view.tsx (1)

9-9: LGTM! Type-only import is correct.

IIssue is used exclusively in the Props interface definition.

apps/space/core/hooks/use-mention.tsx (1)

5-5: LGTM! Type-only import is correct.

IUser is used exclusively in type annotations for useRef and Promise generic parameters.

apps/space/core/components/issues/navbar/user-avatar.tsx (1)

3-4: LGTM! Type-only import for FC.

The refactor correctly separates the type import (FC) from runtime imports, reducing the runtime dependency on type-only symbols. This aligns with the PR's objective to adopt TypeScript best practices for type imports.

apps/space/core/store/helpers/filter.helpers.ts (1)

2-2: LGTM! Type-only import for type parameters.

Both IssuePaginationOptions and TIssueParams are used exclusively as type annotations in function signatures, making the type-only import appropriate and aligned with TypeScript best practices.

apps/space/helpers/authentication.helper.tsx (1)

1-1: LGTM! Type-only import for ReactNode.

ReactNode is used exclusively in type annotations (TAuthErrorInfo.message and function return types), making this type-only import correct and consistent with the PR's refactoring pattern.

apps/space/helpers/state.helper.ts (1)

2-2: LGTM! Type-only import for IState.

The interface is used exclusively in the function parameter type annotation, making this type-only import appropriate.

apps/space/helpers/common.helper.ts (1)

1-2: LGTM! Correct separation of value and type imports.

The refactor appropriately splits the clsx value import (needed at runtime) from the ClassValue type import (compile-time only), following TypeScript best practices.

apps/space/core/components/issues/peek-overview/issue-activity.tsx (1)

19-19: LGTM! Type-only import for IIssue.

The interface is used exclusively in the Props type definition, making this type-only import correct and consistent with the PR's refactoring approach.

apps/space/core/components/issues/navbar/controls.tsx (1)

3-4: LGTM! Type-only import for FC.

The refactor correctly separates the FC type import from the runtime import of useEffect, reducing runtime dependencies on type-only symbols while preserving functionality.

apps/space/helpers/editor.helper.ts (1)

3-3: LGTM! Type-only import for TFileHandler.

TFileHandler is used exclusively in type positions (the TArgs interface and the return type annotation), making this type-only import appropriate and aligned with the PR's systematic refactoring pattern.

apps/space/core/hooks/use-intersection-observer.tsx (1)

1-2: LGTM! Correct separation of type and value imports.

The refactor correctly splits the React import: RefObject is now a type-only import (used only for type annotations), while useEffect remains a value import (used at runtime). This aligns with TypeScript best practices.

apps/space/core/components/issues/peek-overview/issue-details.tsx (1)

6-6: LGTM! Appropriate type-only import.

IIssue is correctly converted to a type-only import since it's used exclusively in type positions (Props interface). This change improves import clarity without affecting runtime behavior.

apps/space/core/components/instance/instance-failure-view.tsx (1)

3-3: LGTM! Appropriate type-only import.

The conversion of FC to a type-only import is correct, as it's used exclusively for type annotation (line 11). This change aligns with the PR's goal of improving type import consistency.

apps/space/helpers/issue.helper.ts (1)

4-4: LGTM! Appropriate type-only import.

TStateGroups is correctly converted to a type-only import since it's used exclusively in the function parameter type annotation (line 16). The change has no impact on runtime behavior.

apps/space/core/lib/instance-provider.tsx (1)

3-3: LGTM! Appropriate type-only import.

The conversion of ReactNode to a type-only import is correct, as it's used exclusively for type annotation (line 22: children prop). This improves import clarity and aligns with TypeScript best practices.

apps/space/core/components/common/powered-by.tsx (1)

3-3: LGTM! Appropriate type-only import.

FC is correctly converted to a type-only import since it's used exclusively for component type annotation (line 12). This change is consistent with the PR's refactoring goals.

apps/space/core/components/issues/issue-layouts/list/base-list-root.tsx (1)

4-4: LGTM! Appropriate type-only imports.

Both IIssueDisplayProperties and TGroupedIssues are correctly converted to type-only imports, as they're used exclusively in type positions (lines 27, 29). This refactor improves import clarity without affecting runtime behavior.

apps/space/core/components/issues/filters/applied-filters/label.tsx (1)

5-5: LGTM! Appropriate type-only import.

IIssueLabel is correctly converted to a type-only import since it's used exclusively in the Props interface type annotation (line 9). This change aligns with the PR's consistent refactoring pattern.

apps/space/core/components/account/auth-forms/auth-banner.tsx (1)

3-6: LGTM! Type-only imports correctly applied.

The conversion of FC and TAuthErrorInfo to type-only imports is appropriate since both are used exclusively for type annotations without any runtime usage.

apps/space/app/layout.tsx (1)

1-1: LGTM! Correct type-only import.

The Metadata type is used solely for typing the exported constant, making the type-only import appropriate.

apps/space/core/store/publish/publish.store.ts (1)

3-11: LGTM! Type-only imports correctly applied.

All types from @plane/types and CoreRootStore are used exclusively for type annotations (interfaces, property types, constructor parameters), making the type-only imports appropriate. This aligns with the repository-wide pattern. Based on learnings.

apps/space/core/components/issues/filters/applied-filters/filters-list.tsx (1)

7-7: LGTM! Type-only import correctly applied.

TFilters is used exclusively for type annotations throughout the component, making the type-only import appropriate.

apps/space/core/components/issues/filters/applied-filters/priority.tsx (1)

4-5: LGTM! Correct separation of runtime and type imports.

The separation of PriorityIcon (runtime value for JSX) and TIssuePriorities (type-only) into separate import statements is correct and follows the repository's bundler compatibility requirements. Based on learnings.

apps/space/core/components/issues/peek-overview/layout.tsx (1)

3-4: LGTM! Correct separation of type and runtime imports.

The separation of FC as a type-only import from runtime React values (Fragment, useEffect, useState) is appropriate and follows TypeScript best practices.

apps/space/core/components/issues/issue-layouts/list/list-group.tsx (1)

3-14: LGTM! Correct separation of type and runtime imports.

The separation of type-only imports (MutableRefObject and all @plane/types types) from runtime imports (React hooks and components) is appropriate and follows TypeScript best practices. Based on learnings.

apps/space/core/store/issue.store.ts (1)

8-9: LGTM! Correct separation of class and interface imports.

The separation is correct: BaseIssuesStore as a runtime import (required for class extension at line 23) and IBaseIssuesStore as a type-only import (used for interface extension at line 11). This properly distinguishes between runtime class extension and type-level interface extension.

apps/space/core/components/issues/issue-layouts/utils.tsx (2)

8-14: LGTM! Correct conversion to type-only imports.

The types from @plane/types are used exclusively for type annotations (function parameters, return types) throughout the file, making this conversion to type-only imports appropriate and aligned with TypeScript best practices.


20-24: LGTM! Store interfaces correctly converted to type-only imports.

These store interfaces are used exclusively in function parameter type annotations (e.g., cycle: ICycleStore on line 31), so converting them to type-only imports is correct and improves build performance by clarifying they're not runtime dependencies.

apps/space/core/components/account/auth-forms/auth-root.tsx (3)

3-4: LGTM! React imports correctly segregated.

The split between type-only import for FC (used only for the component type annotation on line 37) and value imports for useEffect and useState (used at runtime) is correct and aligns with the new ESLint rules.


12-12: LGTM! Type-only import correctly applied.

IEmailCheckData is used exclusively as a parameter type annotation (line 98: async (data: IEmailCheckData) =>), making the type-only import appropriate.


16-17: LGTM! Authentication helper imports correctly segregated.

The split is correct: TAuthErrorInfo is used only for type annotations (line 48: useState<TAuthErrorInfo | undefined>), while EErrorAlertType, authErrorHandler, and EAuthenticationErrorCodes are used at runtime for function calls and value comparisons throughout the file.

apps/space/core/components/issues/issue-layouts/kanban/default.tsx (1)

1-14: LGTM! Type imports correctly converted.

All converted imports (MutableRefObject and types from @plane/types) are used exclusively in type positions—interface property types and function parameter annotations—making these type-only imports correct and consistent with the PR objectives.

apps/space/.eslintrc.js (1)

4-17: LGTM! ESLint rules correctly configured for type-import consistency.

The added rules effectively enforce the import patterns applied throughout this PR:

  • import/no-duplicates consolidates imports from the same module
  • import/consistent-type-specifier-style with prefer-top-level aligns with the import type pattern used
  • @typescript-eslint/consistent-type-imports with separate-type-imports enforces the split between type and value imports seen across all modified files

This configuration will help maintain consistency and catch violations automatically.

apps/space/core/components/issues/issue-layouts/kanban/base-kanban-root.tsx (1)

7-7: LGTM! Type annotation correctly converted.

IIssueDisplayProperties is used solely for the type annotation on line 23 (const displayProperties: IIssueDisplayProperties), making the type-only import appropriate.

apps/space/core/components/issues/issue-layouts/kanban/blocks-list.tsx (1)

1-4: LGTM! Type imports correctly converted.

Both MutableRefObject (line 13) and IIssueDisplayProperties (line 12) are used exclusively in the IssueBlocksListProps interface type annotations, making these type-only imports correct.

apps/space/core/components/issues/issue-layouts/list/blocks-list.tsx (1)

1-3: LGTM! Type imports correctly converted.

All three imports are used exclusively for type annotations:

  • FC for the component type (line 13)
  • MutableRefObject for the containerRef property type (line 10)
  • IIssueDisplayProperties for the displayProperties property type (line 9)

The type-only imports are appropriate and correct.

apps/space/core/components/issues/navbar/layout-icon.tsx (1)

1-3: LGTM! Import segregation correctly applied.

The reorganization properly distinguishes between type-only and runtime imports:

  • LucideProps and TIssueLayout are used exclusively for type annotations (line 5: type intersection and parameter type)
  • List and Kanban are used as runtime values (rendered as JSX components on lines 8 and 10)

This split aligns perfectly with the PR objectives and ESLint rules.

apps/space/core/components/issues/navbar/root.tsx (1)

3-3: LGTM on type-only React import.

Type-only FC import is correct here; no runtime dependency added.

apps/space/core/components/issues/navbar/layout-selection.tsx (1)

3-3: LGTM on type-only imports.

Both FC and TIssueLayout are used purely as types; this matches the new ESLint rules.

Also applies to: 16-16

apps/space/core/components/issues/issue-layouts/kanban/kanban-group.tsx (1)

3-4: Good split between type and value React imports.

MutableRefObject as type-only and hooks as values keep runtime clean.

apps/space/core/store/user.store.ts (1)

6-10: Solid separation of type vs value imports; instantiation is correct.

Keeping IProfileStore type-only and importing ProfileStore as a runtime value avoids accidental side effects and supports instantiation.

apps/space/core/store/root.store.ts (1)

3-24: Correct use of type-only interfaces alongside concrete store classes.

This reduces runtime import footprint while preserving type safety.

@sriramveeraghanta sriramveeraghanta merged commit 9f41e92 into preview Oct 13, 2025
5 of 6 checks passed
@sriramveeraghanta sriramveeraghanta deleted the refactor-types-import-space branch October 13, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants