Enabled recommended-requiring-type-checking as result type fixes provided (#632)

* Enabled recommended-requiring-type-checking

* from .cjs to .js

* check

* check

* check

* check

* A lot of types aligned and refactored

* More strict types

* Improvement

* Improvements

* Improvements

* Fixed routs

* Fixed import types
This commit is contained in:
yuri-sakharov
2025-12-01 10:19:44 +02:00
committed by GitHub
parent 362f881b47
commit f2eb91bc02
75 changed files with 668 additions and 481 deletions

View File

@@ -3,11 +3,8 @@ import { useParams } from "react-router";
import hljs from "highlight.js";
import { RiExternalLinkLine } from "react-icons/ri";
import {
StructuredResources,
useGetResourceDescription,
useGetResources,
} from "../../API/releases";
import type { StructuredResources } from "../../API/releases";
import { useGetResourceDescription, useGetResources } from "../../API/releases";
import closeIcon from "../../assets/close.png";
import Drawer from "react-modern-drawer";
@@ -25,7 +22,6 @@ interface Props {
export default function RevisionResource({ isLatest }: Props) {
const { namespace = "", chart = "" } = useParams();
const { data: resources, isLoading } = useGetResources(namespace, chart);
const interestingResources = ["STATEFULSET", "DEAMONSET", "DEPLOYMENT"];
return (
<table
@@ -46,23 +42,15 @@ export default function RevisionResource({ isLatest }: Props) {
) : (
<tbody className="mt-4 h-8 w-full rounded-sm bg-white">
{resources?.length ? (
resources
.sort(function (a, b) {
return (
interestingResources.indexOf(a.kind.toUpperCase()) -
interestingResources.indexOf(b.kind.toUpperCase())
);
})
.reverse()
.map((resource: StructuredResources) => (
<ResourceRow
key={
resource.apiVersion + resource.kind + resource.metadata.name
}
resource={resource}
isLatest={isLatest}
/>
))
resources?.map((resource: StructuredResources) => (
<ResourceRow
key={
resource.apiVersion + resource.kind + resource.metadata.name
}
resource={resource}
isLatest={isLatest}
/>
))
) : (
<tr>
<div className="display-none no-charts mt-3 rounded-sm bg-white p-4 text-sm shadow-sm">