prettier
Internal library for prettifying files using prettier
.
prettify()β
function prettify(content, parser): Promise<undefined | string>
Prettify a string using prettier.format.
Parametersβ
contentβ
string
the string to be prettified.
parserβ
string
the prettier
parser to use.
Returnsβ
Promise
<undefined
| string
>
a prettified string, or undefined if an error occurred.
Remarksβ
This function logs a warning message on error.
Seeβ
https://prettier.io/docs/en/options#parser for the list of parsers.
Defined inβ
prettier.ts:29
prettifyMarkdown()β
function prettifyMarkdown(content): Promise<undefined | string>
Prettify a Markdown string using prettify and markdown
parser.
Parametersβ
contentβ
string
the string to be prettified.
Returnsβ
Promise
<undefined
| string
>
a prettified string, or undefined if an error occurred.
Remarksβ
Same as prettify(content, "markdown")
.
Seeβ
Defined inβ
prettier.ts:61