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:
andrewsuperlegit 2021-04-25 03:19:53 -05:00 committed by GitHub
parent 41d5051b39
commit daa3ba4c93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 39 additions and 0 deletions

View File

@ -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)