Skip to content

chore(eslint): Consistent type imports/exports#39341

Merged
dionisio-bot[bot] merged 3 commits into
developfrom
chore/consistent-type-imports
Mar 5, 2026
Merged

chore(eslint): Consistent type imports/exports#39341
dionisio-bot[bot] merged 3 commits into
developfrom
chore/consistent-type-imports

Conversation

@tassoevan

@tassoevan tassoevan commented Mar 4, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

It enforces consistent type imports and exports via ESLint.

Further comments

It's a replacement for verbatimModuleSyntax since we don't support ESM yet.

Task: ARCH-2042

Summary by CodeRabbit

Release Notes

  • Refactor
    • Enhanced type handling consistency across the codebase by standardizing import and export syntax for improved code quality and bundle optimization.
    • Updated linting configuration to enforce consistent type import and export patterns.

@dionisio-bot

dionisio-bot Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Mar 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d06130b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Walkthrough

Systematic conversion of value imports and exports to type-only imports and exports across 100+ files. Changes include converting import { type X } to import type { X }, export * from './X' to export type * from './X', and export { X } to export type { X } throughout the codebase.

Changes

Cohort / File(s) Summary
Client Application Type Imports
apps/meteor/app/emoji/client/index.ts, apps/meteor/client/components/message/variants/*, apps/meteor/client/hooks/useAppActionButtons.ts, apps/meteor/client/lib/createRouteGroup.tsx, apps/meteor/client/uikit/hooks/useBannerContextValue.ts, apps/meteor/client/views/audit/SecurityLogsPage.tsx, apps/meteor/client/views/navigation/sidepanel/SidepanelItem/SidePanelParent.tsx, apps/meteor/client/views/omnichannel/realTimeMonitoring/charts/useUpdateChartData.ts
Converted value-style type imports to type-only imports using import type syntax for React types and custom types.
Server Library Type Imports
apps/meteor/app/lib/server/methods/joinRoom.ts, apps/meteor/app/livechat/server/hooks/afterUserActions.ts, apps/meteor/definition/externals/global.d.ts, apps/meteor/server/lib/ldap/UserConverter.ts, apps/meteor/server/services/messages/hooks/BeforeSave*
Converted value-style type imports to type-only imports for server-side modules and utilities.
OmniChannel UI Type Imports
apps/meteor/client/components/RoomIcon/OmnichannelRoomIcon/OmnichannelAppSourceRoomIcon.tsx, apps/meteor/client/views/omnichannel/components/outboundMessage/components/TemplatePlaceholderSelector/TemplatePlaceholderInput.spec.tsx, apps/meteor/client/views/omnichannel/triggers/EditTrigger.tsx, apps/meteor/client/views/omnichannel/triggers/actions/ActionForm.tsx
Updated omnichannel-specific type imports and removed associated ESLint disable comments.
Test Files Type Imports
apps/meteor/tests/e2e/e2e-encryption/e2ee-legacy-format.spec.ts, apps/meteor/tests/e2e/fixtures/collections/users.ts, apps/meteor/tests/end-to-end/api/livechat/09-visitors.ts, apps/meteor/client/views/root/MainLayout/LayoutWithSidebar.spec.tsx
Converted test file type imports and tightened ESLint rules for type-related linting.
UIKit Playground Type Imports
apps/uikit-playground/src/Components/.../\*, apps/uikit-playground/src/Context/.../\*, apps/uikit-playground/src/Payload/.../\*, apps/uikit-playground/src/hooks/\*, apps/uikit-playground/src/utils/\*
Systematic conversion of type imports across UIKit playground components, context, and utility files.
License Package Imports
apps/meteor/ee/app/license/server/license.internalService.ts, apps/meteor/ee/app/license/server/methods.ts, ee/packages/license/src/tags.ts
Converted license-related type imports to type-only imports.
Enterprise Packages Re-exports
apps/meteor/ee/server/sdk/types/index.ts, ee/packages/media-calls/src/index.ts, ee/packages/pdf-worker/src/index.ts
Changed wildcard re-exports to type-only re-exports for service definitions and media call types.
Core Typings Major Re-export Refactoring
packages/core-typings/src/index.ts, packages/core-typings/src/IMessage/\*, packages/core-typings/src/cloud/index.ts, packages/core-typings/src/federation/\*, packages/core-typings/src/import/index.ts, packages/core-typings/src/ldap/index.ts, packages/core-typings/src/license/index.ts, packages/core-typings/src/mediaCalls/index.ts, packages/core-typings/src/omnichannel/index.ts, packages/core-typings/src/search/index.ts
Converted 88+ export lines from export * from to export type * from across type definition modules, systematically narrowing public API to type-only exports.
Core Services Re-exports
packages/core-services/src/index.ts
Updated 13 export declarations to type-only exports for service interfaces and related types.
API & REST Type Exports
packages/api-client/src/index.ts, packages/rest-typings/src/index.ts, packages/rest-typings/src/v1/.../index.ts
Converted public type exports to type-only exports for REST API typings, client interfaces, and endpoint parameters.
Model Typings Index
packages/model-typings/src/index.ts, packages/models/src/updater.ts
Converted 83+ model export declarations to type-only exports for database model interfaces.
UI Kit Core Index
packages/ui-kit/src/index.ts, packages/ui-kit/src/blocks/*.ts, packages/ui-kit/src/surfaces/.../index.ts
Converted 48+ UI kit block, element, and layout type exports to type-only exports; updated surface renderers to use type-only exports for view/layout types.
UI Contexts & Client
packages/ui-contexts/src/index.ts, packages/ui-client/src/components/GenericMenu/index.ts, packages/ui-client/src/components/index.ts, packages/ui-client/src/hooks/useFeaturePreview.ts
Converted context value types and component prop types to type-only exports; applied selective type-only exports for reusable UI components.
Media & Signaling Packages
packages/media-signaling/src/definition/.../index.ts, packages/ddp-client/src/index.ts, packages/http-router/src/index.ts, packages/livechat/src/\*, packages/message-parser/src/index.ts
Converted module re-exports to type-only exports; updated definition and client stream exports across media signaling and real-time communication packages.
Utility & Infrastructure
packages/fuselage-ui-kit/src/elements/*.tsx, packages/gazzodown/src/index.ts, packages/mongo-adapter/src/index.ts, packages/patch-injection/src/index.ts, packages/server-cloud-communication/src/index.ts, packages/server-fetch/src/index.ts, packages/ui-kit/src/blocks/*.ts, packages/ui-voip/src/definitions/index.ts
Converted helper library and infrastructure type exports to type-only; updated component and utility exports.
ESLint Configuration
packages/eslint-config/index.js
Updated TypeScript ESLint rules: added @typescript-eslint/consistent-type-exports: 'error', refactored @typescript-eslint/consistent-type-imports configuration from warn-level with fixStyle: 'inline-type-imports' to error-level with simplified options.
Miscellaneous Tests
packages/apps-engine/tests/test-data/storage/storage.ts
Removed ESLint disable comment for require statement.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

The PR involves 100+ files with consistent, repetitive type import/export refactoring. While individual file changes are simple and straightforward, the large volume and heterogeneity across multiple packages (core-typings, ui-kit, services, etc.) requires systematic verification. ESLint configuration changes require careful review to ensure enforcement is correct. No functional logic changes or breaking control flow modifications present.

Possibly related PRs

Suggested labels

type: chore, refactor: types

Suggested reviewers

  • ggazzo
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore(eslint): Consistent type imports/exports' clearly and concisely summarizes the main objective of converting imports and exports to use type-only syntax, which is the primary change throughout the entire changeset.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

@codecov

codecov Bot commented Mar 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 61.11111% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.86%. Comparing base (c68ac53) to head (d06130b).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #39341      +/-   ##
===========================================
- Coverage    70.89%   70.86%   -0.04%     
===========================================
  Files         3207     3196      -11     
  Lines       113334   113235      -99     
  Branches     20538    20504      -34     
===========================================
- Hits         80349    80242     -107     
- Misses       30940    30943       +3     
- Partials      2045     2050       +5     
Flag Coverage Δ
e2e 60.38% <ø> (-0.04%) ⬇️
e2e-api 47.77% <ø> (-0.09%) ⬇️
unit 71.56% <61.11%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tassoevan tassoevan changed the title chore(eslint): Consistent type imports chore(eslint): Consistent type imports/exports Mar 4, 2026
@tassoevan tassoevan added this to the 8.3.0 milestone Mar 4, 2026
@tassoevan tassoevan marked this pull request as ready for review March 4, 2026 22:51
@tassoevan tassoevan requested review from a team as code owners March 4, 2026 22:51

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 112 files

Note: This PR contains a large number of files. cubic only reviews up to 75 files per PR, so some files may not have been reviewed.

@tassoevan

Copy link
Copy Markdown
Member Author

/jira ARCH-2021

@sampaiodiego sampaiodiego added the stat: QA assured Means it has been tested and approved by a company insider label Mar 5, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Mar 5, 2026
@dionisio-bot dionisio-bot Bot added this pull request to the merge queue Mar 5, 2026
Merged via the queue into develop with commit 819399c Mar 5, 2026
111 of 117 checks passed
@dionisio-bot dionisio-bot Bot deleted the chore/consistent-type-imports branch March 5, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants