formatSourceFromFile(
text
,fileName
,config
,options
?):Promise
<undefined
|string
>
Format given source text from a file, asynchronously.
This function will try to find tsconfig.json and ESLint config relating to the source file, and merge them to the base config provided.
options
can be used to change tsconfig.json and ESLint config loading behavior for testing
purpose.
string
Source text
string
Source file name
Base config
FormatOptions
Internal/testing options
Promise
<undefined
| string
>
Promise of the result text or undefined
if nothing changes.