Format docs with Prettier 1.13
This commit is contained in:
1 parent
1a4dda73a9
commit
412b064df8
25 files changed
+817
-818
No files matched your search
+7
-7
@@ -35,8 +35,8 @@ prettier.formatWithCursor(" 1", { cursorOffset: 2 });
|
||||
|
||||
`resolveConfig` can be used to resolve configuration for a given source file, passing its path as the first argument. The config search will start at the file path and continue to search up the directory (you can use `process.cwd()` to start searching from the current directory). Or you can pass directly the path of the config file as `options.config` if you don't wish to search for it. A promise is returned which will resolve to:
|
||||
|
||||
* An options object, providing a [config file](configuration.md) was found.
|
||||
* `null`, if no file was found.
|
||||
- An options object, providing a [config file](configuration.md) was found.
|
||||
- `null`, if no file was found.
|
||||
|
||||
The promise will be rejected if there was an error parsing the configuration file.
|
||||
|
||||
@@ -51,9 +51,9 @@ prettier.resolveConfig(filePath).then(options => {
|
||||
|
||||
If `options.editorconfig` is `true` and an [`.editorconfig` file](http://editorconfig.org/) is in your project, Prettier will parse it and convert its properties to the corresponding prettier configuration. This configuration will be overridden by `.prettierrc`, etc. Currently, the following EditorConfig properties are supported:
|
||||
|
||||
* `indent_style`
|
||||
* `indent_size`/`tab_width`
|
||||
* `max_line_length`
|
||||
- `indent_style`
|
||||
- `indent_size`/`tab_width`
|
||||
- `max_line_length`
|
||||
|
||||
Use `prettier.resolveConfig.sync(filePath [, options])` if you'd like to use sync version.
|
||||
|
||||
@@ -61,8 +61,8 @@ Use `prettier.resolveConfig.sync(filePath [, options])` if you'd like to use syn
|
||||
|
||||
`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:
|
||||
|
||||
* The path of the configuration file.
|
||||
* `null`, if no file was found.
|
||||
- The path of the configuration file.
|
||||
- `null`, if no file was found.
|
||||
|
||||
The promise will be rejected if there was an error parsing the configuration file.
|
||||
|
||||
|
||||
Reference in new issue
Block a user