Skip to main content

prettier

Internal library for prettifying files using prettier.

prettify()

function prettify(content, parser): Promise<string | undefined>;

Defined in: prettier.ts:25

Internal

Prettify a string using

Parameters

content

string

the string to be prettified.

parser

string

the prettier parser to use.

Returns

Promise<string | undefined>

a prettified string, or undefined if an error occurred.

See

Remarks

This function logs a warning message on error.


prettifyMarkdown()

function prettifyMarkdown(content): Promise<string | undefined>;

Defined in: prettier.ts:67

Internal

Prettify a Markdown string using prettify and markdown parser.

Parameters

content

string

the string to be prettified.

Returns

Promise<string | undefined>

a prettified string, or undefined if an error occurred.

Remarks

Same as prettify(content, "mdx").

See

prettify