1 parent
854bb3ccc5
commit
cd9ad2c57c
2 files changed
+4
-3
No files matched your search
@@ -549,12 +549,13 @@ Default | CLI Override | API Override
|
|||||||
`false` | `--single-quote` | `singleQuote: <bool>`
|
`false` | `--single-quote` | `singleQuote: <bool>`
|
||||||
|
|
||||||
### Trailing Commas
|
### Trailing Commas
|
||||||
Print trailing commas wherever possible.
|
Print trailing commas wherever possible when multi-line. (A single-line array,
|
||||||
|
for example, never gets trailing commas.)
|
||||||
|
|
||||||
Valid options:
|
Valid options:
|
||||||
* `"none"` - No trailing commas.
|
* `"none"` - No trailing commas.
|
||||||
* `"es5"` - Trailing commas where valid in ES5 (objects, arrays, etc.)
|
* `"es5"` - Trailing commas where valid in ES5 (objects, arrays, etc.)
|
||||||
* `"all"` - Trailing commas wherever possible (function arguments). This requires node 8 or a [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/).
|
* `"all"` - Trailing commas wherever possible (including function arguments). This requires node 8 or a [transform](https://babeljs.io/docs/plugins/syntax-trailing-function-commas/).
|
||||||
|
|
||||||
Default | CLI Override | API Override
|
Default | CLI Override | API Override
|
||||||
--------|--------------|-------------
|
--------|--------------|-------------
|
||||||
|
|||||||
+1
-1
@@ -305,7 +305,7 @@ if (
|
|||||||
" --no-bracket-spacing Do not print spaces between brackets.\n" +
|
" --no-bracket-spacing Do not print spaces between brackets.\n" +
|
||||||
" --jsx-bracket-same-line Put > on the last line instead of at a new line.\n" +
|
" --jsx-bracket-same-line Put > on the last line instead of at a new line.\n" +
|
||||||
" --trailing-comma <none|es5|all>\n" +
|
" --trailing-comma <none|es5|all>\n" +
|
||||||
" Print trailing commas wherever possible. Defaults to none.\n" +
|
" Print trailing commas wherever possible when multi-line. Defaults to none.\n" +
|
||||||
" --parser <flow|babylon|typescript|postcss|json|graphql>\n" +
|
" --parser <flow|babylon|typescript|postcss|json|graphql>\n" +
|
||||||
" Specify which parse to use. Defaults to babylon.\n" +
|
" Specify which parse to use. Defaults to babylon.\n" +
|
||||||
" --cursor-offset <int> Print (to stderr) where a cursor at the given position would move to after formatting.\n" +
|
" --cursor-offset <int> Print (to stderr) where a cursor at the given position would move to after formatting.\n" +
|
||||||
|
|||||||
Reference in new issue
Block a user