From abc3b12c5e152d9654728e534fe288c7cf31c5d4 Mon Sep 17 00:00:00 2001 From: Ika Date: Tue, 10 Oct 2017 23:57:57 -0500 Subject: [PATCH] docs(readme): fix description for `filePath` in `prettier.resolveConfig` (#3007) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6eeee3b3..00c1d422 100644 --- a/README.md +++ b/README.md @@ -468,10 +468,10 @@ prettier.formatWithCursor(" 1", { cursorOffset: 2 }); // -> { formatted: '1;\n', cursorOffset: 1 } ``` -#### `prettier.resolveConfig([filePath [, options]])` +#### `prettier.resolveConfig(filePath [, options])` `resolveConfig` can be used to resolve configuration for a given source file. -The function optionally accepts an input file path as an argument, which defaults to the current working directory. +The function requires an input file path as an argument, you might want to pass `process.cwd()` for searching from the current working directory. A promise is returned which will resolve to: * An options object, providing a [config file](#configuration-file) was found. * `null`, if no file was found. @@ -487,7 +487,7 @@ prettier.resolveConfig(filePath).then(options => { }) ``` -Use `prettier.resolveConfig.sync([filePath [, options]])` if you'd like to use sync version. +Use `prettier.resolveConfig.sync(filePath [, options])` if you'd like to use sync version. #### `prettier.clearConfigCache()`