Optional tsConfigFilePath: stringOptional condition: CustomFileConditionOptional message: stringOptional filters: Filter[]Optional isNegated: booleanOptional Readonly tsOptional Readonly conditionOptional Readonly messageOptional Readonly filtersOptional Readonly isExecutes the custom file condition check.
For each file matching the preconditions, the custom condition function is called with a FileInfo object. If the function returns false for any file, a violation is generated with the specified message.
Optional options: CheckOptionsOptional check options including allowEmptyTests and logging
Promise<Violation[]> Array of violations where custom condition failed
Custom condition for checking files using user-defined logic. This class allows for highly flexible architectural rules that can't be expressed through the standard API methods. Users can define custom functions that receive file information and return boolean results.
The custom condition function receives a FileInfo object containing details about each file including path, content, exports, imports, etc.
Example