Interface FilePathFilterOptions

interface FilePathFilterOptions {
    exclude?: FilterPattern;
    extensions?: string[];
    globMatcher?: (
        pathId: string,
        ruleIdNormalized: string,
        ruleId: string,
    ) => boolean;
    include?: FilterPattern;
    resolve?: null | string | false;
}

Properties

exclude?: FilterPattern

A pattern, or array of patterns, which specify the files should ignore.

extensions?: string[]
globMatcher?: (
    pathId: string,
    ruleIdNormalized: string,
    ruleId: string,
) => boolean

custom glob matcher. For example:

import picomatch from 'picomatch';

const globMatcher = (pathId, ruleIdNormalized, _ruleId) => {
return picomatch(ruleIdNormalized, { dot: true })(pathId);
};
import { isMatch } from 'micromatch';

const globMatcher = (pathId, ruleIdNormalized, _ruleId) => {
return isMatch(pathId, ruleIdNormalized, { dot: true });
};
include?: FilterPattern

A pattern, or array of patterns, which specify the files should operate on.

resolve?: null | string | false

resolve with base path for options.include and options.exclude