38 lines
1008 B
TypeScript
38 lines
1008 B
TypeScript
/// <reference types="node" />
|
|
export interface PluginOptions {
|
|
configuration?: any;
|
|
fix?: boolean;
|
|
formatter?: string | Function;
|
|
formattersDirectory?: string;
|
|
rulesDirectory?: string;
|
|
tslint?: any;
|
|
program?: any;
|
|
}
|
|
export interface ReportOptions {
|
|
emitError?: boolean;
|
|
reportLimit?: number;
|
|
summarizeFailureOutput?: boolean;
|
|
allowWarnings?: boolean;
|
|
}
|
|
export interface TslintFile {
|
|
tslint: any;
|
|
path: string;
|
|
relative: string;
|
|
contents: Buffer | any;
|
|
isStream(): boolean;
|
|
isNull(): boolean;
|
|
}
|
|
export interface TslintPlugin {
|
|
(pluginOptions?: PluginOptions): NodeJS.ReadWriteStream;
|
|
report: (options?: ReportOptions) => NodeJS.ReadWriteStream;
|
|
pluginOptions: PluginOptions;
|
|
}
|
|
/**
|
|
* Main plugin function
|
|
* @param {PluginOptions} [pluginOptions] contains the options for gulp-tslint.
|
|
* Optional.
|
|
* @returns {any}
|
|
*/
|
|
declare const tslintPlugin: TslintPlugin;
|
|
export default tslintPlugin;
|