adds javascript comma first option to documentation
See my other pull request; js-beautify has an option for comma first formatting; so I added it to the readme and also here so people know about it :-)
This commit is contained in:
parent
41d5051b39
commit
daa3ba4c93
|
@ -2854,6 +2854,45 @@ Break chained method calls across subsequent lines (Supported by JS Beautify, Pr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
##### [Comma First](#comma-first)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `comma_first`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Allow comma first formatting (Supported by JS Beautify, Pretty Diff)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"comma_first": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
// will transform this:
|
||||||
|
const obj = {
|
||||||
|
foo: 1,
|
||||||
|
bar: 2
|
||||||
|
}
|
||||||
|
|
||||||
|
// into this:
|
||||||
|
const obj = {
|
||||||
|
foo: 1
|
||||||
|
, bar: 2
|
||||||
|
}
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
##### [Content unformatted](#content-unformatted)
|
##### [Content unformatted](#content-unformatted)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue