Fix incorrect options documentation in README (#1564)
* Fix incorrect options documentation in README The options section in the README (which appears to be the primary source of truth for documentation) had incorrectly conflated the bracketSpacing and jsxBracketSameLine options into a single table row (using the human readable name for one, the machine readable names for another, and combined descriptions of both). This patch splits the row into two accurate ones. * Revise previous correction to options documention in README Incorporating feedback in #1564master
parent
c56a685e5d
commit
93472d0998
|
@ -247,11 +247,12 @@ Prettier ships with a handful of customizable format options, usable in both the
|
|||
| Option | Default | CLI override | API override |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **Tabs** - Indent lines with tabs instead of spaces. | `false` | `--use-tabs` | `useTabs: <bool>` |
|
||||
| **Print Width** - Specify the length of line that the printer will wrap on. | `80` | `--print-width <int>` | `printWidth: <int>`
|
||||
| **Print Width** - Specify the length of line that the printer will wrap on. | `80` | `--print-width <int>` | `printWidth: <int>`
|
||||
| **Tab Width** - Specify the number of spaces per indentation-level. | `2` | `--tab-width <int>` | `tabWidth: <int>` |
|
||||
| **Quotes** - Use single quotes instead of double quotes. | `false` | `--single-quote` | `singleQuote: <bool>` |
|
||||
| **Trailing Commas** - Print trailing commas wherever possible. <br /><br /> Valid options: <br /> - `"none"` - no trailing commas <br /> - `"es5"` - trailing commas where valid in ES5 (objects, arrays, etc) <br /> - `"all"` - trailing commas wherever possible (function arguments) | `"none"` | <code>--trailing-comma <none|es5|all></code> | <code>trailingComma: "<none|es5|all>"</code> |
|
||||
| **Bracket Spacing** - Do not print spaces between brackets. <br /><br /> If true, puts the `>` of a multi-line jsx element at the end of the last line instead of being alone on the next line | `false` | `--jsx-bracket-same-line` | `jsxBracketSameLine: <bool>` |
|
||||
| **Quotes** - Use single quotes instead of double quotes. | `false` | `--single-quote` | `singleQuote: <bool>` |
|
||||
| **Trailing Commas** - Print trailing commas wherever possible. <br /><br /> Valid options: <br /> - `"none"` - no trailing commas <br /> - `"es5"` - trailing commas where valid in ES5 (objects, arrays, etc) <br /> - `"all"` - trailing commas wherever possible (function arguments) | `"none"` | <code>--trailing-comma <none|es5|all></code> | <code>trailingComma: "<none|es5|all>"</code> |
|
||||
| **Bracket Spacing** - Do not print spaces between brackets in object literals. | `true` | `--no-bracket-spacing` | `bracketSpacing: <bool>` |
|
||||
| **JSX Brackets on Same Line** - Put the `>` of a multi-line JSX element at the end of the last line instead of being alone on the next line | `false` | `--jsx-bracket-same-line` | `jsxBracketSameLine: <bool>` |
|
||||
| **Parser** - Specify which parse to use. | `babylon` | <code>--parser <flow|babylon></code> | <code>parser: "<flow|babylon>"</code> |
|
||||
| **Semicolons** - Do not print semicolons, except at the beginning of lines which may need them. <br /><br />Valid options:<br /> - `true` - add a semicolon at the end of every line <br />- `false` - only add semicolons at the beginning of lines that may introduce ASI failures | `true` | `--no-semi` | `semi: <bool>` |
|
||||
|
||||
|
|
Loading…
Reference in New Issue