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)
|
#### [Objective-C - Config Path](#objective-c---config-path)
|
||||||
|
|
||||||
**Namespace**: `objectivec`
|
**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
|
### 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
|
### Gherkin formatter
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@ module.exports = class PrettyDiff extends Beautifier
|
||||||
wrap: "wrap_line_length"
|
wrap: "wrap_line_length"
|
||||||
space: "space_after_anon_function"
|
space: "space_after_anon_function"
|
||||||
noleadzero: "no_lead_zero"
|
noleadzero: "no_lead_zero"
|
||||||
|
endcomma: "end_with_comma"
|
||||||
# Apply language-specific options
|
# Apply language-specific options
|
||||||
CSV: true
|
CSV: true
|
||||||
ERB: true
|
ERB: true
|
||||||
|
|
|
@ -106,5 +106,10 @@ module.exports = {
|
||||||
type: 'boolean'
|
type: 'boolean'
|
||||||
default: false
|
default: false
|
||||||
description: "End output with newline"
|
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