Skip to content

formatOverExposureFindings

Formats over-exposure findings as a human-readable report, using the grouped layout of ESLint’s stylish formatter. Findings are grouped by file and sorted by line: each file is rendered as a path header line, followed by one indented line:column change -- reason row per finding (the line:column is right-padded so the rows align within a file). Terminals such as VS Code render each indented line:column as a clickable link — resolved against the file header above it — that jumps straight to the declaration. File groups are separated by a blank line. In a fix run (findings carrying OverExposureFinding.wasFixed / OverExposureFinding.skipReason) each change row is suffixed with [fixed] or [skipped: …], and the trailing summary appends the fixed/skipped counts.

Import:

import { formatOverExposureFindings } from 'obsidian-dev-utils/script-utils/linters/over-exposure';

Signature:

function formatOverExposureFindings(findings: readonly OverExposureFinding[], options: FormatOverExposureFindingsOptions | undefined): string

Parameters:

ParameterTypeDescription
findingsreadonly OverExposureFinding[]The findings to format.
optionsFormatOverExposureFindingsOptions | undefinedThe FormatOverExposureFindingsOptions.

Returns: string — The report text. Empty-finding input yields a single “no findings” line.


Links to this page: