docs(readme): fix description for filePath in prettier.resolveConfig (#3007)

This commit is contained in:
Ika authored and Lucas Azzola committed 2017-10-11 15:57:57 +11:00
1 parent c247026346
commit abc3b12c5e
1 file changed
+3 -3
+3 -3
View File
@@ -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()`