From 7b6d3d95afefe4120a50062c49ba17a4a1634b34 Mon Sep 17 00:00:00 2001 From: Christopher Chiche Date: Mon, 11 Sep 2023 16:59:21 +0200 Subject: [PATCH] fix lint --- reports/src/App.tsx | 2 -- reports/src/ThemeContext.tsx | 19 ------------------- reports/src/capability/CapabilityTable.tsx | 2 +- reports/src/capability/reportNavigation.tsx | 2 +- reports/src/capability/useReport.tsx | 3 +-- 5 files changed, 3 insertions(+), 25 deletions(-) diff --git a/reports/src/App.tsx b/reports/src/App.tsx index d015cc8..a904da3 100644 --- a/reports/src/App.tsx +++ b/reports/src/App.tsx @@ -3,8 +3,6 @@ import { useReport } from "./capability/useReport"; import { CustomThemeProvider } from "./ThemeContext"; function App() { - // FIXME use the report from the config - // eslint-disable-next-line @typescript-eslint/no-explicit-any const configuration = JSON.parse( document.getElementById("interuss_report_json")?.innerHTML || "{}" ); diff --git a/reports/src/ThemeContext.tsx b/reports/src/ThemeContext.tsx index ac16ba7..b48e7c9 100644 --- a/reports/src/ThemeContext.tsx +++ b/reports/src/ThemeContext.tsx @@ -60,10 +60,6 @@ export const CustomThemeProvider = ({ ); const globalStyles: Interpolation = (theme) => { - const borderColor = - theme.palette.mode === "light" - ? theme.palette.grey[500] - : theme.palette.grey[700]; return { body: { backgroundColor: @@ -71,21 +67,6 @@ export const CustomThemeProvider = ({ ? theme.palette.grey[100] : theme.palette.grey[900], }, - // table: { - // borderCollapse: "collapse", - // border: `1px solid ${borderColor}`, - // }, - // th: { - // border: `1px solid ${borderColor}`, - // backgroundColor: - // theme.palette.mode === "light" - // ? theme.palette.grey[300] - // : theme.palette.grey[800], - // }, - // td: { - // border: `1px solid ${borderColor}`, - // padding: 8, - // }, }; }; diff --git a/reports/src/capability/CapabilityTable.tsx b/reports/src/capability/CapabilityTable.tsx index 8f286ec..2a690c6 100644 --- a/reports/src/capability/CapabilityTable.tsx +++ b/reports/src/capability/CapabilityTable.tsx @@ -13,7 +13,7 @@ type CapabilityTableProps = { empty?: boolean; }; -type CrumbHandle = { crumb: () => ReactNode }; +type CrumbHandle = { crumb: (i?: number | string) => ReactNode }; function CapabilityBreadcrumbs({ capability }: { capability: Capability }) { const matches = useMatches(); diff --git a/reports/src/capability/reportNavigation.tsx b/reports/src/capability/reportNavigation.tsx index 0a0e1db..ce382e5 100644 --- a/reports/src/capability/reportNavigation.tsx +++ b/reports/src/capability/reportNavigation.tsx @@ -1,4 +1,4 @@ -import { Link, Typography } from "@mui/material"; +import { Link } from "@mui/material"; import { Link as RouterLink, RouteObject } from "react-router-dom"; import { Capability } from "./capabilityTypes"; import { CapabilityTable } from "./CapabilityTable"; diff --git a/reports/src/capability/useReport.tsx b/reports/src/capability/useReport.tsx index c8a28f0..fe11af8 100644 --- a/reports/src/capability/useReport.tsx +++ b/reports/src/capability/useReport.tsx @@ -2,8 +2,7 @@ import { useState, useEffect, useMemo } from "react"; import { ReportsReportTestRunReport } from "../types/TestRunReport"; import { RouteObject } from "react-router-dom"; import { parseReport } from "./reportParser"; -import { getNavFromCapability, getNavFromReport } from "./reportNavigation"; -import { parse } from "jsonpath"; +import { getNavFromCapability } from "./reportNavigation"; const reportUrl = "/report_uspace.json";