Fix up options for Prettier, add new bracket_spacing option
This commit is contained in:
parent
35f8c924ee
commit
cc56ba34b0
360
docs/options.md
360
docs/options.md
|
@ -1077,6 +1077,7 @@ Automatically beautify Clojure files on save
|
||||||
| `default_beautifier` | :white_check_mark: | :white_check_mark: |
|
| `default_beautifier` | :white_check_mark: | :white_check_mark: |
|
||||||
| `beautify_on_save` | :white_check_mark: | :white_check_mark: |
|
| `beautify_on_save` | :white_check_mark: | :white_check_mark: |
|
||||||
| `brace_style` | :white_check_mark: | :x: |
|
| `brace_style` | :white_check_mark: | :x: |
|
||||||
|
| `bracket_spacing` | :white_check_mark: | :x: |
|
||||||
| `break_chained_methods` | :white_check_mark: | :x: |
|
| `break_chained_methods` | :white_check_mark: | :x: |
|
||||||
| `end_of_line` | :white_check_mark: | :x: |
|
| `end_of_line` | :white_check_mark: | :x: |
|
||||||
| `end_with_comma` | :white_check_mark: | :x: |
|
| `end_with_comma` | :white_check_mark: | :x: |
|
||||||
|
@ -1184,6 +1185,30 @@ Automatically beautify CoffeeScript files on save
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`Coffee Formatter`](#coffee-formatter)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by Coffee Formatter)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
##### [Break chained methods](#break-chained-methods)
|
##### [Break chained methods](#break-chained-methods)
|
||||||
|
|
||||||
**Namespace**: `js`
|
**Namespace**: `js`
|
||||||
|
@ -2519,6 +2544,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
|
||||||
| `default_beautifier` | :white_check_mark: | :white_check_mark: |
|
| `default_beautifier` | :white_check_mark: | :white_check_mark: |
|
||||||
| `beautify_on_save` | :white_check_mark: | :white_check_mark: |
|
| `beautify_on_save` | :white_check_mark: | :white_check_mark: |
|
||||||
| `brace_style` | :white_check_mark: | :x: |
|
| `brace_style` | :white_check_mark: | :x: |
|
||||||
|
| `bracket_spacing` | :white_check_mark: | :x: |
|
||||||
| `break_chained_methods` | :white_check_mark: | :white_check_mark: |
|
| `break_chained_methods` | :white_check_mark: | :white_check_mark: |
|
||||||
| `end_of_line` | :white_check_mark: | :x: |
|
| `end_of_line` | :white_check_mark: | :x: |
|
||||||
| `end_with_comma` | :white_check_mark: | :white_check_mark: |
|
| `end_with_comma` | :white_check_mark: | :white_check_mark: |
|
||||||
|
@ -2632,6 +2658,30 @@ Automatically beautify EJS files on save
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by JS Beautify)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
##### [Break chained methods](#break-chained-methods)
|
##### [Break chained methods](#break-chained-methods)
|
||||||
|
|
||||||
**Namespace**: `js`
|
**Namespace**: `js`
|
||||||
|
@ -5518,6 +5568,7 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
|
||||||
| `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
| `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||||
| `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
| `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||||
| `brace_style` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
| `brace_style` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
||||||
|
| `bracket_spacing` | :x: | :white_check_mark: | :x: | :white_check_mark: | :x: |
|
||||||
| `break_chained_methods` | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
|
| `break_chained_methods` | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
|
||||||
| `end_of_line` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
| `end_of_line` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
||||||
| `end_with_comma` | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
|
| `end_with_comma` | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
|
||||||
|
@ -5525,8 +5576,8 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify)
|
||||||
| `eval_code` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
| `eval_code` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
||||||
| `indent_char` | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
|
| `indent_char` | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
|
||||||
| `indent_level` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
| `indent_level` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
||||||
| `indent_size` | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
|
| `indent_size` | :x: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: |
|
||||||
| `indent_with_tabs` | :x: | :white_check_mark: | :x: | :x: | :white_check_mark: |
|
| `indent_with_tabs` | :x: | :white_check_mark: | :x: | :white_check_mark: | :white_check_mark: |
|
||||||
| `jslint_happy` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
| `jslint_happy` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
||||||
| `keep_array_indentation` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
| `keep_array_indentation` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
||||||
| `keep_function_indentation` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
| `keep_function_indentation` | :x: | :white_check_mark: | :x: | :x: | :x: |
|
||||||
|
@ -5625,6 +5676,30 @@ Automatically beautify JavaScript files on save
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Prettier`](#prettier)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by JS Beautify, Prettier)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
##### [Break chained methods](#break-chained-methods)
|
##### [Break chained methods](#break-chained-methods)
|
||||||
|
|
||||||
**Namespace**: `js`
|
**Namespace**: `js`
|
||||||
|
@ -5809,11 +5884,11 @@ Initial indentation level (Supported by JS Beautify)
|
||||||
|
|
||||||
**Type**: `integer`
|
**Type**: `integer`
|
||||||
|
|
||||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Prettier`](#prettier) [`Pretty Diff`](#pretty-diff)
|
||||||
|
|
||||||
**Description**:
|
**Description**:
|
||||||
|
|
||||||
Indentation size/length (Supported by JS Beautify, Pretty Diff)
|
Indentation size/length (Supported by JS Beautify, Prettier, Pretty Diff)
|
||||||
|
|
||||||
**Example `.jsbeautifyrc` Configuration**
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
@ -5833,11 +5908,11 @@ Indentation size/length (Supported by JS Beautify, Pretty Diff)
|
||||||
|
|
||||||
**Type**: `boolean`
|
**Type**: `boolean`
|
||||||
|
|
||||||
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff)
|
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Prettier`](#prettier) [`Pretty Diff`](#pretty-diff)
|
||||||
|
|
||||||
**Description**:
|
**Description**:
|
||||||
|
|
||||||
Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Pretty Diff)
|
Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Prettier, Pretty Diff)
|
||||||
|
|
||||||
**Example `.jsbeautifyrc` Configuration**
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
@ -6105,6 +6180,7 @@ Wrap lines at next opportunity after N characters (Supported by JS Beautify, Pre
|
||||||
| `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
| `default_beautifier` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||||
| `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
| `beautify_on_save` | :white_check_mark: | :white_check_mark: | :white_check_mark: |
|
||||||
| `brace_style` | :white_check_mark: | :x: | :x: |
|
| `brace_style` | :white_check_mark: | :x: | :x: |
|
||||||
|
| `bracket_spacing` | :white_check_mark: | :x: | :x: |
|
||||||
| `break_chained_methods` | :white_check_mark: | :x: | :white_check_mark: |
|
| `break_chained_methods` | :white_check_mark: | :x: | :white_check_mark: |
|
||||||
| `end_of_line` | :white_check_mark: | :x: | :x: |
|
| `end_of_line` | :white_check_mark: | :x: | :x: |
|
||||||
| `end_with_comma` | :white_check_mark: | :x: | :white_check_mark: |
|
| `end_with_comma` | :white_check_mark: | :x: | :white_check_mark: |
|
||||||
|
@ -6212,6 +6288,30 @@ Automatically beautify JSON files on save
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by JS Beautify)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
##### [Break chained methods](#break-chained-methods)
|
##### [Break chained methods](#break-chained-methods)
|
||||||
|
|
||||||
**Namespace**: `js`
|
**Namespace**: `js`
|
||||||
|
@ -6692,6 +6792,7 @@ Wrap lines at next opportunity after N characters (Supported by JS Beautify, Pre
|
||||||
| `default_beautifier` | :white_check_mark: | :white_check_mark: |
|
| `default_beautifier` | :white_check_mark: | :white_check_mark: |
|
||||||
| `beautify_on_save` | :white_check_mark: | :white_check_mark: |
|
| `beautify_on_save` | :white_check_mark: | :white_check_mark: |
|
||||||
| `brace_style` | :white_check_mark: | :x: |
|
| `brace_style` | :white_check_mark: | :x: |
|
||||||
|
| `bracket_spacing` | :white_check_mark: | :x: |
|
||||||
| `break_chained_methods` | :white_check_mark: | :white_check_mark: |
|
| `break_chained_methods` | :white_check_mark: | :white_check_mark: |
|
||||||
| `e4x` | :white_check_mark: | :x: |
|
| `e4x` | :white_check_mark: | :x: |
|
||||||
| `end_of_line` | :white_check_mark: | :x: |
|
| `end_of_line` | :white_check_mark: | :x: |
|
||||||
|
@ -6800,6 +6901,30 @@ Automatically beautify JSX files on save
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by JS Beautify)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
##### [Break chained methods](#break-chained-methods)
|
##### [Break chained methods](#break-chained-methods)
|
||||||
|
|
||||||
**Namespace**: `js`
|
**Namespace**: `js`
|
||||||
|
@ -13003,6 +13128,7 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff)
|
||||||
| `default_beautifier` | :white_check_mark: |
|
| `default_beautifier` | :white_check_mark: |
|
||||||
| `beautify_on_save` | :white_check_mark: |
|
| `beautify_on_save` | :white_check_mark: |
|
||||||
| `brace_style` | :white_check_mark: |
|
| `brace_style` | :white_check_mark: |
|
||||||
|
| `bracket_spacing` | :white_check_mark: |
|
||||||
| `break_chained_methods` | :white_check_mark: |
|
| `break_chained_methods` | :white_check_mark: |
|
||||||
| `end_of_line` | :white_check_mark: |
|
| `end_of_line` | :white_check_mark: |
|
||||||
| `end_with_comma` | :white_check_mark: |
|
| `end_with_comma` | :white_check_mark: |
|
||||||
|
@ -13110,6 +13236,30 @@ Automatically beautify TypeScript files on save
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`TypeScript Formatter`](#typescript-formatter)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by TypeScript Formatter)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
##### [Break chained methods](#break-chained-methods)
|
##### [Break chained methods](#break-chained-methods)
|
||||||
|
|
||||||
**Namespace**: `js`
|
**Namespace**: `js`
|
||||||
|
@ -14038,6 +14188,7 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff)
|
||||||
| `default_beautifier` | :white_check_mark: | :white_check_mark: |
|
| `default_beautifier` | :white_check_mark: | :white_check_mark: |
|
||||||
| `beautify_on_save` | :white_check_mark: | :white_check_mark: |
|
| `beautify_on_save` | :white_check_mark: | :white_check_mark: |
|
||||||
| `brace_style` | :x: | :white_check_mark: |
|
| `brace_style` | :x: | :white_check_mark: |
|
||||||
|
| `bracket_spacing` | :x: | :white_check_mark: |
|
||||||
| `break_chained_methods` | :x: | :white_check_mark: |
|
| `break_chained_methods` | :x: | :white_check_mark: |
|
||||||
| `end_of_line` | :x: | :white_check_mark: |
|
| `end_of_line` | :x: | :white_check_mark: |
|
||||||
| `end_with_comma` | :x: | :white_check_mark: |
|
| `end_with_comma` | :x: | :white_check_mark: |
|
||||||
|
@ -14151,6 +14302,30 @@ Automatically beautify Vue files on save
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`Vue Beautifier`](#vue-beautifier)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by Vue Beautifier)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
##### [Break chained methods](#break-chained-methods)
|
##### [Break chained methods](#break-chained-methods)
|
||||||
|
|
||||||
**Namespace**: `js`
|
**Namespace**: `js`
|
||||||
|
@ -16182,6 +16357,30 @@ Override EOL from line-ending-selector (Supported by Coffee Formatter)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`Coffee Formatter`](#coffee-formatter)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by Coffee Formatter)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Fortran Beautifier
|
### Fortran Beautifier
|
||||||
|
|
||||||
|
@ -16870,6 +17069,30 @@ Override EOL from line-ending-selector (Supported by JS Beautify)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`JS Beautify`](#js-beautify)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by JS Beautify)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
##### [Indent inner html](#indent-inner-html)
|
##### [Indent inner html](#indent-inner-html)
|
||||||
|
|
||||||
**Namespace**: `html`
|
**Namespace**: `html`
|
||||||
|
@ -18177,6 +18400,83 @@ Specify a configuration file which will override the default name of .perltidyrc
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Prettier
|
||||||
|
|
||||||
|
##### [Indent size](#indent-size)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `indent_size`
|
||||||
|
|
||||||
|
**Default**: `4`
|
||||||
|
|
||||||
|
**Type**: `integer`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Prettier`](#prettier) [`Pretty Diff`](#pretty-diff)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Indentation size/length (Supported by JS Beautify, Prettier, Pretty Diff)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"indent_size": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
##### [Indent with tabs](#indent-with-tabs)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `indent_with_tabs`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Prettier`](#prettier) [`Pretty Diff`](#pretty-diff)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Prettier, Pretty Diff)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"indent_with_tabs": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Prettier`](#prettier)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by JS Beautify, Prettier)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Pretty Diff
|
### Pretty Diff
|
||||||
|
|
||||||
##### [Indent size](#indent-size)
|
##### [Indent size](#indent-size)
|
||||||
|
@ -19300,6 +19600,30 @@ Override EOL from line-ending-selector (Supported by TypeScript Formatter)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`TypeScript Formatter`](#typescript-formatter)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by TypeScript Formatter)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Uncrustify
|
### Uncrustify
|
||||||
|
|
||||||
|
@ -19830,6 +20154,30 @@ Override EOL from line-ending-selector (Supported by Vue Beautifier)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### [Bracket spacing](#bracket-spacing)
|
||||||
|
|
||||||
|
**Namespace**: `js`
|
||||||
|
|
||||||
|
**Key**: `bracket_spacing`
|
||||||
|
|
||||||
|
**Type**: `boolean`
|
||||||
|
|
||||||
|
**Supported Beautifiers**: [`Vue Beautifier`](#vue-beautifier)
|
||||||
|
|
||||||
|
**Description**:
|
||||||
|
|
||||||
|
Insert spaces between brackets in object literals (Supported by Vue Beautifier)
|
||||||
|
|
||||||
|
**Example `.jsbeautifyrc` Configuration**
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"js": {
|
||||||
|
"bracket_spacing": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
##### [Indent inner html](#indent-inner-html)
|
##### [Indent inner html](#indent-inner-html)
|
||||||
|
|
||||||
**Namespace**: `html`
|
**Namespace**: `html`
|
||||||
|
|
|
@ -7,7 +7,11 @@ module.exports = class Prettier extends Beautifier
|
||||||
name: "Prettier"
|
name: "Prettier"
|
||||||
link: "https://github.com/prettier/prettier"
|
link: "https://github.com/prettier/prettier"
|
||||||
options: {
|
options: {
|
||||||
JavaScript: false
|
_:
|
||||||
|
tabWidth: "indent_size"
|
||||||
|
useTabs: "indent_with_tabs"
|
||||||
|
JavaScript:
|
||||||
|
bracketSpacing: "bracket_spacing"
|
||||||
CSS: false
|
CSS: false
|
||||||
LESS: false
|
LESS: false
|
||||||
SCSS: false
|
SCSS: false
|
||||||
|
@ -28,8 +32,7 @@ module.exports = class Prettier extends Beautifier
|
||||||
|
|
||||||
try
|
try
|
||||||
result = prettier.format(text, {
|
result = prettier.format(text, {
|
||||||
tabWidth: options.indent_size,
|
options
|
||||||
useTabs: options.indent_with_tabs
|
|
||||||
parser
|
parser
|
||||||
});
|
});
|
||||||
resolve result
|
resolve result
|
||||||
|
|
|
@ -108,5 +108,9 @@ module.exports = {
|
||||||
default: "System Default"
|
default: "System Default"
|
||||||
enum: ["CRLF","LF","System Default"]
|
enum: ["CRLF","LF","System Default"]
|
||||||
description: "Override EOL from line-ending-selector"
|
description: "Override EOL from line-ending-selector"
|
||||||
|
bracket_spacing:
|
||||||
|
type: 'boolean'
|
||||||
|
default: false
|
||||||
|
description: "Insert spaces between brackets in object literals"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
105
src/options.json
105
src/options.json
|
@ -642,6 +642,20 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bracket_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by Coffee Formatter)",
|
||||||
|
"title": "Bracket spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"Coffee Formatter"
|
||||||
|
],
|
||||||
|
"key": "bracket_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"title": "Disable Beautifying Language",
|
"title": "Disable Beautifying Language",
|
||||||
"order": -3,
|
"order": -3,
|
||||||
|
@ -1565,6 +1579,20 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bracket_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify)",
|
||||||
|
"title": "Bracket spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"JS Beautify"
|
||||||
|
],
|
||||||
|
"key": "bracket_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"indent_inner_html": {
|
"indent_inner_html": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
|
@ -3155,10 +3183,11 @@
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"default": null,
|
"default": null,
|
||||||
"minimum": 0,
|
"minimum": 0,
|
||||||
"description": "Indentation size/length (Supported by JS Beautify, Pretty Diff)",
|
"description": "Indentation size/length (Supported by JS Beautify, Prettier, Pretty Diff)",
|
||||||
"title": "Indent size",
|
"title": "Indent size",
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"JS Beautify",
|
"JS Beautify",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff"
|
"Pretty Diff"
|
||||||
],
|
],
|
||||||
"key": "indent_size",
|
"key": "indent_size",
|
||||||
|
@ -3199,10 +3228,11 @@
|
||||||
"indent_with_tabs": {
|
"indent_with_tabs": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": null,
|
"default": null,
|
||||||
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Pretty Diff)",
|
"description": "Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Prettier, Pretty Diff)",
|
||||||
"title": "Indent with tabs",
|
"title": "Indent with tabs",
|
||||||
"beautifiers": [
|
"beautifiers": [
|
||||||
"JS Beautify",
|
"JS Beautify",
|
||||||
|
"Prettier",
|
||||||
"Pretty Diff"
|
"Pretty Diff"
|
||||||
],
|
],
|
||||||
"key": "indent_with_tabs",
|
"key": "indent_with_tabs",
|
||||||
|
@ -3453,6 +3483,21 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bracket_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify, Prettier)",
|
||||||
|
"title": "Bracket spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"JS Beautify",
|
||||||
|
"Prettier"
|
||||||
|
],
|
||||||
|
"key": "bracket_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"title": "Disable Beautifying Language",
|
"title": "Disable Beautifying Language",
|
||||||
"order": -3,
|
"order": -3,
|
||||||
|
@ -3802,6 +3847,20 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bracket_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify)",
|
||||||
|
"title": "Bracket spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"JS Beautify"
|
||||||
|
],
|
||||||
|
"key": "bracket_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"title": "Disable Beautifying Language",
|
"title": "Disable Beautifying Language",
|
||||||
"order": -3,
|
"order": -3,
|
||||||
|
@ -4166,6 +4225,20 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bracket_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by JS Beautify)",
|
||||||
|
"title": "Bracket spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"JS Beautify"
|
||||||
|
],
|
||||||
|
"key": "bracket_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"title": "Disable Beautifying Language",
|
"title": "Disable Beautifying Language",
|
||||||
"order": -3,
|
"order": -3,
|
||||||
|
@ -7894,6 +7967,20 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bracket_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by TypeScript Formatter)",
|
||||||
|
"title": "Bracket spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"TypeScript Formatter"
|
||||||
|
],
|
||||||
|
"key": "bracket_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disabled": {
|
"disabled": {
|
||||||
"title": "Disable Beautifying Language",
|
"title": "Disable Beautifying Language",
|
||||||
"order": -3,
|
"order": -3,
|
||||||
|
@ -8383,6 +8470,20 @@
|
||||||
"namespace": "js"
|
"namespace": "js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"bracket_spacing": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": false,
|
||||||
|
"description": "Insert spaces between brackets in object literals (Supported by Vue Beautifier)",
|
||||||
|
"title": "Bracket spacing",
|
||||||
|
"beautifiers": [
|
||||||
|
"Vue Beautifier"
|
||||||
|
],
|
||||||
|
"key": "bracket_spacing",
|
||||||
|
"language": {
|
||||||
|
"name": "JavaScript",
|
||||||
|
"namespace": "js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"indent_inner_html": {
|
"indent_inner_html": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"default": false,
|
"default": false,
|
||||||
|
|
Loading…
Reference in New Issue