diff --git a/webui2/src/apollo-client.d.ts b/webui2/src/apollo-client.d.ts index 06ceeca075c1faee1a4e281e56a8973c69943798..fa2a050df6ca0aaf0be740200fb776d3c9181b84 100644 --- a/webui2/src/apollo-client.d.ts +++ b/webui2/src/apollo-client.d.ts @@ -1,3 +1,4 @@ +// oxlint-disable-next-line eslint-plugin-import(no-unassigned-import) -- declaration merging import "@apollo/client"; import type { GraphQLCodegenDataMasking } from "@apollo/client/masking"; diff --git a/webui2/src/components/bugs/label-editor.stories.tsx b/webui2/src/components/bugs/label-editor.stories.tsx index c44e6d3070d23b606480dbbbbff21576b09433d6..c7556b4d624f32200fc2d1fe603a890ecda0b01c 100644 --- a/webui2/src/components/bugs/label-editor.stories.tsx +++ b/webui2/src/components/bugs/label-editor.stories.tsx @@ -36,8 +36,6 @@ const allLabels = allLabelsData.map( (l) => ({ ...l, ...makeFragmentData(l, LABEL_FIELDS_FRAGMENT) }), ); -type LabelColor = { R: number; G: number; B: number }; -type BrandedLabel = (typeof allLabels)[number]; function LabelEditorDemo() { const [currentNames, setCurrentNames] = useState>( diff --git a/webui2/src/components/code/file-viewer.tsx b/webui2/src/components/code/file-viewer.tsx index 8ed067b55af6f43cc638c7ed2840ff9dec705ba9..b795142c8730a7093a60c30ff6a930f80fb7c557 100644 --- a/webui2/src/components/code/file-viewer.tsx +++ b/webui2/src/components/code/file-viewer.tsx @@ -201,10 +201,9 @@ export function FileViewer({ blob: blobProp }: FileViewerProps) { let lang = "text"; if (entry) { try { - const langModule = await entry.load(); - await highlighter.loadLanguage( - langModule as Parameters[0], - ); + // oxlint-disable-next-line typescript-eslint(no-unsafe-type-assertion) -- dynamic shiki language import + const langModule = (await entry.load()) as Parameters[0]; + await highlighter.loadLanguage(langModule); lang = entry.id; } catch { // Language not available — fall back to plain text @@ -220,9 +219,11 @@ export function FileViewer({ blob: blobProp }: FileViewerProps) { transformers: [lineNumberTransformer()], }); + // oxlint-disable-next-line typescript-eslint(no-unsafe-assignment) -- hast-util-to-jsx-runtime returns JSX.Element const node = toJsxRuntime(hast, { Fragment, jsx, jsxs }); const lineCount = blob.text!.split("\n").length; + // oxlint-disable-next-line typescript-eslint(no-unsafe-assignment) -- node is ReactNode from toJsxRuntime setHighlighted({ node, lineCount }); })(); @@ -297,8 +298,8 @@ function CodeBlock({ selectedRange, onLineClick, children }: CodeBlockProps) {
{ - const target = e.target as HTMLElement; - const lineEl = target.closest("[data-line-number]"); + if (!(e.target instanceof HTMLElement)) return; + const lineEl = e.target.closest("[data-line-number]"); if (lineEl) { e.preventDefault(); const lineNum = parseInt(lineEl.getAttribute("data-line-number")!, 10);