@ts-common/azure-js-dev-tools
Version:
Developer dependencies for TypeScript related projects
47 lines • 1.88 kB
TypeScript
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
import { Logger } from "@azure/logger-js";
import { AdditionalCheck } from "./checkEverything";
export interface CheckForSkipCallsOptions {
/**
* A *.skip(...) call by default is an error. Setting this to true will make it a warning.
*/
skipIsWarning?: boolean;
/**
* The paths to start looking for source files in.
*/
startPaths?: string | string[];
/**
* The Logger to use. If no Logger is specified, then a default Logger will be used instead.
*/
logger?: Logger;
/**
* The files and line numbers where skip calls are allowed. The keys of the object should be the
* path to the file relative to the start path and without the file extension.
*/
allowedSkips?: {
[fileRelativePathWithoutFileExtension: string]: number[] | "all";
};
/**
* Whether or not allowed skips will be reported. Defaults to false.
*/
reportAllowedSkips?: boolean;
}
export interface SkipLine {
lineNumber: number;
text: string;
allowed: boolean;
}
export declare function checkForSkipCalls(options?: CheckForSkipCallsOptions): AdditionalCheck;
/**
* Check the source files found under the provided startPaths for only() function calls. Returns the
* number of source files found that reference the only() function.
* @param startPaths The paths to start looking for source files in.
* @param logger The logger to use. If no logger is specified, then a console logger will be used.
* @returns The number of source files found that contain only() function calls.
*/
export declare function checkForSkipCallsCheck(options?: CheckForSkipCallsOptions): Promise<number>;
//# sourceMappingURL=checkForSkipCalls.d.ts.map