Filter issues with the issue option
mainThe issue option allows you to include or exclude specific issues based on their properties (severity, code, or file) or via a predicate function.
An Issue object contains:
severity:'error'|'warning'code:stringfile:string(supports glob matching)
You can provide an IssueMatch (partial object), an IssuePredicate (function), or an array of both to the include or exclude keys.
interface Issue {
severity: 'error' | 'warning';
code: string;
file?: string;
}
type IssueMatch = Partial<Issue>; // file field supports glob matching
type IssuePredicate = (issue: Issue) => boolean;
type IssueFilter = IssueMatch | IssuePredicate | (IssueMatch | IssuePredicate)[];