Update dependencies for upcoming Console 4.22 release#371
Conversation
WalkthroughUpdated dependencies (React → 18.3.1, react-dom added, TypeScript → 5.9.3, SDK and PatternFly bumps), migrated routing imports from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes 🚥 Pre-merge checks | ✅ 12✅ Passed checks (12 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/utils/components/ListEmptyState/ListEmptyState.tsx (1)
68-77:⚠️ Potential issue | 🟡 MinorRelative paths in
createButtonlinkwill not resolve correctly withnavigate().Lines 74-75 handle absolute and relative paths inconsistently. When
params?.nsis truthy, callers like MultiNetworkPolicyList and IngressesList pass relative paths ('~new/form','~new') directly intonavigate(). React Router resolves relative paths against the current location, not as path segments to append. These should be normalized to absolute paths before navigating, similar to how the fallback branch constructs them explicitly:
SHARED_DEFAULT_PATH_NEW_RESOURCE_FORMandSHARED_DEFAULT_PATH_NEW_RESOURCE_YAMLare relative stringsserviceCreateFormLinkandrouteCreateFormLinkare already absolute and work correctly- Consider normalizing relative paths to absolute in ListEmptyState or in the calling components before passing them as
createButtonlink🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/utils/components/ListEmptyState/ListEmptyState.tsx` around lines 68 - 77, The onClick branch in ListEmptyState uses navigate(...) with createButtonlink directly when params?.ns is truthy, which fails for relative values like SHARED_DEFAULT_PATH_NEW_RESOURCE_FORM/SHARED_DEFAULT_PATH_NEW_RESOURCE_YAML passed by MultiNetworkPolicyList/IngressesList; update ListEmptyState.tsx to normalize createButtonlink to an absolute path before calling navigate (e.g., detect if createButtonlink is a relative token like startsWith('~') or not starting with '/' and build `/k8s/ns/${params.plural}/${createButtonlink}`), or introduce a small helper (ensureAbsolutePath) used in the onClick branch so serviceCreateFormLink/routeCreateFormLink keep working and relative shared constants are converted to absolute URLs prior to navigate.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@package.json`:
- Around line 49-50: Update package.json to bump `@typescript-eslint/parser` and
`@typescript-eslint/eslint-plugin` to v8.39.0 (or later) so they support
TypeScript 5.9.3; locate the dependency entries for "@typescript-eslint/parser"
and "@typescript-eslint/eslint-plugin" and replace their version pins with
">=8.39.0" (or a specific 8.39.0+ semver), then run the package manager to
regenerate the lockfile and run the linter/TypeScript build to verify
compatibility with the bumped "typescript" version.
In `@src/utils/components/DetailsItem/DetailsItem.tsx`:
- Line 141: The component's fallback logic treats valid children values (0, '',
false) as absent because it uses `children || ...` and still computes `hide`
from `obj/path` even when `children` is supplied; update the rendering logic in
DetailsItem (the component/function handling `children`, `hideEmpty`, and the
`hide` boolean) to: 1) compute displayed content using a strict check (e.g. use
`children !== undefined` or `children !== null`) so falsy but valid values are
preserved, and 2) when `children` is provided, skip deriving `hide` from the
`obj/path` logic (i.e. only apply the `obj/path` emptiness check when `children`
is not provided) so `hideEmpty` cannot hide explicit children. Use the
component's `children`, `hideEmpty`, and `hide` variables/logic to find the
exact lines to change.
In `@src/utils/resources/shared.ts`:
- Around line 60-62: getCreationTimestamp currently calls new
Date(...).toString(), which can produce "Invalid Date" or locale-dependent
output; change getCreationTimestamp to first check
resource?.metadata?.creationTimestamp and if absent return null, otherwise
construct a Date from it and return a stable ISO string using toISOString() only
after validating the Date is valid (isNaN(date.getTime()) -> return null).
Update the function getCreationTimestamp (and its generic K8sResourceCommon
usage) to implement this guard and return either a normalized ISO string or
null.
---
Outside diff comments:
In `@src/utils/components/ListEmptyState/ListEmptyState.tsx`:
- Around line 68-77: The onClick branch in ListEmptyState uses navigate(...)
with createButtonlink directly when params?.ns is truthy, which fails for
relative values like
SHARED_DEFAULT_PATH_NEW_RESOURCE_FORM/SHARED_DEFAULT_PATH_NEW_RESOURCE_YAML
passed by MultiNetworkPolicyList/IngressesList; update ListEmptyState.tsx to
normalize createButtonlink to an absolute path before calling navigate (e.g.,
detect if createButtonlink is a relative token like startsWith('~') or not
starting with '/' and build `/k8s/ns/${params.plural}/${createButtonlink}`), or
introduce a small helper (ensureAbsolutePath) used in the onClick branch so
serviceCreateFormLink/routeCreateFormLink keep working and relative shared
constants are converted to absolute URLs prior to navigate.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 8e85afc5-140f-4f82-8cca-7fc016049946
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (60)
package.jsonplugin-manifest.tssrc/utils/components/Area/components/PrometheusGraphLink.tsxsrc/utils/components/Breadcrumbs/Breadcrumbs.tsxsrc/utils/components/DetailsItem/DetailsItem.tsxsrc/utils/components/ErrorAlert.tsxsrc/utils/components/ErrorPage/ErrorPage.tsxsrc/utils/components/ListEmptyState/ListEmptyState.tsxsrc/utils/components/MatchExpression/Expression.tsxsrc/utils/components/MatchExpression/MatchExpression.tsxsrc/utils/components/OwnerReference/owner-references.tsxsrc/utils/components/ProjectsPrimaryUDNAlerts/NoProjectReadyForPrimaryUDNAlert.tsxsrc/utils/components/Selector/Selector.tsxsrc/utils/flags/manifest.tssrc/utils/hooks/useQueryParams.tssrc/utils/resources/shared.tssrc/views/createprojectmodal/CreateProjectModal.tsxsrc/views/createprojectmodal/manifest.tssrc/views/ingresses/actions/hooks/useIngressActions.tssrc/views/ingresses/list/IngressesList.tsxsrc/views/ingresses/manifest.tssrc/views/nads/actions/hooks/useNADsActions.tsxsrc/views/nads/form/NetworkAttachmentDefinitionForm.tsxsrc/views/nads/list/NetworkAttachmentDefinitionList.tsxsrc/views/nads/list/components/NADListEmpty/NADListEmpty.tsxsrc/views/nads/manifest.tssrc/views/networkpolicies/actions/hooks/useNetworkPolicyActions.tsxsrc/views/networkpolicies/details/tabs/details/components/NetworkPolicyDetailsRow/NetworkPolicyDetailsRowPodSelector.tsxsrc/views/networkpolicies/list/EnableMultiPage.tsxsrc/views/networkpolicies/list/NetworkPolicyPage.tsxsrc/views/networkpolicies/list/components/NetworkPolicyEmptyState.tsxsrc/views/networkpolicies/list/components/NetworkPolicyRow.tsxsrc/views/networkpolicies/manifest.tssrc/views/networkpolicies/new/NetworkPolicyConditionalSelector.tsxsrc/views/networkpolicies/new/NetworkPolicyForm.tsxsrc/views/networkpolicies/new/NetworkPolicyFormSections.tsxsrc/views/networkpolicies/new/NetworkPolicyPeerIPBlock.tsxsrc/views/networkpolicies/new/components/NetworkPolicyFormActionButtons.tsxsrc/views/networkpolicies/new/components/NetworkPolicyFormPorts.tsxsrc/views/networkpolicies/new/hooks/useIsMultiNetworkPolicy.tsxsrc/views/routes/actions/hooks/useRouteActions.tssrc/views/routes/details/EditRoute.tsxsrc/views/routes/form/RouteForm.tsxsrc/views/routes/form/RouteFormActions.tsxsrc/views/routes/form/useIsCreationForm.tsxsrc/views/routes/list/RoutesList.tsxsrc/views/routes/manifest.tssrc/views/services/actions/hooks/useServiceActions.tsxsrc/views/services/details/tabs/pods/components/PodStatus.tsxsrc/views/services/details/tabs/pods/components/PodTraffic.tsxsrc/views/services/list/ServiceList.tsxsrc/views/services/list/components/ServiceRow.tsxsrc/views/services/manifest.tssrc/views/udns/actions/hooks/useUDNActions.tsxsrc/views/udns/form/UserDefinedNetworkForm.tsxsrc/views/udns/form/UserDefinedNetworkFormPage.tsxsrc/views/udns/list/UserDefinedNetworksList.tsxsrc/views/udns/list/components/UserDefinedNetworkCreateForm.tsxsrc/views/udns/list/components/UserDefinedNetworkCreateModal.tsxsrc/views/udns/manifest.ts
|
|
||
| export type DetailsItemProps = { | ||
| canEdit?: boolean; | ||
| children?: ReactNode; |
There was a problem hiding this comment.
Fix children fallback semantics to avoid dropping valid values.
Line [85] uses children || ..., so valid values like 0, '', or false are treated as absent. Also, Line [83] still derives hide from obj/path even when children is provided, which can hide explicit content when hideEmpty is true.
💡 Proposed fix
- const hide = hideEmpty && _.isEmpty(_.get(obj, path));
+ const objectValue = _.get(obj, path);
+ const hasChildrenProp = children !== undefined;
+ const valueSource = hasChildrenProp ? children : objectValue;
+ const hide = hideEmpty && _.isEmpty(valueSource);
const popoverContent: string = description ?? getPropertyDescription(model, path);
- const value: ReactNode = children || _.get(obj, path, defaultValue);
+ const value: ReactNode = hasChildrenProp ? children : _.get(obj, path, defaultValue);Also applies to: 83-85
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/utils/components/DetailsItem/DetailsItem.tsx` at line 141, The
component's fallback logic treats valid children values (0, '', false) as absent
because it uses `children || ...` and still computes `hide` from `obj/path` even
when `children` is supplied; update the rendering logic in DetailsItem (the
component/function handling `children`, `hideEmpty`, and the `hide` boolean) to:
1) compute displayed content using a strict check (e.g. use `children !==
undefined` or `children !== null`) so falsy but valid values are preserved, and
2) when `children` is provided, skip deriving `hide` from the `obj/path` logic
(i.e. only apply the `obj/path` emptiness check when `children` is not provided)
so `hideEmpty` cannot hide explicit children. Use the component's `children`,
`hideEmpty`, and `hide` variables/logic to find the exact lines to change.
| export const getCreationTimestamp = <A extends K8sResourceCommon = K8sResourceCommon>( | ||
| resource: A, | ||
| ) => new Date(resource?.metadata?.creationTimestamp); | ||
| ) => new Date(resource?.metadata?.creationTimestamp).toString(); |
There was a problem hiding this comment.
Avoid Date#toString() for Kubernetes creation timestamps.
On Line 62, this can emit "Invalid Date" for missing values and rewrites valid ISO timestamps into locale-dependent strings, which is brittle for downstream formatting/sorting.
✅ Suggested fix
/**
* Get creation timestamp
* `@param` resource - resource from which to retrieve creation timestamp
- * `@returns` Date - creation timestamp as a Date object
+ * `@returns` string | undefined - creation timestamp in original ISO format
*/
export const getCreationTimestamp = <A extends K8sResourceCommon = K8sResourceCommon>(
resource: A,
-) => new Date(resource?.metadata?.creationTimestamp).toString();
+): string | undefined => resource?.metadata?.creationTimestamp;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| export const getCreationTimestamp = <A extends K8sResourceCommon = K8sResourceCommon>( | |
| resource: A, | |
| ) => new Date(resource?.metadata?.creationTimestamp); | |
| ) => new Date(resource?.metadata?.creationTimestamp).toString(); | |
| /** | |
| * Get creation timestamp | |
| * `@param` resource - resource from which to retrieve creation timestamp | |
| * `@returns` string | undefined - creation timestamp in original ISO format | |
| */ | |
| export const getCreationTimestamp = <A extends K8sResourceCommon = K8sResourceCommon>( | |
| resource: A, | |
| ): string | undefined => resource?.metadata?.creationTimestamp; |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/utils/resources/shared.ts` around lines 60 - 62, getCreationTimestamp
currently calls new Date(...).toString(), which can produce "Invalid Date" or
locale-dependent output; change getCreationTimestamp to first check
resource?.metadata?.creationTimestamp and if absent return null, otherwise
construct a Date from it and return a stable ISO string using toISOString() only
after validating the Date is valid (isNaN(date.getTime()) -> return null).
Update the function getCreationTimestamp (and its generic K8sResourceCommon
usage) to implement this guard and return either a normalized ISO string or
null.
| export const getCreationTimestamp = <A extends K8sResourceCommon = K8sResourceCommon>( | ||
| resource: A, | ||
| ) => new Date(resource?.metadata?.creationTimestamp); | ||
| ) => new Date(resource?.metadata?.creationTimestamp).toString(); |
There was a problem hiding this comment.
why adding the .toString() here?
There was a problem hiding this comment.
Modify
getCreationTimestamp- adapt to ConsoleTimestampPropschange
This change modifies getCreationTimestamp return type from Date to string to accomodate the above mentioned change in Console Timestamp props.
359fde9 to
77e630d
Compare
|
Rebased and bumped Console plugin SDK dependencies to |
|
/hold cancel |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/utils/components/DetailsItem/DetailsItem.tsx (1)
141-141:⚠️ Potential issue | 🟠 Major
childrenprop contract is still broken for falsy values andhideEmpty.Even with
children?: ReactNode, Line [85] still useschildren || ...and Line [83] still computeshidefromobj/path. This drops valid explicit children (0,'',false) and can hide provided content whenhideEmptyis true.💡 Proposed fix
- const hide = hideEmpty && _.isEmpty(_.get(obj, path)); + const objectValue = _.get(obj, path); + const hasChildrenProp = children !== undefined; + const valueSource = hasChildrenProp ? children : objectValue; + const hide = hideEmpty && _.isEmpty(valueSource); const popoverContent: string = description ?? getPropertyDescription(model, path); - const value: ReactNode = children || _.get(obj, path, defaultValue); + const value: ReactNode = hasChildrenProp ? children : _.get(obj, path, defaultValue);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/utils/components/DetailsItem/DetailsItem.tsx` at line 141, The DetailsItem component incorrectly treats falsy but valid children as absent by using truthy checks; update the logic in DetailsItem so you determine "childProvided" with explicit null/undefined checks (e.g., children !== undefined && children !== null) instead of using children || ... and compute "hide" by combining hideEmpty with whether the resolved value (from obj/path or "value" variable) is truly empty (null or undefined, or optionally strictly === '') only when no child was explicitly provided; replace any fallback expressions like children || fallback with a conditional that uses childProvided ? children : fallback so values 0, '', and false render correctly while hideEmpty still hides genuinely empty values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@plugin-manifest.ts`:
- Around line 1-4: The named imports in the import statement are out of
alphabetical order and fail the perfectionist/sort-named-imports rule; reorder
the named imports so ConsolePluginBuildMetadata comes before EncodedExtension in
the import from '@openshift-console/dynamic-plugin-sdk-webpack' (update the
import that currently lists EncodedExtension, ConsolePluginBuildMetadata to
ConsolePluginBuildMetadata, EncodedExtension).
---
Duplicate comments:
In `@src/utils/components/DetailsItem/DetailsItem.tsx`:
- Line 141: The DetailsItem component incorrectly treats falsy but valid
children as absent by using truthy checks; update the logic in DetailsItem so
you determine "childProvided" with explicit null/undefined checks (e.g.,
children !== undefined && children !== null) instead of using children || ...
and compute "hide" by combining hideEmpty with whether the resolved value (from
obj/path or "value" variable) is truly empty (null or undefined, or optionally
strictly === '') only when no child was explicitly provided; replace any
fallback expressions like children || fallback with a conditional that uses
childProvided ? children : fallback so values 0, '', and false render correctly
while hideEmpty still hides genuinely empty values.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: c9f701ff-4773-4279-b55b-46048aaff45a
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (60)
package.jsonplugin-manifest.tssrc/utils/components/Area/components/PrometheusGraphLink.tsxsrc/utils/components/Breadcrumbs/Breadcrumbs.tsxsrc/utils/components/DetailsItem/DetailsItem.tsxsrc/utils/components/ErrorAlert.tsxsrc/utils/components/ErrorPage/ErrorPage.tsxsrc/utils/components/ListEmptyState/ListEmptyState.tsxsrc/utils/components/MatchExpression/Expression.tsxsrc/utils/components/MatchExpression/MatchExpression.tsxsrc/utils/components/OwnerReference/owner-references.tsxsrc/utils/components/ProjectsPrimaryUDNAlerts/NoProjectReadyForPrimaryUDNAlert.tsxsrc/utils/components/Selector/Selector.tsxsrc/utils/flags/manifest.tssrc/utils/hooks/useQueryParams.tssrc/utils/resources/shared.tssrc/views/createprojectmodal/CreateProjectModal.tsxsrc/views/createprojectmodal/manifest.tssrc/views/ingresses/actions/hooks/useIngressActions.tssrc/views/ingresses/list/IngressesList.tsxsrc/views/ingresses/manifest.tssrc/views/nads/actions/hooks/useNADsActions.tsxsrc/views/nads/form/NetworkAttachmentDefinitionForm.tsxsrc/views/nads/list/NetworkAttachmentDefinitionList.tsxsrc/views/nads/list/components/NADListEmpty/NADListEmpty.tsxsrc/views/nads/manifest.tssrc/views/networkpolicies/actions/hooks/useNetworkPolicyActions.tsxsrc/views/networkpolicies/details/tabs/details/components/NetworkPolicyDetailsRow/NetworkPolicyDetailsRowPodSelector.tsxsrc/views/networkpolicies/list/EnableMultiPage.tsxsrc/views/networkpolicies/list/NetworkPolicyPage.tsxsrc/views/networkpolicies/list/components/NetworkPolicyEmptyState.tsxsrc/views/networkpolicies/list/components/NetworkPolicyRow.tsxsrc/views/networkpolicies/manifest.tssrc/views/networkpolicies/new/NetworkPolicyConditionalSelector.tsxsrc/views/networkpolicies/new/NetworkPolicyForm.tsxsrc/views/networkpolicies/new/NetworkPolicyFormSections.tsxsrc/views/networkpolicies/new/NetworkPolicyPeerIPBlock.tsxsrc/views/networkpolicies/new/components/NetworkPolicyFormActionButtons.tsxsrc/views/networkpolicies/new/components/NetworkPolicyFormPorts.tsxsrc/views/networkpolicies/new/hooks/useIsMultiNetworkPolicy.tsxsrc/views/routes/actions/hooks/useRouteActions.tssrc/views/routes/details/EditRoute.tsxsrc/views/routes/form/RouteForm.tsxsrc/views/routes/form/RouteFormActions.tsxsrc/views/routes/form/useIsCreationForm.tsxsrc/views/routes/list/RoutesList.tsxsrc/views/routes/manifest.tssrc/views/services/actions/hooks/useServiceActions.tsxsrc/views/services/details/tabs/pods/components/PodStatus.tsxsrc/views/services/details/tabs/pods/components/PodTraffic.tsxsrc/views/services/list/ServiceList.tsxsrc/views/services/list/components/ServiceRow.tsxsrc/views/services/manifest.tssrc/views/udns/actions/hooks/useUDNActions.tsxsrc/views/udns/form/UserDefinedNetworkForm.tsxsrc/views/udns/form/UserDefinedNetworkFormPage.tsxsrc/views/udns/list/UserDefinedNetworksList.tsxsrc/views/udns/list/components/UserDefinedNetworkCreateForm.tsxsrc/views/udns/list/components/UserDefinedNetworkCreateModal.tsxsrc/views/udns/manifest.ts
✅ Files skipped from review due to trivial changes (46)
- src/views/createprojectmodal/CreateProjectModal.tsx
- src/views/networkpolicies/actions/hooks/useNetworkPolicyActions.tsx
- src/views/networkpolicies/list/EnableMultiPage.tsx
- src/views/services/list/components/ServiceRow.tsx
- src/views/routes/form/useIsCreationForm.tsx
- src/views/networkpolicies/details/tabs/details/components/NetworkPolicyDetailsRow/NetworkPolicyDetailsRowPodSelector.tsx
- src/utils/flags/manifest.ts
- src/utils/components/Area/components/PrometheusGraphLink.tsx
- src/views/routes/list/RoutesList.tsx
- src/utils/components/MatchExpression/Expression.tsx
- src/views/services/actions/hooks/useServiceActions.tsx
- src/views/ingresses/list/IngressesList.tsx
- src/views/routes/form/RouteFormActions.tsx
- src/utils/components/ProjectsPrimaryUDNAlerts/NoProjectReadyForPrimaryUDNAlert.tsx
- src/utils/components/MatchExpression/MatchExpression.tsx
- src/views/ingresses/actions/hooks/useIngressActions.ts
- src/views/udns/list/UserDefinedNetworksList.tsx
- src/views/networkpolicies/new/NetworkPolicyConditionalSelector.tsx
- src/views/networkpolicies/new/NetworkPolicyPeerIPBlock.tsx
- src/utils/components/Breadcrumbs/Breadcrumbs.tsx
- src/utils/components/OwnerReference/owner-references.tsx
- src/views/udns/list/components/UserDefinedNetworkCreateForm.tsx
- src/views/networkpolicies/new/hooks/useIsMultiNetworkPolicy.tsx
- src/utils/hooks/useQueryParams.ts
- src/views/networkpolicies/list/components/NetworkPolicyEmptyState.tsx
- src/views/nads/form/NetworkAttachmentDefinitionForm.tsx
- src/views/networkpolicies/new/components/NetworkPolicyFormActionButtons.tsx
- src/views/nads/actions/hooks/useNADsActions.tsx
- src/views/udns/form/UserDefinedNetworkForm.tsx
- src/views/routes/details/EditRoute.tsx
- src/views/services/list/ServiceList.tsx
- src/views/services/details/tabs/pods/components/PodTraffic.tsx
- src/views/services/manifest.ts
- src/utils/components/ListEmptyState/ListEmptyState.tsx
- src/views/networkpolicies/new/components/NetworkPolicyFormPorts.tsx
- src/views/networkpolicies/manifest.ts
- src/views/nads/list/NetworkAttachmentDefinitionList.tsx
- src/views/udns/actions/hooks/useUDNActions.tsx
- src/views/nads/manifest.ts
- src/utils/components/ErrorAlert.tsx
- src/views/routes/manifest.ts
- src/views/networkpolicies/new/NetworkPolicyFormSections.tsx
- src/views/udns/manifest.ts
- src/utils/components/Selector/Selector.tsx
- src/views/udns/form/UserDefinedNetworkFormPage.tsx
- src/views/networkpolicies/list/components/NetworkPolicyRow.tsx
🚧 Files skipped from review as they are similar to previous changes (10)
- src/views/udns/list/components/UserDefinedNetworkCreateModal.tsx
- src/views/routes/actions/hooks/useRouteActions.ts
- src/views/routes/form/RouteForm.tsx
- src/views/networkpolicies/list/NetworkPolicyPage.tsx
- src/views/networkpolicies/new/NetworkPolicyForm.tsx
- src/views/nads/list/components/NADListEmpty/NADListEmpty.tsx
- src/utils/resources/shared.ts
- src/utils/components/ErrorPage/ErrorPage.tsx
- src/views/createprojectmodal/manifest.ts
- package.json
| import { | ||
| EncodedExtension, | ||
| ConsolePluginBuildMetadata, | ||
| } from '@openshift-console/dynamic-plugin-sdk-webpack'; |
There was a problem hiding this comment.
Fix named import order to satisfy ESLint rule.
Line 3 currently places ConsolePluginBuildMetadata after EncodedExtension, which violates perfectionist/sort-named-imports.
Suggested change
import {
- EncodedExtension,
ConsolePluginBuildMetadata,
+ EncodedExtension,
} from '@openshift-console/dynamic-plugin-sdk-webpack';📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import { | |
| EncodedExtension, | |
| ConsolePluginBuildMetadata, | |
| } from '@openshift-console/dynamic-plugin-sdk-webpack'; | |
| import { | |
| ConsolePluginBuildMetadata, | |
| EncodedExtension, | |
| } from '@openshift-console/dynamic-plugin-sdk-webpack'; |
🧰 Tools
🪛 ESLint
[error] 3-3: Expected "ConsolePluginBuildMetadata" to come before "EncodedExtension"
(perfectionist/sort-named-imports)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@plugin-manifest.ts` around lines 1 - 4, The named imports in the import
statement are out of alphabetical order and fail the
perfectionist/sort-named-imports rule; reorder the named imports so
ConsolePluginBuildMetadata comes before EncodedExtension in the import from
'@openshift-console/dynamic-plugin-sdk-webpack' (update the import that
currently lists EncodedExtension, ConsolePluginBuildMetadata to
ConsolePluginBuildMetadata, EncodedExtension).
|
@vojtechszocs: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: upalatucci, vojtechszocs The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Plugin SDK and shared modules
react-router-domandreact-router-dom-v5-compat@openshift-console/dynamic-plugin-sdk-webpackreact-helmet- replaced by ConsoleDocumentTitlegetCreationTimestamp- adapt to ConsoleTimestampPropschangePatternFly
Follow-up improvements
npm run lintworks but warns about unsupported TypeScript versioni18next-parserneeds update - old version may cause issues and pulls in older TypeScript 4.xSummary by CodeRabbit
Release Notes
Improvements
New Features
Bug Fixes