This commit is contained in:
parent
8854104f75
commit
971a87fcd8
|
@ -1440,6 +1440,30 @@ End output with newline (Supported by JS Beautify)
|
|||
}
|
||||
```
|
||||
|
||||
#### [JavaScript - End with comma](#javascript---end-with-comma)
|
||||
|
||||
**Namespace**: `js`
|
||||
|
||||
**Key**: `end_with_comma`
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by JS Beautify, Pretty Diff)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
```json
|
||||
{
|
||||
"js": {
|
||||
"end_with_comma": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### [Objective-C - Config Path](#objective-c---config-path)
|
||||
|
||||
**Namespace**: `objectivec`
|
||||
|
@ -5386,6 +5410,30 @@ End output with newline (Supported by JS Beautify)
|
|||
}
|
||||
```
|
||||
|
||||
#### [JavaScript - End with comma](#javascript---end-with-comma)
|
||||
|
||||
**Namespace**: `js`
|
||||
|
||||
**Key**: `end_with_comma`
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by JS Beautify, Pretty Diff)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
```json
|
||||
{
|
||||
"js": {
|
||||
"end_with_comma": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Pretty Diff
|
||||
|
||||
|
@ -5869,6 +5917,30 @@ Wrap lines at next opportunity after N characters (Supported by JS Beautify, Pre
|
|||
}
|
||||
```
|
||||
|
||||
#### [JavaScript - End with comma](#javascript---end-with-comma)
|
||||
|
||||
**Namespace**: `js`
|
||||
|
||||
**Key**: `end_with_comma`
|
||||
|
||||
**Type**: `boolean`
|
||||
|
||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
||||
|
||||
**Description**:
|
||||
|
||||
If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by JS Beautify, Pretty Diff)
|
||||
|
||||
**Example `.jsbeautifyrc` Configuration**
|
||||
|
||||
```json
|
||||
{
|
||||
"js": {
|
||||
"end_with_comma": false
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Gherkin formatter
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ module.exports = class PrettyDiff extends Beautifier
|
|||
wrap: "wrap_line_length"
|
||||
space: "space_after_anon_function"
|
||||
noleadzero: "no_lead_zero"
|
||||
endcomma: "end_with_comma"
|
||||
# Apply language-specific options
|
||||
CSV: true
|
||||
ERB: true
|
||||
|
|
|
@ -106,5 +106,10 @@ module.exports = {
|
|||
type: 'boolean'
|
||||
default: false
|
||||
description: "End output with newline"
|
||||
end_with_comma:
|
||||
type: 'boolean'
|
||||
default: false
|
||||
description: "If a terminating comma should be inserted into \
|
||||
arrays, object literals, and destructured objects."
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue