Skip to content

Commit bf68797

Browse files
committed
update docs
1 parent 24dfacc commit bf68797

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/api.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@ If `options.editorconfig` is `true` and an [`.editorconfig` file](http://editorc
5757

5858
Use `prettier.resolveConfig.sync(filePath [, options])` if you'd like to use sync version.
5959

60+
## `prettier.resolveConfigFile(filePath [, options])`
61+
62+
`resolveConfigFile` can be used to find the path of the Prettier's configuration file will be used when resolving the config (i.e. when calling `resolveConfig`). A promise is returned which will resolve to:
63+
64+
* The path of the configuration file.
65+
* `null`, if no file was found.
66+
67+
The promise will be rejected if there was an error parsing the configuration file.
68+
69+
If `options.useCache` is `false`, all caching will be bypassed.
70+
6071
## `prettier.clearConfigCache()`
6172

6273
As you repeatedly call `resolveConfig`, the file system structure will be cached for performance. This function will clear the cache. Generally this is only needed for editor integrations that know that the file system has changed since the last format took place.

0 commit comments

Comments
 (0)