textlint
Version:
The pluggable linting tool for natural language.
44 lines • 1.11 kB
TypeScript
import { AbstractBacker } from "./abstruct-backer.js";
import { TextlintResult } from "@textlint/kernel";
export type CacheBackerOptions = {
/**
* enable cache
*/
cache: boolean;
/**
* path to cache file
*/
cacheLocation: string;
/**
* Config hash value
*/
hash: string;
/**
* Cache strategy for detecting changed files.
* - "metadata": use file mtime and size (fast, not CI-safe)
* - "content": use file content hash (accurate, CI-safe)
*/
cacheStrategy: "metadata" | "content";
};
export declare class CacheBacker implements AbstractBacker {
private config;
private fileCache;
private isEnabled;
constructor(config: CacheBackerOptions);
/**
* @param {string} filePath
* @returns {boolean}
*/
shouldExecute({ filePath }: {
filePath: string;
}): boolean;
didExecute<R extends TextlintResult>({ result }: {
result: R;
}): void;
/**
* destroy all cache
*/
destroyCache(): void;
afterAll(): void;
}
//# sourceMappingURL=cache-backer.d.ts.map