Skip to content

[Auto-QA] 25 uses of 'any' type reduce type safety #18402

@clubanderson

Description

@clubanderson

Auto-QA [Feature Recommendations]: Type Safety

Detected: 2026-06-14T14:07:40.586Z | Focus: Feature Recommendations | Commit: fed9343 | Run: View

Findings

Excessive 'any' type usage (25 occurrences) reduces type safety:

src/lib/acmm/tests/computeLevel.test.ts:62: // L2 "Instructed" uses a relaxed gate: any single criterion suffices
src/components/enterprise/tests/EnterpriseSidebar.test.tsx:8: SidebarShell: ({ navSections, branding, onAddCard, onAddMore }: any) => (
src/components/enterprise/tests/EnterpriseSidebar.test.tsx:12: {navSections.flatMap((section: any) => section.items).map((item: any) => (
src/components/enterprise/tests/EnterpriseLayout.test.tsx:49: DashboardCustomizer: ({ existingCardTypes, onAddCards, isOpen }: any) => (
src/components/mission-control/tests/ui-data-components.test.tsx:226: } as unknown as any}
src/components/mission-control/tests/ui-data-components.test.tsx:247: } as unknown as any}
src/components/mission-control/tests/ui-data-components.test.tsx:395: planningMission={{ status: 'running', messages: [] } as unknown as any}
src/components/settings/sections/VClusterActionBanner.tsx:16: : String(t(${keyBase}Fallback as any, { name: feedback.name, namespace: feedback.namespace }))
src/components/settings/sections/VClusterActionBanner.tsx:20: return String(t(keyBase as any, { name: feedback.name, namespace: feedback.namespace }))
src/components/dashboard/tests/CreateDashboardModal.test.tsx:52: <button onClick={onClose} data-testid="close-button" disabled={(rest as any).disabled}>Close
src/components/dashboard/tests/CreateDashboardModal.test.tsx:59: <div data-testid="modal-footer" data-disabled={(rest as any).disabled} data-loading={(rest as any).loading}>{children}
src/components/workloads/tests/Workloads.navigation.test.tsx:30:let mockPodIssues: any[] = []
src/components/workloads/tests/Workloads.navigation.test.tsx:31:let mockDeploymentIssues: any[] = []
src/components/workloads/tests/Workloads.navigation.test.tsx:32:let mockDeployments: any[] = []
src/components/workloads/tests/Workloads.navigation.test.tsx:33:let mockClusters: any[] = []
src/components/workloads/tests/Workloads.navigation.test.tsx:76: filterByCluster: (items: any[]) => items,
src/components/workloads/tests/Workloads.navigation.test.tsx:170: filterByCluster: (items: any[]) => items,
src/components/workloads/tests/Workloads.navigation.test.tsx:171: } as any)
src/components/workloads/tests/Workloads.test.tsx:44:let mockPodIssues: any[] = []
src/components/workloads/tests/Workloads.test.tsx:45:let mockDeploymentIssues: any[] = []
src/components/workloads/tests/Workloads.test.tsx:46:let mockDeployments: any[] = []
src/components/workloads/tests/Workloads.test.tsx:47:let mockClusters: any[] = []
src/components/workloads/tests/Workloads.test.tsx:66: filterByCluster: (items: any[]) => items,
src/components/workloads/tests/Workloads.test.tsx:184: filterByCluster: (items: any[]) => items,
src/components/workloads/tests/Workloads.test.tsx:185: } as any)

Suggested Improvements

  • Replace any with specific types or unknown
  • Create interfaces for API response types
  • Use generics for flexible but type-safe code
  • Add // eslint-disable-next-line only when truly necessary

PR Guidance: Keep changes under 50 lines (size S) for best acceptance rate. Split larger fixes into multiple PRs.


This issue was automatically created by the Auto-QA workflow during Feature Recommendations focus day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-fix-requestedai-needs-humanAI automation unavailable - needs human interventionai-processingAI is currently processing this issueauto-qaIssue detected by automated QAauto-qa:featuresenhancementNew feature or requesttriage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions