Skip to content

CONSOLE-5021: Enable consistent-type-imports#16031

Merged
openshift-merge-bot[bot] merged 4 commits intoopenshift:mainfrom
logonoff:CONSOLE-5021-type-imports
Feb 19, 2026
Merged

CONSOLE-5021: Enable consistent-type-imports#16031
openshift-merge-bot[bot] merged 4 commits intoopenshift:mainfrom
logonoff:CONSOLE-5021-type-imports

Conversation

@logonoff
Copy link
Member

@logonoff logonoff commented Feb 17, 2026

This PR enables @typescript-eslint/consistent-type-imports, then applies yarn lint --fix in a separate commit. No other changes

Summary by CodeRabbit

Release Notes

  • Refactor
    • Optimized TypeScript import declarations by converting numerous runtime imports to type-only imports throughout the codebase. This improves build efficiency and reduces unnecessary runtime dependencies while maintaining all existing functionality and APIs.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Feb 17, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 17, 2026

@logonoff: This pull request references CONSOLE-5021 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

This PR enables @typescript-eslint/consistent-type-imports, then applies yarn lint --fix in a separate commit. No other changes

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@logonoff
Copy link
Member Author

/label px-approved
/label docs-approved

@openshift-ci openshift-ci bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels Feb 17, 2026
@openshift-ci openshift-ci bot requested review from jhadvig and mareklibra February 17, 2026 15:08
@openshift-ci openshift-ci bot added component/core Related to console core functionality component/dashboard Related to dashboard component/dev-console Related to dev-console approved Indicates a PR has been approved by an approver from all required OWNERS files. component/git-service Related to git-service component/helm Related to helm-plugin component/insights Related to insights plugin component/knative Related to knative-plugin component/metal3 Related to metal3-plugin component/olm Related to OLM component/sdk Related to console-plugin-sdk component/shared Related to console-shared component/topology Related to topology kind/cypress Related to Cypress e2e integration testing plugin-api-changed Categorizes a PR as containing plugin API changes labels Feb 17, 2026
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Feb 17, 2026

@logonoff: This pull request references CONSOLE-5021 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.22.0" version, but no target version was set.

Details

In response to this:

This PR enables @typescript-eslint/consistent-type-imports, then applies yarn lint --fix in a separate commit. No other changes

Summary by CodeRabbit

Release Notes

  • Refactor
  • Optimized TypeScript import declarations by converting numerous runtime imports to type-only imports throughout the codebase. This improves build efficiency and reduces unnecessary runtime dependencies while maintaining all existing functionality and APIs.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

📝 Walkthrough

Walkthrough

This pull request systematically converts value imports to type-only imports across the console-app and console-dynamic-plugin-sdk packages. The refactor replaces regular import { TypeName } statements with import type { TypeName } for identifiers used exclusively in type positions (type annotations, generics, interfaces). Hundreds of files are updated to separate type imports from runtime value imports. Runtime behavior, public APIs, and component logic remain unchanged; this is a compile-time optimization to improve tree-shaking and clarify type boundaries in the codebase.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: enabling the ESLint rule consistent-type-imports, which aligns perfectly with the changeset's objective of converting imports throughout the codebase to use type-only imports where appropriate.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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: 1

🧹 Nitpick comments (1)
frontend/packages/console-dynamic-plugin-sdk/src/schema/console-extensions.ts (1)

128-129: Deduplicate CreateResource in the SupportedExtension union.

CreateResource appears twice; remove one to avoid confusion and keep the union tidy.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@frontend/packages/console-dynamic-plugin-sdk/src/schema/console-extensions.ts`
around lines 128 - 129, The SupportedExtension union in console-extensions.ts
contains a duplicated member "CreateResource"; remove the extra "CreateResource"
entry from the SupportedExtension union declaration so each extension type
appears only once (locate the SupportedExtension type/union and delete the
duplicate CreateResource token).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@frontend/packages/console-app/src/components/admission-webhook-warnings/AdmissionWebhookWarningNotifications.tsx`:
- Line 3: The import shadows the global Map causing a lint error; change the
import to alias Immutable's Map (e.g., import type { Map as ImmutableMap } from
'immutable') and update all uses of Map in AdmissionWebhookWarningNotifications
(and any exported types in this file) to ImmutableMap so the global Map is not
shadowed and intent is explicit.

---

Nitpick comments:
In
`@frontend/packages/console-dynamic-plugin-sdk/src/schema/console-extensions.ts`:
- Around line 128-129: The SupportedExtension union in console-extensions.ts
contains a duplicated member "CreateResource"; remove the extra "CreateResource"
entry from the SupportedExtension union declaration so each extension type
appears only once (locate the SupportedExtension type/union and delete the
duplicate CreateResource token).

@logonoff
Copy link
Member Author

changes are import-only, and don't affect API

/label plugin-api-approved acknowledge-critical-fixes-only

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 18, 2026
@vojtechszocs
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 18, 2026
@logonoff
Copy link
Member Author

rebase
/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Feb 18, 2026
@openshift-ci-robot
Copy link
Contributor

@logonoff: This PR has been marked as verified by CI.

Details

In response to this:

rebase
/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@logonoff logonoff force-pushed the CONSOLE-5021-type-imports branch from 0284cde to 158c638 Compare February 18, 2026 22:06
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Feb 18, 2026
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 18, 2026
@logonoff
Copy link
Member Author

i missed two files running yarn eslint

/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Feb 18, 2026
@openshift-ci-robot
Copy link
Contributor

@logonoff: This PR has been marked as verified by CI.

Details

In response to this:

i missed two files running yarn eslint

/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@logonoff logonoff force-pushed the CONSOLE-5021-type-imports branch from 158c638 to 1e6b633 Compare February 19, 2026 15:18
@openshift-ci-robot openshift-ci-robot removed the verified Signifies that the PR passed pre-merge verification criteria label Feb 19, 2026
@logonoff
Copy link
Member Author

rebase
/verified by CI

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Feb 19, 2026
@openshift-ci-robot
Copy link
Contributor

@logonoff: This PR has been marked as verified by CI.

Details

In response to this:

rebase
/verified by CI

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@vojtechszocs
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 19, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 19, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, vojtechszocs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jhadvig
Copy link
Member

jhadvig commented Feb 19, 2026

Overriding due to infra issues
/override ci/prow/e2e-gcp-console

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 19, 2026

@jhadvig: Overrode contexts on behalf of jhadvig: ci/prow/e2e-gcp-console

Details

In response to this:

Overriding due to infra issues
/override ci/prow/e2e-gcp-console

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 19, 2026

@logonoff: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit c305cad into openshift:main Feb 19, 2026
8 checks passed
@logonoff logonoff deleted the CONSOLE-5021-type-imports branch February 19, 2026 20:33
TheRealJon pushed a commit to TheRealJon/console that referenced this pull request Feb 23, 2026
…ports

CONSOLE-5021: Enable consistent-type-imports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

acknowledge-critical-fixes-only Indicates if the issuer of the label is OK with the policy. approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/dashboard Related to dashboard component/dev-console Related to dev-console component/git-service Related to git-service component/helm Related to helm-plugin component/insights Related to insights plugin component/knative Related to knative-plugin component/metal3 Related to metal3-plugin component/olm Related to OLM component/sdk Related to console-plugin-sdk component/shared Related to console-shared component/topology Related to topology docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. kind/cypress Related to Cypress e2e integration testing lgtm Indicates that a PR is ready to be merged. plugin-api-approved Indicates a PR with plugin API changes has been approved by an API reviewer plugin-api-changed Categorizes a PR as containing plugin API changes px-approved Signifies that Product Support has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants