Skip to content

LintResults

Lint results as a filterable, groupable tree beside a detail pane, with optional ignore actions. Pure presentation: results, grouping, filters, selection and expand state all flow in through props, so the host can keep them in its URL. A linter that failed to run is shown under its name rather than dropped.

Source

import { LintResults } from "@flanksource/clicky-ui/data";
Linter Rule File · Open in Storybook
Linter File · Open in Storybook
File Linter Rule · Open in Storybook

The props table documents the component-specific surface. Standard DOM attributes inherited from React, such as className, event handlers, and accessibility attributes, may also be accepted when the component’s prop type extends a native element.

Prop Type Default Description
className string — —
defaultSplit number 45 Initial left-pane width percentage.
expandAll* boolean | null — Tri-state expand-all: true (all open), false (all closed), null (default).
filters* LintFilters — Tri-state severity and linter filters; the host owns them (typically in the URL).
grouping* enum — —
headerSlot ReactNode — Actions at the right end of the header bar (e.g. re-run, export).
ignoreBusy boolean — Disables the ignore buttons while the host applies an action.
loadSource LintSourceLoader — Loads a violation's file (work-dir-relative, as `onOpenFile` receives it) so each violation shows its flagged lines with context. Omit to show only the snippet the linter reported.
onExpandAllChange* (…) => void — —
onFiltersChange* (…) => void — —
onGroupingChange* (…) => void — —
onIgnore (…) => void | Promise<void> — Called with the chosen ignore action; `action.req` is the entry to add to `.gavel.yaml`. Omit to hide every ignore button.
onOpenFile (…) => void — Called with a violation's file, work dir and line when the reader asks to open it in the host's annotated file view. Omit to hide the "Open in Files" links.
onSelect* (…) => void — —
onViewChange (…) => void — Called by the Tree / Table toggle. Omit to hide the toggle.
renderRun RenderRun — Renders the prompt run behind a linter in its detail pane (see LintDetailPanelProps.renderRun).
results* readonly LinterResult[] — —
selected* string | null — The selected node's `route_path`, or null. Paths are stable across rebuilds, so they can live in a URL.
title ReactNode — Header title. Defaults to a "Lint Results" heading; pass `null` for none.
view enum tree "tree" (the default) shows the grouped tree beside a detail pane; "table" lists every violation as a row whose detail opens beneath it.