Skip to content

Commit d9f657d

Browse files
authored
Merge branch 'main' into 847-error-handling
2 parents 8e13968 + b1e5a52 commit d9f657d

11 files changed

Lines changed: 20 additions & 26 deletions

File tree

apps/heureka/eslint.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ export default [
1616
rules: {
1717
"prefer-const": "off",
1818
"no-unused-vars": "off",
19+
"@typescript-eslint/no-unused-vars": "error",
1920
"no-extra-boolean-cast": "off",
2021
"react/prop-types": "off",
2122
"react/react-in-jsx-scope": "off",
22-
"react/no-unused-vars": "off",
2323
"react-hooks/rules-of-hooks": "error",
2424
"react-hooks/exhaustive-deps": "off",
2525
"tailwindcss/classnames-order": "off",
@@ -39,6 +39,6 @@ export default [
3939
"@typescript-eslint/require-await": "off",
4040
"@typescript-eslint/no-unsafe-argument": "off",
4141
},
42-
ignores: ["vitest.config.ts", "vite.config.ts", "vitest.setup.ts", "tailwind.config.ts"],
42+
ignores: ["vitest.config.ts", "vite.config.ts", "vitest.setup.ts", "tailwind.config.ts", "**/routeTree.gen.ts"],
4343
},
4444
]

apps/heureka/src/components/Services/ServicesList/ServicePanel.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export const ServicePanel = () => {
3232
navigate({
3333
to: "/services",
3434
search: (prev) => {
35+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
3536
const { service, ...rest } = prev
3637
return { ...rest }
3738
},

apps/heureka/src/components/Vulnerabilities/Vulnerabilities.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { PortalProvider } from "@cloudoperators/juno-ui-components/index"
1010
import { Vulnerabilities } from "./index"
1111
import { Filter, FilterSettings } from "../common/Filters/types"
1212
import { getTestRouter } from "../../mocks/getTestRouter"
13-
import { mockVulnerabilitiesPromise, mockVulnerabilityFiltersPromise } from "../../mocks/promises"
13+
import { mockVulnerabilitiesPromise } from "../../mocks/promises"
1414

1515
const mockFilters: Filter[] = [
1616
{

apps/heureka/src/components/Vulnerabilities/VulnerabilitiesList/VulnerabilityDetailsPanel/VulnerabilityServicesTotalCount.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import React, { use } from "react"
6+
import { use } from "react"
77
import { Vulnerability } from "../../utils"
88
import { ApolloQueryResult } from "@apollo/client"
99
import { GetVulnerabilitiesQuery } from "../../../../generated/graphql"

apps/heureka/src/components/Vulnerabilities/VulnerabilitiesList/VulnerabilityDetailsPanel/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const VulnerabilityPanel = () => {
2323
const navigate = useNavigate()
2424
const { queryClient, apiClient } = useRouteContext({ from: "/vulnerabilities/" })
2525
const { vulnerability } = useSearch({ from: "/vulnerabilities/" })
26-
const [currentServicesCursor, setCurrentServicesCursor] = useState<string | null | undefined>(undefined)
26+
const [currentServicesCursor] = useState<string | null | undefined>(undefined)
2727

2828
// Create a stable promise for vulnerability details (including support groups)
2929
// This promise doesn't change when pagination happens
@@ -70,7 +70,8 @@ export const VulnerabilityPanel = () => {
7070
navigate({
7171
to: "/vulnerabilities",
7272
search: (prev) => {
73-
const { vulnerability, ...rest } = prev
73+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
74+
const { vulnerability, ...rest } = prev // we're omitting 'vulnerability' from the deps so route does not reload when it changes
7475
return { ...rest }
7576
},
7677
})

apps/heureka/src/components/common/Filters/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import React, { useCallback, useEffect } from "react"
6+
import React, { useCallback } from "react"
77
import { Button, InputGroup, SearchInput, Stack } from "@cloudoperators/juno-ui-components"
88
import { FilterSelect } from "./FilterSelect"
99
import { Filter, FilterSettings, SelectedFilter } from "./types"

apps/heureka/src/components/common/Navigation.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import React, { ReactNode, useRef } from "react"
6+
import React, { useRef } from "react"
77
import { TopNavigation, TopNavigationItem } from "@cloudoperators/juno-ui-components"
88
import { useNavigate, useLocation } from "@tanstack/react-router"
99

@@ -13,11 +13,6 @@ type NavigationItemType = {
1313
path: string
1414
}
1515

16-
type NavigationPropsType = {
17-
activeItem?: ReactNode
18-
onChange?: (value: ReactNode) => void
19-
}
20-
2116
const navigationItems: NavigationItemType[] = [
2217
{
2318
label: "Services",
@@ -31,7 +26,7 @@ const navigationItems: NavigationItemType[] = [
3126
},
3227
]
3328

34-
export const Navigation = ({ activeItem }: NavigationPropsType) => {
29+
export const Navigation = () => {
3530
const navigate = useNavigate()
3631
const location = useLocation()
3732
const isVulnerabilitiesActive = location.pathname.toLowerCase().includes("vulnerabilities")

apps/heureka/src/components/common/SeverityCount.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
TooltipContent,
1212
KnownIcons,
1313
BadgeVariantType,
14-
Icon,
1514
} from "@cloudoperators/juno-ui-components"
1615

1716
type SeverityCountProps = {

apps/heureka/src/routes/services/$service.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import { createFileRoute } from "@tanstack/react-router"
77
import { z } from "zod"
88
import { Service } from "../../components/Service"
9-
import { LoaderWithCrumb } from "../-types"
109
import { fetchService } from "../../api/fetchService"
1110

1211
const serviceSearchSchema = z.object({
@@ -17,7 +16,8 @@ export const Route = createFileRoute("/services/$service")({
1716
validateSearch: serviceSearchSchema,
1817
shouldReload: false,
1918
loaderDeps: ({ search }) => {
20-
const { imageVersion, ...rest } = search
19+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
20+
const { imageVersion, ...rest } = search // we're omitting 'imageVersion' from the deps so route does not reload when it changes
2121
return { ...rest }
2222
},
2323
loader: ({ context, params: { service } }) => {

apps/heureka/src/routes/services/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export type ServicesSearchParams = z.infer<typeof servicesSearchSchema>
3939
export const Route = createFileRoute("/services/")({
4040
validateSearch: servicesSearchSchema,
4141
loaderDeps: ({ search }) => {
42-
const { service, ...rest } = search
42+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
43+
const { service, ...rest } = search // we're omitting 'service' from the deps so route does not reload when it changes
4344
return rest
4445
},
4546
shouldReload: false, // Only reload the route when the user navigates to it or when deps change

0 commit comments

Comments
 (0)