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

master
Ika 2017-10-10 23:57:57 -05:00 committed by Lucas Azzola
parent c247026346
commit abc3b12c5e
1 changed files with 3 additions and 3 deletions

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()`