UNPKG

eslint-plugin-complete

Version:

An ESLint plugin that contains useful rules.

18 lines 1.06 kB
/** * Feed this function a string that contains one or more lines of text. It will combine all of the * lines and return a string with lines that do not exceed the maximum line length. * * For obvious reasons, this function works best on text that is composed of complete sentences. * Otherwise, it would incorrectly combine together two disparate sentences. * * This function tries to be as smart as possible in that it will not merge specific kinds of lines, * like bullet points, "eslint-disable" comments, and so on. * * @param text One or more lines of text, separated by newlines. * @param maxLength The ruler cutoff for the formatted text. * @param shouldParseJSDocTags Whether to make formatting decisions based on the presence of JSDoc * tags. True by default. Pass false if working with leading line * comments or other non-JSDoc text. */ export declare function formatText(text: string, maxLength: number, shouldParseJSDocTags?: boolean): string; //# sourceMappingURL=format.d.ts.map