[WEB-5135] refactor: update sites ESLint configuration and refactor imports to use type imports#7956
Conversation
… 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.
|
Linked to Plane Work Item(s) This comment was auto-generated by Plane |
WalkthroughAdds 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
🔇 Additional comments (1)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the 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. Comment |
There was a problem hiding this comment.
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
📒 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.tsxapps/space/core/store/issue-detail.store.tsapps/space/core/store/publish/publish.store.tsapps/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.tsxapps/space/core/components/instance/instance-failure-view.tsxapps/space/core/lib/store-provider.tsxapps/space/core/components/issues/issue-layouts/with-display-properties-HOC.tsxapps/space/core/components/editor/rich-text-editor.tsxapps/space/core/components/common/powered-by.tsxapps/space/core/components/issues/issue-layouts/list/list-group.tsxapps/space/core/components/issues/issue-layouts/kanban/headers/sub-group-by-card.tsxapps/space/app/provider.tsxapps/space/core/components/issues/peek-overview/comment/add-comment.tsxapps/space/core/components/issues/issue-layouts/kanban/block.tsxapps/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
ReactNodeand value import forcreateContextis correct and follows TypeScript best practices.ReactNodeis used exclusively as a type annotation (line 22), whilecreateContextis 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.
RichTextEditorWithRefremains a value import (used as a component), whileEditorRefApi,IRichTextEditorProps, andTFileHandlerare 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 theimport typesyntax. 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 typeis appropriate sinceTExtensionsis only used in type positions withinTEditorFlaggingHookReturnType. 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
EditorRefApiandTIssuePublicCommentare 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
EditorRefApiandTIssuePublicCommentare 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
ReactNodeto 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.ReactNodecould be used without imports. However, the explicit type-only import for the destructuredReactNodeidentifier 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
TLogoPropsto 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.tsfile 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
IIssueandIPeekModeare 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.FCis used only as a type annotation (line 11), while the runtimeReactimport is retained for compatibility.apps/space/core/store/state.store.ts (1)
5-5: LGTM: Correct type-only import conversion.The conversion of
IStateto 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
IIssueandIPeekModeare 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)
EFileAssetTypeis used at runtime (lines 236, 253) and correctly remains a value importThis 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:
FCis used exclusively as a type annotation (line 26)useEffectis used at runtime (line 46)The removal of the
Reactruntime 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.
TPublicCycleis 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.
TMentionComponentPropsis 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.
TProjectPublishSettingsis 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.
FCis 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.
Placementis 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.
IInstanceandIInstanceConfigare 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
FCwhile keepingReactas 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
FCandReactNodeto 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.
TMentionComponentPropsis 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.
IIssueis 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.
TProjectPublishSettingsis 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
TUserProfileas a type-only import (used for typing) fromEStartOfTheWeekas 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.
TIssuePrioritiesis 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.
IIssueis used exclusively in the Props interface definition.apps/space/core/hooks/use-mention.tsx (1)
5-5: LGTM! Type-only import is correct.
IUseris used exclusively in type annotations foruseRefandPromisegeneric 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
IssuePaginationOptionsandTIssueParamsare 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.
ReactNodeis used exclusively in type annotations (TAuthErrorInfo.messageand 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
clsxvalue import (needed at runtime) from theClassValuetype 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
Propstype 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
FCtype import from the runtime import ofuseEffect, 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.
TFileHandleris used exclusively in type positions (theTArgsinterface 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:
RefObjectis now a type-only import (used only for type annotations), whileuseEffectremains 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.
IIssueis 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
FCto 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.
TStateGroupsis 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
ReactNodeto 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.
FCis 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
IIssueDisplayPropertiesandTGroupedIssuesare 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.
IIssueLabelis 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
FCandTAuthErrorInfoto 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
Metadatatype 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/typesandCoreRootStoreare 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.
TFiltersis 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) andTIssuePriorities(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
FCas 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 (
MutableRefObjectand all@plane/typestypes) 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:
BaseIssuesStoreas a runtime import (required for class extension at line 23) andIBaseIssuesStoreas 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/typesare 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: ICycleStoreon 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 foruseEffectanduseState(used at runtime) is correct and aligns with the new ESLint rules.
12-12: LGTM! Type-only import correctly applied.
IEmailCheckDatais 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:
TAuthErrorInfois used only for type annotations (line 48:useState<TAuthErrorInfo | undefined>), whileEErrorAlertType,authErrorHandler, andEAuthenticationErrorCodesare 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 (
MutableRefObjectand 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-duplicatesconsolidates imports from the same moduleimport/consistent-type-specifier-stylewithprefer-top-levelaligns with theimport typepattern used@typescript-eslint/consistent-type-importswithseparate-type-importsenforces the split between type and value imports seen across all modified filesThis 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.
IIssueDisplayPropertiesis 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) andIIssueDisplayProperties(line 12) are used exclusively in theIssueBlocksListPropsinterface 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:
FCfor the component type (line 13)MutableRefObjectfor the containerRef property type (line 10)IIssueDisplayPropertiesfor 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:
LucidePropsandTIssueLayoutare used exclusively for type annotations (line 5: type intersection and parameter type)ListandKanbanare 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.
Description
Type of Change
Summary by CodeRabbit