Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds javascript comma first option to documentation #2570

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions docs/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down