Skip to content

[F] collectLinterDisables

function collectLinterDisables(source): DiagnosticResult<
| readonly LinterDisable[]
| undefined>;

Collect local linter.disable entries without loading or compiling a project.

Reads only the relevant configuration structure; unrelated settings are not validated. Does not follow extends, read rulesets, or interpret enable: false. Same-file YAML aliases are supported, with locations at the original rule keys.

ParameterTypeDescription
sourcestring | SourceFileConfiguration text or a source file retaining its path.

DiagnosticResult< | readonly LinterDisable[] | undefined>

Entries in source order and diagnostics. On error, the entries are undefined; missing or empty optional sections produce an empty list.