tslint-to-eslint-config
Version:
Converts your TSLint configuration to the closest reasonable ESLint equivalent.
26 lines (25 loc) • 891 B
TypeScript
export type ConvertFileCommentsStandaloneDependencies = {
/**
* Original content of the source file.
*/
fileContent: string;
/**
* Absolute or relative path to the file.
*
* @remarks
* The file extension here is important, as parsing *.ts is different from *.tsx.
*/
filePath: string;
/**
* Optional cache of comment conversions, for performance across multiple file conversions.
*/
ruleCommentsCache?: Map<string, string[]>;
/**
* Known rule equivalents as converted by a previous configuration.
*/
ruleEquivalents?: Map<string, string[]>;
};
/**
* Replaces TSLint disable comments in source code with their ESLint equivalent.
*/
export declare const convertFileCommentsStandalone: ({ fileContent, filePath, ruleCommentsCache, ruleEquivalents, }: ConvertFileCommentsStandaloneDependencies) => string;