-
-
Notifications
You must be signed in to change notification settings - Fork 205
Closed
Description
Currently, all the APIs are not exposed, so that it can't be reused by other linter-plugin, e.g. tslint-plugin-prettier (currently just copy-paste implementations from this repo).
It'd be better to expose report-related APIs in another package (since this repo has peerDeps for eslint), so that it can be reused in different linter plugin to have consistent behavior.
Suggested API
export declare function showInvisibles(str: string): string;
export declare function reportDifferences(source: string, formatted: string, reporters: Reporters);
export interface Reporters {
reportInsert: (offset: number, text: string, message: string) => void;
reportDelete: (offset: number, text: string, message: string) => void;
reportReplace: (offset: number, deleteText: string, insertText: string, message: string) => void;
}
Metadata
Metadata
Assignees
Labels
No labels