From 97d62680e4057dc20cd7d8f92b00c9038c785fa3 Mon Sep 17 00:00:00 2001 From: Deforder Date: Sat, 14 Jan 2017 14:47:27 +0700 Subject: [PATCH] Revert "Added Overrided EOL option for JS , JSX" This reverts commit c48eaf967e38e281d87c124cf8323eba2bae60f1. --- docs/options.md | 3370 ++++++++++++++++++++++++---- src/beautifiers/beautifier.coffee | 20 - src/beautifiers/js-beautify.coffee | 34 +- src/beautifiers/prettydiff.coffee | 9 - src/languages/javascript.coffee | 5 - 5 files changed, 2979 insertions(+), 459 deletions(-) diff --git a/docs/options.md b/docs/options.md index 88beddf..6bb63b3 100644 --- a/docs/options.md +++ b/docs/options.md @@ -766,7 +766,6 @@ Automatically beautify Clojure files on save | `beautify_on_save` | :white_check_mark: | :white_check_mark: | | `brace_style` | :white_check_mark: | :x: | | `break_chained_methods` | :white_check_mark: | :x: | -| `end_of_line` | :white_check_mark: | :x: | | `end_with_comma` | :white_check_mark: | :x: | | `end_with_newline` | :white_check_mark: | :x: | | `eval_code` | :white_check_mark: | :x: | @@ -896,34 +895,6 @@ Break chained method calls across subsequent lines (Supported by Coffee Formatte } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`Coffee Formatter`](#coffee-formatter) - -**Description**: - -Override EOL from line-ending-selector (Supported by Coffee Formatter) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ##### [End with comma](#end-with-comma) **Namespace**: `js` @@ -2206,16 +2177,30 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify) | `disabled` | :white_check_mark: | :white_check_mark: | | `default_beautifier` | :white_check_mark: | :white_check_mark: | | `beautify_on_save` | :white_check_mark: | :white_check_mark: | -| `break_chained_methods` | :x: | :white_check_mark: | -| `end_of_line` | :white_check_mark: | :white_check_mark: | -| `end_with_comma` | :x: | :white_check_mark: | +| `brace_style` | :white_check_mark: | :x: | +| `break_chained_methods` | :white_check_mark: | :white_check_mark: | +| `end_with_comma` | :white_check_mark: | :white_check_mark: | | `end_with_newline` | :white_check_mark: | :x: | +| `eval_code` | :white_check_mark: | :x: | +| `extra_liners` | :white_check_mark: | :x: | | `indent_char` | :white_check_mark: | :white_check_mark: | +| `indent_inner_html` | :white_check_mark: | :x: | +| `indent_level` | :white_check_mark: | :x: | +| `indent_scripts` | :white_check_mark: | :x: | | `indent_size` | :white_check_mark: | :white_check_mark: | -| `indent_with_tabs` | :x: | :white_check_mark: | +| `indent_with_tabs` | :white_check_mark: | :white_check_mark: | +| `jslint_happy` | :white_check_mark: | :x: | +| `keep_array_indentation` | :white_check_mark: | :x: | +| `keep_function_indentation` | :white_check_mark: | :x: | +| `max_preserve_newlines` | :white_check_mark: | :x: | | `preserve_newlines` | :white_check_mark: | :white_check_mark: | -| `space_after_anon_function` | :x: | :white_check_mark: | -| `space_in_paren` | :x: | :white_check_mark: | +| `space_after_anon_function` | :white_check_mark: | :white_check_mark: | +| `space_before_conditional` | :white_check_mark: | :x: | +| `space_in_paren` | :white_check_mark: | :white_check_mark: | +| `unescape_strings` | :white_check_mark: | :x: | +| `unformatted` | :white_check_mark: | :x: | +| `wrap_attributes` | :white_check_mark: | :x: | +| `wrap_attributes_indent_size` | :white_check_mark: | :x: | | `wrap_line_length` | :white_check_mark: | :white_check_mark: | **Description**: @@ -2277,6 +2262,34 @@ Automatically beautify EJS files on save 2. Go into *Packages* and search for "*Atom Beautify*" package. 3. Find the option "*Beautify On Save*" and change it to your desired configuration. +##### [Brace style](#brace-style) + +**Namespace**: `html` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `collapse-preserve-inline` `expand` `end-expand` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "brace_style": "collapse" + } +} +``` + ##### [Break chained methods](#break-chained-methods) **Namespace**: `js` @@ -2285,11 +2298,11 @@ Automatically beautify EJS files on save **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Break chained method calls across subsequent lines (Supported by Pretty Diff) +Break chained method calls across subsequent lines (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2301,34 +2314,6 @@ Break chained method calls across subsequent lines (Supported by Pretty Diff) } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) - -**Description**: - -Override EOL from line-ending-selector (Supported by JS Beautify, Pretty Diff) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ##### [End with comma](#end-with-comma) **Namespace**: `js` @@ -2337,11 +2322,11 @@ Override EOL from line-ending-selector (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**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 Pretty Diff) +If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2377,6 +2362,60 @@ End output with newline (Supported by JS Beautify) } ``` +##### [Eval code](#eval-code) + +**Namespace**: `js` + +**Key**: `eval_code` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "eval_code": false + } +} +``` + +##### [Extra liners](#extra-liners) + +**Namespace**: `html` + +**Key**: `extra_liners` + +**Default**: `head,body,/html` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to [head,body,/html] that should have an extra newline before them. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "extra_liners": [ + "head", + "body", + "/html" + ] + } +} +``` + ##### [Indent char](#indent-char) **Namespace**: `html` @@ -2403,6 +2442,82 @@ Indentation character (Supported by JS Beautify, Pretty Diff) } ``` +##### [Indent inner html](#indent-inner-html) + +**Namespace**: `html` + +**Key**: `indent_inner_html` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent and sections. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_inner_html": false + } +} +``` + +##### [Indent level](#indent-level) + +**Namespace**: `js` + +**Key**: `indent_level` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Initial indentation level (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "indent_level": 0 + } +} +``` + +##### [Indent scripts](#indent-scripts) + +**Namespace**: `html` + +**Key**: `indent_scripts` + +**Default**: `normal` + +**Type**: `string` + +**Enum**: `keep` `separate` `normal` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[keep|separate|normal] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_scripts": "normal" + } +} +``` + ##### [Indent size](#indent-size) **Namespace**: `html` @@ -2437,11 +2552,11 @@ Indentation size/length (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by Pretty Diff) +Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2453,6 +2568,104 @@ Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by P } ``` +##### [Jslint happy](#jslint-happy) + +**Namespace**: `js` + +**Key**: `jslint_happy` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Enable jslint-stricter mode (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "jslint_happy": false + } +} +``` + +##### [Keep array indentation](#keep-array-indentation) + +**Namespace**: `js` + +**Key**: `keep_array_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Preserve array indentation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_array_indentation": false + } +} +``` + +##### [Keep function indentation](#keep-function-indentation) + +**Namespace**: `js` + +**Key**: `keep_function_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_function_indentation": false + } +} +``` + +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `html` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "max_preserve_newlines": 10 + } +} +``` + ##### [Preserve newlines](#preserve-newlines) **Namespace**: `html` @@ -2487,11 +2700,11 @@ Preserve line-breaks (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add a space before an anonymous function's parens, ie. function () (Supported by Pretty Diff) +Add a space before an anonymous function's parens, ie. function () (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2503,6 +2716,32 @@ Add a space before an anonymous function's parens, ie. function () (Supported by } ``` +##### [Space before conditional](#space-before-conditional) + +**Namespace**: `js` + +**Key**: `space_before_conditional` + +**Default**: `true` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "space_before_conditional": true + } +} +``` + ##### [Space in paren](#space-in-paren) **Namespace**: `js` @@ -2511,11 +2750,11 @@ Add a space before an anonymous function's parens, ie. function () (Supported by **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) +Add padding spaces within paren, ie. f( a, b ) (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -2527,6 +2766,179 @@ Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) } ``` +##### [Unescape strings](#unescape-strings) + +**Namespace**: `js` + +**Key**: `unescape_strings` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Decode printable characters encoded in xNN notation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "unescape_strings": false + } +} +``` + +##### [Unformatted](#unformatted) + +**Namespace**: `html` + +**Key**: `unformatted` + +**Default**: `a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,keygen,label,map,mark,math,meter,noscript,object,output,progress,q,ruby,s,samp,select,small,span,strong,sub,sup,svg,template,textarea,time,u,var,video,wbr,text,acronym,address,big,dt,ins,small,strike,tt,pre,h1,h2,h3,h4,h5,h6` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to inline) that should not be reformatted (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "unformatted": [ + "a", + "abbr", + "area", + "audio", + "b", + "bdi", + "bdo", + "br", + "button", + "canvas", + "cite", + "code", + "data", + "datalist", + "del", + "dfn", + "em", + "embed", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "map", + "mark", + "math", + "meter", + "noscript", + "object", + "output", + "progress", + "q", + "ruby", + "s", + "samp", + "select", + "small", + "span", + "strong", + "sub", + "sup", + "svg", + "template", + "textarea", + "time", + "u", + "var", + "video", + "wbr", + "text", + "acronym", + "address", + "big", + "dt", + "ins", + "small", + "strike", + "tt", + "pre", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ] + } +} +``` + +##### [Wrap attributes](#wrap-attributes) + +**Namespace**: `html` + +**Key**: `wrap_attributes` + +**Default**: `auto` + +**Type**: `string` + +**Enum**: `auto` `force` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Wrap attributes to new lines [auto|force] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes": "auto" + } +} +``` + +##### [Wrap attributes indent size](#wrap-attributes-indent-size) + +**Namespace**: `html` + +**Key**: `wrap_attributes_indent_size` + +**Default**: `4` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent wrapped attributes to after N characters (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes_indent_size": 4 + } +} +``` + ##### [Wrap line length](#wrap-line-length) **Namespace**: `html` @@ -3282,10 +3694,18 @@ Automatically beautify Go files on save | `disabled` | :white_check_mark: | :white_check_mark: | | `default_beautifier` | :white_check_mark: | :white_check_mark: | | `beautify_on_save` | :white_check_mark: | :white_check_mark: | +| `brace_style` | :white_check_mark: | :x: | | `end_with_newline` | :white_check_mark: | :x: | +| `extra_liners` | :white_check_mark: | :x: | | `indent_char` | :white_check_mark: | :white_check_mark: | +| `indent_inner_html` | :white_check_mark: | :x: | +| `indent_scripts` | :white_check_mark: | :x: | | `indent_size` | :white_check_mark: | :white_check_mark: | +| `max_preserve_newlines` | :white_check_mark: | :x: | | `preserve_newlines` | :white_check_mark: | :white_check_mark: | +| `unformatted` | :white_check_mark: | :x: | +| `wrap_attributes` | :white_check_mark: | :x: | +| `wrap_attributes_indent_size` | :white_check_mark: | :x: | | `wrap_line_length` | :white_check_mark: | :white_check_mark: | **Description**: @@ -3347,6 +3767,34 @@ Automatically beautify Handlebars files on save 2. Go into *Packages* and search for "*Atom Beautify*" package. 3. Find the option "*Beautify On Save*" and change it to your desired configuration. +##### [Brace style](#brace-style) + +**Namespace**: `html` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `expand` `end-expand` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "brace_style": "collapse" + } +} +``` + ##### [End with newline](#end-with-newline) **Namespace**: `html` @@ -3371,6 +3819,36 @@ End output with newline (Supported by JS Beautify) } ``` +##### [Extra liners](#extra-liners) + +**Namespace**: `html` + +**Key**: `extra_liners` + +**Default**: `head,body,/html` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to [head,body,/html] that should have an extra newline before them. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "extra_liners": [ + "head", + "body", + "/html" + ] + } +} +``` + ##### [Indent char](#indent-char) **Namespace**: `html` @@ -3397,6 +3875,58 @@ Indentation character (Supported by JS Beautify, Pretty Diff) } ``` +##### [Indent inner html](#indent-inner-html) + +**Namespace**: `html` + +**Key**: `indent_inner_html` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent and sections. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_inner_html": false + } +} +``` + +##### [Indent scripts](#indent-scripts) + +**Namespace**: `html` + +**Key**: `indent_scripts` + +**Default**: `normal` + +**Type**: `string` + +**Enum**: `keep` `separate` `normal` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[keep|separate|normal] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_scripts": "normal" + } +} +``` + ##### [Indent size](#indent-size) **Namespace**: `html` @@ -3423,6 +3953,32 @@ Indentation size/length (Supported by JS Beautify, Pretty Diff) } ``` +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `html` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "max_preserve_newlines": 10 + } +} +``` + ##### [Preserve newlines](#preserve-newlines) **Namespace**: `html` @@ -3449,6 +4005,155 @@ Preserve line-breaks (Supported by JS Beautify, Pretty Diff) } ``` +##### [Unformatted](#unformatted) + +**Namespace**: `html` + +**Key**: `unformatted` + +**Default**: `a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,keygen,label,map,mark,math,meter,noscript,object,output,progress,q,ruby,s,samp,select,small,span,strong,sub,sup,svg,template,textarea,time,u,var,video,wbr,text,acronym,address,big,dt,ins,small,strike,tt,pre,h1,h2,h3,h4,h5,h6` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to inline) that should not be reformatted (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "unformatted": [ + "a", + "abbr", + "area", + "audio", + "b", + "bdi", + "bdo", + "br", + "button", + "canvas", + "cite", + "code", + "data", + "datalist", + "del", + "dfn", + "em", + "embed", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "map", + "mark", + "math", + "meter", + "noscript", + "object", + "output", + "progress", + "q", + "ruby", + "s", + "samp", + "select", + "small", + "span", + "strong", + "sub", + "sup", + "svg", + "template", + "textarea", + "time", + "u", + "var", + "video", + "wbr", + "text", + "acronym", + "address", + "big", + "dt", + "ins", + "small", + "strike", + "tt", + "pre", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ] + } +} +``` + +##### [Wrap attributes](#wrap-attributes) + +**Namespace**: `html` + +**Key**: `wrap_attributes` + +**Default**: `auto` + +**Type**: `string` + +**Enum**: `auto` `force` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Wrap attributes to new lines [auto|force] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes": "auto" + } +} +``` + +##### [Wrap attributes indent size](#wrap-attributes-indent-size) + +**Namespace**: `html` + +**Key**: `wrap_attributes_indent_size` + +**Default**: `4` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent wrapped attributes to after N characters (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes_indent_size": 4 + } +} +``` + ##### [Wrap line length](#wrap-line-length) **Namespace**: `html` @@ -3553,10 +4258,18 @@ Automatically beautify Haskell files on save | `disabled` | :white_check_mark: | :white_check_mark: | | `default_beautifier` | :white_check_mark: | :white_check_mark: | | `beautify_on_save` | :white_check_mark: | :white_check_mark: | +| `brace_style` | :white_check_mark: | :x: | | `end_with_newline` | :white_check_mark: | :x: | +| `extra_liners` | :white_check_mark: | :x: | | `indent_char` | :white_check_mark: | :white_check_mark: | +| `indent_inner_html` | :white_check_mark: | :x: | +| `indent_scripts` | :white_check_mark: | :x: | | `indent_size` | :white_check_mark: | :white_check_mark: | +| `max_preserve_newlines` | :white_check_mark: | :x: | | `preserve_newlines` | :white_check_mark: | :white_check_mark: | +| `unformatted` | :white_check_mark: | :x: | +| `wrap_attributes` | :white_check_mark: | :x: | +| `wrap_attributes_indent_size` | :white_check_mark: | :x: | | `wrap_line_length` | :white_check_mark: | :white_check_mark: | **Description**: @@ -3618,6 +4331,34 @@ Automatically beautify HTML files on save 2. Go into *Packages* and search for "*Atom Beautify*" package. 3. Find the option "*Beautify On Save*" and change it to your desired configuration. +##### [Brace style](#brace-style) + +**Namespace**: `html` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `expand` `end-expand` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "brace_style": "collapse" + } +} +``` + ##### [End with newline](#end-with-newline) **Namespace**: `html` @@ -3642,6 +4383,36 @@ End output with newline (Supported by JS Beautify) } ``` +##### [Extra liners](#extra-liners) + +**Namespace**: `html` + +**Key**: `extra_liners` + +**Default**: `head,body,/html` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to [head,body,/html] that should have an extra newline before them. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "extra_liners": [ + "head", + "body", + "/html" + ] + } +} +``` + ##### [Indent char](#indent-char) **Namespace**: `html` @@ -3668,6 +4439,58 @@ Indentation character (Supported by JS Beautify, Pretty Diff) } ``` +##### [Indent inner html](#indent-inner-html) + +**Namespace**: `html` + +**Key**: `indent_inner_html` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent and sections. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_inner_html": false + } +} +``` + +##### [Indent scripts](#indent-scripts) + +**Namespace**: `html` + +**Key**: `indent_scripts` + +**Default**: `normal` + +**Type**: `string` + +**Enum**: `keep` `separate` `normal` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[keep|separate|normal] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_scripts": "normal" + } +} +``` + ##### [Indent size](#indent-size) **Namespace**: `html` @@ -3694,6 +4517,32 @@ Indentation size/length (Supported by JS Beautify, Pretty Diff) } ``` +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `html` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "max_preserve_newlines": 10 + } +} +``` + ##### [Preserve newlines](#preserve-newlines) **Namespace**: `html` @@ -3720,6 +4569,155 @@ Preserve line-breaks (Supported by JS Beautify, Pretty Diff) } ``` +##### [Unformatted](#unformatted) + +**Namespace**: `html` + +**Key**: `unformatted` + +**Default**: `a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,keygen,label,map,mark,math,meter,noscript,object,output,progress,q,ruby,s,samp,select,small,span,strong,sub,sup,svg,template,textarea,time,u,var,video,wbr,text,acronym,address,big,dt,ins,small,strike,tt,pre,h1,h2,h3,h4,h5,h6` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to inline) that should not be reformatted (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "unformatted": [ + "a", + "abbr", + "area", + "audio", + "b", + "bdi", + "bdo", + "br", + "button", + "canvas", + "cite", + "code", + "data", + "datalist", + "del", + "dfn", + "em", + "embed", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "map", + "mark", + "math", + "meter", + "noscript", + "object", + "output", + "progress", + "q", + "ruby", + "s", + "samp", + "select", + "small", + "span", + "strong", + "sub", + "sup", + "svg", + "template", + "textarea", + "time", + "u", + "var", + "video", + "wbr", + "text", + "acronym", + "address", + "big", + "dt", + "ins", + "small", + "strike", + "tt", + "pre", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ] + } +} +``` + +##### [Wrap attributes](#wrap-attributes) + +**Namespace**: `html` + +**Key**: `wrap_attributes` + +**Default**: `auto` + +**Type**: `string` + +**Enum**: `auto` `force` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Wrap attributes to new lines [auto|force] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes": "auto" + } +} +``` + +##### [Wrap attributes indent size](#wrap-attributes-indent-size) + +**Namespace**: `html` + +**Key**: `wrap_attributes_indent_size` + +**Default**: `4` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent wrapped attributes to after N characters (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes_indent_size": 4 + } +} +``` + ##### [Wrap line length](#wrap-line-length) **Namespace**: `html` @@ -3972,16 +4970,24 @@ Path to uncrustify config file. i.e. uncrustify.cfg (Supported by Uncrustify) | `disabled` | :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: | -| `break_chained_methods` | :x: | :x: | :white_check_mark: | -| `end_of_line` | :white_check_mark: | :x: | :white_check_mark: | -| `end_with_comma` | :x: | :x: | :white_check_mark: | +| `brace_style` | :white_check_mark: | :x: | :x: | +| `break_chained_methods` | :white_check_mark: | :x: | :white_check_mark: | +| `end_with_comma` | :white_check_mark: | :x: | :white_check_mark: | | `end_with_newline` | :white_check_mark: | :x: | :x: | +| `eval_code` | :white_check_mark: | :x: | :x: | | `indent_char` | :white_check_mark: | :x: | :white_check_mark: | +| `indent_level` | :white_check_mark: | :x: | :x: | | `indent_size` | :white_check_mark: | :x: | :white_check_mark: | -| `indent_with_tabs` | :x: | :x: | :white_check_mark: | +| `indent_with_tabs` | :white_check_mark: | :x: | :white_check_mark: | +| `jslint_happy` | :white_check_mark: | :x: | :x: | +| `keep_array_indentation` | :white_check_mark: | :x: | :x: | +| `keep_function_indentation` | :white_check_mark: | :x: | :x: | +| `max_preserve_newlines` | :white_check_mark: | :x: | :x: | | `preserve_newlines` | :white_check_mark: | :x: | :white_check_mark: | -| `space_after_anon_function` | :x: | :x: | :white_check_mark: | -| `space_in_paren` | :x: | :x: | :white_check_mark: | +| `space_after_anon_function` | :white_check_mark: | :x: | :white_check_mark: | +| `space_before_conditional` | :white_check_mark: | :x: | :x: | +| `space_in_paren` | :white_check_mark: | :x: | :white_check_mark: | +| `unescape_strings` | :white_check_mark: | :x: | :x: | | `wrap_line_length` | :white_check_mark: | :x: | :white_check_mark: | **Description**: @@ -4043,6 +5049,34 @@ Automatically beautify JavaScript files on save 2. Go into *Packages* and search for "*Atom Beautify*" package. 3. Find the option "*Beautify On Save*" and change it to your desired configuration. +##### [Brace style](#brace-style) + +**Namespace**: `js` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `collapse-preserve-inline` `expand` `end-expand` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|collapse-preserve-inline|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "brace_style": "collapse" + } +} +``` + ##### [Break chained methods](#break-chained-methods) **Namespace**: `js` @@ -4051,11 +5085,11 @@ Automatically beautify JavaScript files on save **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Break chained method calls across subsequent lines (Supported by Pretty Diff) +Break chained method calls across subsequent lines (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4067,34 +5101,6 @@ Break chained method calls across subsequent lines (Supported by Pretty Diff) } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) - -**Description**: - -Override EOL from line-ending-selector (Supported by JS Beautify, Pretty Diff) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ##### [End with comma](#end-with-comma) **Namespace**: `js` @@ -4103,11 +5109,11 @@ Override EOL from line-ending-selector (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**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 Pretty Diff) +If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4143,6 +5149,30 @@ End output with newline (Supported by JS Beautify) } ``` +##### [Eval code](#eval-code) + +**Namespace**: `js` + +**Key**: `eval_code` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "eval_code": false + } +} +``` + ##### [Indent char](#indent-char) **Namespace**: `js` @@ -4169,6 +5199,30 @@ Indentation character (Supported by JS Beautify, Pretty Diff) } ``` +##### [Indent level](#indent-level) + +**Namespace**: `js` + +**Key**: `indent_level` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Initial indentation level (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "indent_level": 0 + } +} +``` + ##### [Indent size](#indent-size) **Namespace**: `js` @@ -4203,11 +5257,11 @@ Indentation size/length (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by Pretty Diff) +Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4219,6 +5273,104 @@ Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by P } ``` +##### [Jslint happy](#jslint-happy) + +**Namespace**: `js` + +**Key**: `jslint_happy` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Enable jslint-stricter mode (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "jslint_happy": false + } +} +``` + +##### [Keep array indentation](#keep-array-indentation) + +**Namespace**: `js` + +**Key**: `keep_array_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Preserve array indentation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_array_indentation": false + } +} +``` + +##### [Keep function indentation](#keep-function-indentation) + +**Namespace**: `js` + +**Key**: `keep_function_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_function_indentation": false + } +} +``` + +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `js` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "max_preserve_newlines": 10 + } +} +``` + ##### [Preserve newlines](#preserve-newlines) **Namespace**: `js` @@ -4253,11 +5405,11 @@ Preserve line-breaks (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add a space before an anonymous function's parens, ie. function () (Supported by Pretty Diff) +Add a space before an anonymous function's parens, ie. function () (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4269,6 +5421,32 @@ Add a space before an anonymous function's parens, ie. function () (Supported by } ``` +##### [Space before conditional](#space-before-conditional) + +**Namespace**: `js` + +**Key**: `space_before_conditional` + +**Default**: `true` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "space_before_conditional": true + } +} +``` + ##### [Space in paren](#space-in-paren) **Namespace**: `js` @@ -4277,11 +5455,11 @@ Add a space before an anonymous function's parens, ie. function () (Supported by **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) +Add padding spaces within paren, ie. f( a, b ) (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4293,6 +5471,30 @@ Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) } ``` +##### [Unescape strings](#unescape-strings) + +**Namespace**: `js` + +**Key**: `unescape_strings` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Decode printable characters encoded in xNN notation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "unescape_strings": false + } +} +``` + ##### [Wrap line length](#wrap-line-length) **Namespace**: `js` @@ -4326,16 +5528,24 @@ Wrap lines at next opportunity after N characters (Supported by JS Beautify, Pre | `disabled` | :white_check_mark: | :white_check_mark: | | `default_beautifier` | :white_check_mark: | :white_check_mark: | | `beautify_on_save` | :white_check_mark: | :white_check_mark: | -| `break_chained_methods` | :x: | :white_check_mark: | -| `end_of_line` | :white_check_mark: | :white_check_mark: | -| `end_with_comma` | :x: | :white_check_mark: | +| `brace_style` | :white_check_mark: | :x: | +| `break_chained_methods` | :white_check_mark: | :white_check_mark: | +| `end_with_comma` | :white_check_mark: | :white_check_mark: | | `end_with_newline` | :white_check_mark: | :x: | +| `eval_code` | :white_check_mark: | :x: | | `indent_char` | :white_check_mark: | :white_check_mark: | +| `indent_level` | :white_check_mark: | :x: | | `indent_size` | :white_check_mark: | :white_check_mark: | -| `indent_with_tabs` | :x: | :white_check_mark: | +| `indent_with_tabs` | :white_check_mark: | :white_check_mark: | +| `jslint_happy` | :white_check_mark: | :x: | +| `keep_array_indentation` | :white_check_mark: | :x: | +| `keep_function_indentation` | :white_check_mark: | :x: | +| `max_preserve_newlines` | :white_check_mark: | :x: | | `preserve_newlines` | :white_check_mark: | :white_check_mark: | -| `space_after_anon_function` | :x: | :white_check_mark: | -| `space_in_paren` | :x: | :white_check_mark: | +| `space_after_anon_function` | :white_check_mark: | :white_check_mark: | +| `space_before_conditional` | :white_check_mark: | :x: | +| `space_in_paren` | :white_check_mark: | :white_check_mark: | +| `unescape_strings` | :white_check_mark: | :x: | | `wrap_line_length` | :white_check_mark: | :white_check_mark: | **Description**: @@ -4397,6 +5607,34 @@ Automatically beautify JSON files on save 2. Go into *Packages* and search for "*Atom Beautify*" package. 3. Find the option "*Beautify On Save*" and change it to your desired configuration. +##### [Brace style](#brace-style) + +**Namespace**: `js` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `collapse-preserve-inline` `expand` `end-expand` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|collapse-preserve-inline|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "brace_style": "collapse" + } +} +``` + ##### [Break chained methods](#break-chained-methods) **Namespace**: `js` @@ -4405,11 +5643,11 @@ Automatically beautify JSON files on save **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Break chained method calls across subsequent lines (Supported by Pretty Diff) +Break chained method calls across subsequent lines (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4421,34 +5659,6 @@ Break chained method calls across subsequent lines (Supported by Pretty Diff) } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) - -**Description**: - -Override EOL from line-ending-selector (Supported by JS Beautify, Pretty Diff) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ##### [End with comma](#end-with-comma) **Namespace**: `js` @@ -4457,11 +5667,11 @@ Override EOL from line-ending-selector (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**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 Pretty Diff) +If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4497,6 +5707,30 @@ End output with newline (Supported by JS Beautify) } ``` +##### [Eval code](#eval-code) + +**Namespace**: `js` + +**Key**: `eval_code` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "eval_code": false + } +} +``` + ##### [Indent char](#indent-char) **Namespace**: `js` @@ -4523,6 +5757,30 @@ Indentation character (Supported by JS Beautify, Pretty Diff) } ``` +##### [Indent level](#indent-level) + +**Namespace**: `js` + +**Key**: `indent_level` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Initial indentation level (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "indent_level": 0 + } +} +``` + ##### [Indent size](#indent-size) **Namespace**: `js` @@ -4557,11 +5815,11 @@ Indentation size/length (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by Pretty Diff) +Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4573,6 +5831,104 @@ Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by P } ``` +##### [Jslint happy](#jslint-happy) + +**Namespace**: `js` + +**Key**: `jslint_happy` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Enable jslint-stricter mode (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "jslint_happy": false + } +} +``` + +##### [Keep array indentation](#keep-array-indentation) + +**Namespace**: `js` + +**Key**: `keep_array_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Preserve array indentation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_array_indentation": false + } +} +``` + +##### [Keep function indentation](#keep-function-indentation) + +**Namespace**: `js` + +**Key**: `keep_function_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_function_indentation": false + } +} +``` + +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `js` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "max_preserve_newlines": 10 + } +} +``` + ##### [Preserve newlines](#preserve-newlines) **Namespace**: `js` @@ -4607,11 +5963,11 @@ Preserve line-breaks (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add a space before an anonymous function's parens, ie. function () (Supported by Pretty Diff) +Add a space before an anonymous function's parens, ie. function () (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4623,6 +5979,32 @@ Add a space before an anonymous function's parens, ie. function () (Supported by } ``` +##### [Space before conditional](#space-before-conditional) + +**Namespace**: `js` + +**Key**: `space_before_conditional` + +**Default**: `true` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "space_before_conditional": true + } +} +``` + ##### [Space in paren](#space-in-paren) **Namespace**: `js` @@ -4631,11 +6013,11 @@ Add a space before an anonymous function's parens, ie. function () (Supported by **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) +Add padding spaces within paren, ie. f( a, b ) (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4647,6 +6029,30 @@ Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) } ``` +##### [Unescape strings](#unescape-strings) + +**Namespace**: `js` + +**Key**: `unescape_strings` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Decode printable characters encoded in xNN notation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "unescape_strings": false + } +} +``` + ##### [Wrap line length](#wrap-line-length) **Namespace**: `js` @@ -4680,16 +6086,24 @@ Wrap lines at next opportunity after N characters (Supported by JS Beautify, Pre | `disabled` | :white_check_mark: | :white_check_mark: | | `default_beautifier` | :white_check_mark: | :white_check_mark: | | `beautify_on_save` | :white_check_mark: | :white_check_mark: | -| `break_chained_methods` | :x: | :white_check_mark: | -| `end_of_line` | :white_check_mark: | :white_check_mark: | -| `end_with_comma` | :x: | :white_check_mark: | +| `brace_style` | :white_check_mark: | :x: | +| `break_chained_methods` | :white_check_mark: | :white_check_mark: | +| `end_with_comma` | :white_check_mark: | :white_check_mark: | | `end_with_newline` | :white_check_mark: | :x: | +| `eval_code` | :white_check_mark: | :x: | | `indent_char` | :white_check_mark: | :white_check_mark: | +| `indent_level` | :white_check_mark: | :x: | | `indent_size` | :white_check_mark: | :white_check_mark: | -| `indent_with_tabs` | :x: | :white_check_mark: | +| `indent_with_tabs` | :white_check_mark: | :white_check_mark: | +| `jslint_happy` | :white_check_mark: | :x: | +| `keep_array_indentation` | :white_check_mark: | :x: | +| `keep_function_indentation` | :white_check_mark: | :x: | +| `max_preserve_newlines` | :white_check_mark: | :x: | | `preserve_newlines` | :white_check_mark: | :white_check_mark: | -| `space_after_anon_function` | :x: | :white_check_mark: | -| `space_in_paren` | :x: | :white_check_mark: | +| `space_after_anon_function` | :white_check_mark: | :white_check_mark: | +| `space_before_conditional` | :white_check_mark: | :x: | +| `space_in_paren` | :white_check_mark: | :white_check_mark: | +| `unescape_strings` | :white_check_mark: | :x: | | `wrap_line_length` | :white_check_mark: | :white_check_mark: | **Description**: @@ -4751,6 +6165,34 @@ Automatically beautify JSX files on save 2. Go into *Packages* and search for "*Atom Beautify*" package. 3. Find the option "*Beautify On Save*" and change it to your desired configuration. +##### [Brace style](#brace-style) + +**Namespace**: `js` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `collapse-preserve-inline` `expand` `end-expand` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|collapse-preserve-inline|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "brace_style": "collapse" + } +} +``` + ##### [Break chained methods](#break-chained-methods) **Namespace**: `js` @@ -4759,11 +6201,11 @@ Automatically beautify JSX files on save **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Break chained method calls across subsequent lines (Supported by Pretty Diff) +Break chained method calls across subsequent lines (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4775,34 +6217,6 @@ Break chained method calls across subsequent lines (Supported by Pretty Diff) } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) - -**Description**: - -Override EOL from line-ending-selector (Supported by JS Beautify, Pretty Diff) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ##### [End with comma](#end-with-comma) **Namespace**: `js` @@ -4811,11 +6225,11 @@ Override EOL from line-ending-selector (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**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 Pretty Diff) +If a terminating comma should be inserted into arrays, object literals, and destructured objects. (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4851,6 +6265,30 @@ End output with newline (Supported by JS Beautify) } ``` +##### [Eval code](#eval-code) + +**Namespace**: `js` + +**Key**: `eval_code` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "eval_code": false + } +} +``` + ##### [Indent char](#indent-char) **Namespace**: `js` @@ -4877,6 +6315,30 @@ Indentation character (Supported by JS Beautify, Pretty Diff) } ``` +##### [Indent level](#indent-level) + +**Namespace**: `js` + +**Key**: `indent_level` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Initial indentation level (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "indent_level": 0 + } +} +``` + ##### [Indent size](#indent-size) **Namespace**: `js` @@ -4911,11 +6373,11 @@ Indentation size/length (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by Pretty Diff) +Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4927,6 +6389,104 @@ Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by P } ``` +##### [Jslint happy](#jslint-happy) + +**Namespace**: `js` + +**Key**: `jslint_happy` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Enable jslint-stricter mode (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "jslint_happy": false + } +} +``` + +##### [Keep array indentation](#keep-array-indentation) + +**Namespace**: `js` + +**Key**: `keep_array_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Preserve array indentation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_array_indentation": false + } +} +``` + +##### [Keep function indentation](#keep-function-indentation) + +**Namespace**: `js` + +**Key**: `keep_function_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_function_indentation": false + } +} +``` + +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `js` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "max_preserve_newlines": 10 + } +} +``` + ##### [Preserve newlines](#preserve-newlines) **Namespace**: `js` @@ -4961,11 +6521,11 @@ Preserve line-breaks (Supported by JS Beautify, Pretty Diff) **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add a space before an anonymous function's parens, ie. function () (Supported by Pretty Diff) +Add a space before an anonymous function's parens, ie. function () (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -4977,6 +6537,32 @@ Add a space before an anonymous function's parens, ie. function () (Supported by } ``` +##### [Space before conditional](#space-before-conditional) + +**Namespace**: `js` + +**Key**: `space_before_conditional` + +**Default**: `true` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "space_before_conditional": true + } +} +``` + ##### [Space in paren](#space-in-paren) **Namespace**: `js` @@ -4985,11 +6571,11 @@ Add a space before an anonymous function's parens, ie. function () (Supported by **Type**: `boolean` -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) **Description**: -Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) +Add padding spaces within paren, ie. f( a, b ) (Supported by JS Beautify, Pretty Diff) **Example `.jsbeautifyrc` Configuration** @@ -5001,6 +6587,30 @@ Add padding spaces within paren, ie. f( a, b ) (Supported by Pretty Diff) } ``` +##### [Unescape strings](#unescape-strings) + +**Namespace**: `js` + +**Key**: `unescape_strings` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Decode printable characters encoded in xNN notation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "unescape_strings": false + } +} +``` + ##### [Wrap line length](#wrap-line-length) **Namespace**: `js` @@ -6417,10 +8027,18 @@ Maximum characters per line (0 disables) (Supported by Marko Beautifier) | `disabled` | :white_check_mark: | | `default_beautifier` | :white_check_mark: | | `beautify_on_save` | :white_check_mark: | +| `brace_style` | :white_check_mark: | | `end_with_newline` | :white_check_mark: | +| `extra_liners` | :white_check_mark: | | `indent_char` | :white_check_mark: | +| `indent_inner_html` | :white_check_mark: | +| `indent_scripts` | :white_check_mark: | | `indent_size` | :white_check_mark: | +| `max_preserve_newlines` | :white_check_mark: | | `preserve_newlines` | :white_check_mark: | +| `unformatted` | :white_check_mark: | +| `wrap_attributes` | :white_check_mark: | +| `wrap_attributes_indent_size` | :white_check_mark: | | `wrap_line_length` | :white_check_mark: | **Description**: @@ -6482,6 +8100,34 @@ Automatically beautify Mustache files on save 2. Go into *Packages* and search for "*Atom Beautify*" package. 3. Find the option "*Beautify On Save*" and change it to your desired configuration. +##### [Brace style](#brace-style) + +**Namespace**: `html` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `expand` `end-expand` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "brace_style": "collapse" + } +} +``` + ##### [End with newline](#end-with-newline) **Namespace**: `html` @@ -6506,6 +8152,36 @@ End output with newline (Supported by JS Beautify) } ``` +##### [Extra liners](#extra-liners) + +**Namespace**: `html` + +**Key**: `extra_liners` + +**Default**: `head,body,/html` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to [head,body,/html] that should have an extra newline before them. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "extra_liners": [ + "head", + "body", + "/html" + ] + } +} +``` + ##### [Indent char](#indent-char) **Namespace**: `html` @@ -6532,6 +8208,58 @@ Indentation character (Supported by JS Beautify) } ``` +##### [Indent inner html](#indent-inner-html) + +**Namespace**: `html` + +**Key**: `indent_inner_html` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent and sections. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_inner_html": false + } +} +``` + +##### [Indent scripts](#indent-scripts) + +**Namespace**: `html` + +**Key**: `indent_scripts` + +**Default**: `normal` + +**Type**: `string` + +**Enum**: `keep` `separate` `normal` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[keep|separate|normal] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_scripts": "normal" + } +} +``` + ##### [Indent size](#indent-size) **Namespace**: `html` @@ -6558,6 +8286,32 @@ Indentation size/length (Supported by JS Beautify) } ``` +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `html` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "max_preserve_newlines": 10 + } +} +``` + ##### [Preserve newlines](#preserve-newlines) **Namespace**: `html` @@ -6584,6 +8338,153 @@ Preserve line-breaks (Supported by JS Beautify) } ``` +##### [Unformatted](#unformatted) + +**Namespace**: `html` + +**Key**: `unformatted` + +**Default**: `a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,keygen,label,map,mark,math,meter,noscript,object,output,progress,q,ruby,s,samp,select,small,span,strong,sub,sup,svg,template,textarea,time,u,var,video,wbr,text,acronym,address,big,dt,strike,tt,pre,h1,h2,h3,h4,h5,h6` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to inline) that should not be reformatted (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "unformatted": [ + "a", + "abbr", + "area", + "audio", + "b", + "bdi", + "bdo", + "br", + "button", + "canvas", + "cite", + "code", + "data", + "datalist", + "del", + "dfn", + "em", + "embed", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "map", + "mark", + "math", + "meter", + "noscript", + "object", + "output", + "progress", + "q", + "ruby", + "s", + "samp", + "select", + "small", + "span", + "strong", + "sub", + "sup", + "svg", + "template", + "textarea", + "time", + "u", + "var", + "video", + "wbr", + "text", + "acronym", + "address", + "big", + "dt", + "strike", + "tt", + "pre", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ] + } +} +``` + +##### [Wrap attributes](#wrap-attributes) + +**Namespace**: `html` + +**Key**: `wrap_attributes` + +**Default**: `auto` + +**Type**: `string` + +**Enum**: `auto` `force` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Wrap attributes to new lines [auto|force] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes": "auto" + } +} +``` + +##### [Wrap attributes indent size](#wrap-attributes-indent-size) + +**Namespace**: `html` + +**Key**: `wrap_attributes_indent_size` + +**Default**: `4` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent wrapped attributes to after N characters (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes_indent_size": 4 + } +} +``` + ##### [Wrap line length](#wrap-line-length) **Namespace**: `html` @@ -9575,7 +11476,6 @@ Maximum amount of characters per line (0 = disable) (Supported by Pretty Diff) | `default_beautifier` | :white_check_mark: | | `beautify_on_save` | :white_check_mark: | | `break_chained_methods` | :white_check_mark: | -| `end_of_line` | :white_check_mark: | | `end_with_comma` | :white_check_mark: | | `indent_char` | :white_check_mark: | | `indent_size` | :white_check_mark: | @@ -9668,34 +11568,6 @@ Break chained method calls across subsequent lines (Supported by Pretty Diff) } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) - -**Description**: - -Override EOL from line-ending-selector (Supported by Pretty Diff) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ##### [End with comma](#end-with-comma) **Namespace**: `js` @@ -9907,7 +11779,6 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff) | `beautify_on_save` | :white_check_mark: | | `brace_style` | :white_check_mark: | | `break_chained_methods` | :white_check_mark: | -| `end_of_line` | :white_check_mark: | | `end_with_comma` | :white_check_mark: | | `end_with_newline` | :white_check_mark: | | `eval_code` | :white_check_mark: | @@ -10037,34 +11908,6 @@ Break chained method calls across subsequent lines (Supported by TypeScript Form } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`TypeScript Formatter`](#typescript-formatter) - -**Description**: - -Override EOL from line-ending-selector (Supported by TypeScript Formatter) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ##### [End with comma](#end-with-comma) **Namespace**: `js` @@ -10942,7 +12785,6 @@ Maximum characters per line (0 disables) (Supported by Pretty Diff) | `beautify_on_save` | :white_check_mark: | | `brace_style` | :white_check_mark: | | `break_chained_methods` | :white_check_mark: | -| `end_of_line` | :white_check_mark: | | `end_with_comma` | :white_check_mark: | | `end_with_newline` | :white_check_mark: | | `eval_code` | :white_check_mark: | @@ -11078,34 +12920,6 @@ Break chained method calls across subsequent lines (Supported by Vue Beautifier) } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`Vue Beautifier`](#vue-beautifier) - -**Description**: - -Override EOL from line-ending-selector (Supported by Vue Beautifier) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ##### [End with comma](#end-with-comma) **Namespace**: `js` @@ -11766,10 +13580,18 @@ Maximum characters per line (0 disables) (Supported by Vue Beautifier) | `disabled` | :white_check_mark: | :white_check_mark: | | `default_beautifier` | :white_check_mark: | :white_check_mark: | | `beautify_on_save` | :white_check_mark: | :white_check_mark: | +| `brace_style` | :white_check_mark: | :x: | | `end_with_newline` | :white_check_mark: | :x: | +| `extra_liners` | :white_check_mark: | :x: | | `indent_char` | :white_check_mark: | :white_check_mark: | +| `indent_inner_html` | :white_check_mark: | :x: | +| `indent_scripts` | :white_check_mark: | :x: | | `indent_size` | :white_check_mark: | :white_check_mark: | +| `max_preserve_newlines` | :white_check_mark: | :x: | | `preserve_newlines` | :white_check_mark: | :white_check_mark: | +| `unformatted` | :white_check_mark: | :x: | +| `wrap_attributes` | :white_check_mark: | :x: | +| `wrap_attributes_indent_size` | :white_check_mark: | :x: | | `wrap_line_length` | :white_check_mark: | :white_check_mark: | **Description**: @@ -11831,6 +13653,34 @@ Automatically beautify XML files on save 2. Go into *Packages* and search for "*Atom Beautify*" package. 3. Find the option "*Beautify On Save*" and change it to your desired configuration. +##### [Brace style](#brace-style) + +**Namespace**: `html` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `expand` `end-expand` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "brace_style": "collapse" + } +} +``` + ##### [End with newline](#end-with-newline) **Namespace**: `html` @@ -11855,6 +13705,36 @@ End output with newline (Supported by JS Beautify) } ``` +##### [Extra liners](#extra-liners) + +**Namespace**: `html` + +**Key**: `extra_liners` + +**Default**: `head,body,/html` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to [head,body,/html] that should have an extra newline before them. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "extra_liners": [ + "head", + "body", + "/html" + ] + } +} +``` + ##### [Indent char](#indent-char) **Namespace**: `html` @@ -11881,6 +13761,58 @@ Indentation character (Supported by JS Beautify, Pretty Diff) } ``` +##### [Indent inner html](#indent-inner-html) + +**Namespace**: `html` + +**Key**: `indent_inner_html` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent and sections. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_inner_html": false + } +} +``` + +##### [Indent scripts](#indent-scripts) + +**Namespace**: `html` + +**Key**: `indent_scripts` + +**Default**: `normal` + +**Type**: `string` + +**Enum**: `keep` `separate` `normal` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[keep|separate|normal] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_scripts": "normal" + } +} +``` + ##### [Indent size](#indent-size) **Namespace**: `html` @@ -11907,6 +13839,32 @@ Indentation size/length (Supported by JS Beautify, Pretty Diff) } ``` +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `html` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "max_preserve_newlines": 10 + } +} +``` + ##### [Preserve newlines](#preserve-newlines) **Namespace**: `html` @@ -11933,6 +13891,155 @@ Preserve line-breaks (Supported by JS Beautify, Pretty Diff) } ``` +##### [Unformatted](#unformatted) + +**Namespace**: `html` + +**Key**: `unformatted` + +**Default**: `a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,keygen,label,map,mark,math,meter,noscript,object,output,progress,q,ruby,s,samp,select,small,span,strong,sub,sup,svg,template,textarea,time,u,var,video,wbr,text,acronym,address,big,dt,ins,small,strike,tt,pre,h1,h2,h3,h4,h5,h6` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to inline) that should not be reformatted (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "unformatted": [ + "a", + "abbr", + "area", + "audio", + "b", + "bdi", + "bdo", + "br", + "button", + "canvas", + "cite", + "code", + "data", + "datalist", + "del", + "dfn", + "em", + "embed", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "map", + "mark", + "math", + "meter", + "noscript", + "object", + "output", + "progress", + "q", + "ruby", + "s", + "samp", + "select", + "small", + "span", + "strong", + "sub", + "sup", + "svg", + "template", + "textarea", + "time", + "u", + "var", + "video", + "wbr", + "text", + "acronym", + "address", + "big", + "dt", + "ins", + "small", + "strike", + "tt", + "pre", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ] + } +} +``` + +##### [Wrap attributes](#wrap-attributes) + +**Namespace**: `html` + +**Key**: `wrap_attributes` + +**Default**: `auto` + +**Type**: `string` + +**Enum**: `auto` `force` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Wrap attributes to new lines [auto|force] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes": "auto" + } +} +``` + +##### [Wrap attributes indent size](#wrap-attributes-indent-size) + +**Namespace**: `html` + +**Key**: `wrap_attributes_indent_size` + +**Default**: `4` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent wrapped attributes to after N characters (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes_indent_size": 4 + } +} +``` + ##### [Wrap line length](#wrap-line-length) **Namespace**: `html` @@ -12670,34 +14777,6 @@ If a terminating comma should be inserted into arrays, object literals, and dest } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`Coffee Formatter`](#coffee-formatter) - -**Description**: - -Override EOL from line-ending-selector (Supported by Coffee Formatter) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ### Fortran Beautifier @@ -13014,30 +15093,577 @@ End output with newline (Supported by JS Beautify) } ``` -##### [End of line](#end-of-line) +##### [Indent level](#indent-level) **Namespace**: `js` -**Key**: `end_of_line` +**Key**: `indent_level` -**Default**: `System Default` +**Type**: `integer` -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) **Description**: -Override EOL from line-ending-selector (Supported by JS Beautify, Pretty Diff) +Initial indentation level (Supported by JS Beautify) **Example `.jsbeautifyrc` Configuration** ```json { "js": { - "end_of_line": "System Default" + "indent_level": 0 + } +} +``` + +##### [Indent with tabs](#indent-with-tabs) + +**Namespace**: `js` + +**Key**: `indent_with_tabs` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) + +**Description**: + +Indentation uses tabs, overrides `Indent Size` and `Indent Char` (Supported by JS Beautify, Pretty Diff) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "indent_with_tabs": false + } +} +``` + +##### [Max preserve newlines](#max-preserve-newlines) + +**Namespace**: `html` + +**Key**: `max_preserve_newlines` + +**Default**: `10` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Number of line-breaks to be preserved in one chunk (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "max_preserve_newlines": 10 + } +} +``` + +##### [Space in paren](#space-in-paren) + +**Namespace**: `js` + +**Key**: `space_in_paren` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) + +**Description**: + +Add padding spaces within paren, ie. f( a, b ) (Supported by JS Beautify, Pretty Diff) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "space_in_paren": false + } +} +``` + +##### [Jslint happy](#jslint-happy) + +**Namespace**: `js` + +**Key**: `jslint_happy` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Enable jslint-stricter mode (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "jslint_happy": false + } +} +``` + +##### [Space after anon function](#space-after-anon-function) + +**Namespace**: `js` + +**Key**: `space_after_anon_function` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) + +**Description**: + +Add a space before an anonymous function's parens, ie. function () (Supported by JS Beautify, Pretty Diff) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "space_after_anon_function": false + } +} +``` + +##### [Brace style](#brace-style) + +**Namespace**: `html` + +**Key**: `brace_style` + +**Default**: `collapse` + +**Type**: `string` + +**Enum**: `collapse` `expand` `end-expand` `none` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[collapse|expand|end-expand|none] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "brace_style": "collapse" + } +} +``` + +##### [Break chained methods](#break-chained-methods) + +**Namespace**: `js` + +**Key**: `break_chained_methods` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) [`Pretty Diff`](#pretty-diff) + +**Description**: + +Break chained method calls across subsequent lines (Supported by JS Beautify, Pretty Diff) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "break_chained_methods": false + } +} +``` + +##### [Keep array indentation](#keep-array-indentation) + +**Namespace**: `js` + +**Key**: `keep_array_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Preserve array indentation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_array_indentation": false + } +} +``` + +##### [Keep function indentation](#keep-function-indentation) + +**Namespace**: `js` + +**Key**: `keep_function_indentation` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "keep_function_indentation": false + } +} +``` + +##### [Space before conditional](#space-before-conditional) + +**Namespace**: `js` + +**Key**: `space_before_conditional` + +**Default**: `true` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "space_before_conditional": true + } +} +``` + +##### [Eval code](#eval-code) + +**Namespace**: `js` + +**Key**: `eval_code` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + + (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "eval_code": false + } +} +``` + +##### [Unescape strings](#unescape-strings) + +**Namespace**: `js` + +**Key**: `unescape_strings` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Decode printable characters encoded in xNN notation (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "js": { + "unescape_strings": false + } +} +``` + +##### [End with comma](#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 + } +} +``` + +##### [Indent inner html](#indent-inner-html) + +**Namespace**: `html` + +**Key**: `indent_inner_html` + +**Type**: `boolean` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent and sections. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_inner_html": false + } +} +``` + +##### [Indent scripts](#indent-scripts) + +**Namespace**: `html` + +**Key**: `indent_scripts` + +**Default**: `normal` + +**Type**: `string` + +**Enum**: `keep` `separate` `normal` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +[keep|separate|normal] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "indent_scripts": "normal" + } +} +``` + +##### [Wrap attributes](#wrap-attributes) + +**Namespace**: `html` + +**Key**: `wrap_attributes` + +**Default**: `auto` + +**Type**: `string` + +**Enum**: `auto` `force` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Wrap attributes to new lines [auto|force] (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes": "auto" + } +} +``` + +##### [Wrap attributes indent size](#wrap-attributes-indent-size) + +**Namespace**: `html` + +**Key**: `wrap_attributes_indent_size` + +**Default**: `4` + +**Type**: `integer` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +Indent wrapped attributes to after N characters (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "wrap_attributes_indent_size": 4 + } +} +``` + +##### [Unformatted](#unformatted) + +**Namespace**: `html` + +**Key**: `unformatted` + +**Default**: `a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del,dfn,em,embed,i,iframe,img,input,ins,kbd,keygen,label,map,mark,math,meter,noscript,object,output,progress,q,ruby,s,samp,select,small,span,strong,sub,sup,svg,template,textarea,time,u,var,video,wbr,text,acronym,address,big,dt,ins,small,strike,tt,pre,h1,h2,h3,h4,h5,h6` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to inline) that should not be reformatted (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "unformatted": [ + "a", + "abbr", + "area", + "audio", + "b", + "bdi", + "bdo", + "br", + "button", + "canvas", + "cite", + "code", + "data", + "datalist", + "del", + "dfn", + "em", + "embed", + "i", + "iframe", + "img", + "input", + "ins", + "kbd", + "keygen", + "label", + "map", + "mark", + "math", + "meter", + "noscript", + "object", + "output", + "progress", + "q", + "ruby", + "s", + "samp", + "select", + "small", + "span", + "strong", + "sub", + "sup", + "svg", + "template", + "textarea", + "time", + "u", + "var", + "video", + "wbr", + "text", + "acronym", + "address", + "big", + "dt", + "ins", + "small", + "strike", + "tt", + "pre", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6" + ] + } +} +``` + +##### [Extra liners](#extra-liners) + +**Namespace**: `html` + +**Key**: `extra_liners` + +**Default**: `head,body,/html` + +**Type**: `array` + +**Supported Beautifiers**: [`JS Beautify`](#js-beautify) + +**Description**: + +List of tags (defaults to [head,body,/html] that should have an extra newline before them. (Supported by JS Beautify) + +**Example `.jsbeautifyrc` Configuration** + +```json +{ + "html": { + "extra_liners": [ + "head", + "body", + "/html" + ] } } ``` @@ -14226,34 +16852,6 @@ If a terminating comma should be inserted into arrays, object literals, and dest } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`Pretty Diff`](#pretty-diff) - -**Description**: - -Override EOL from line-ending-selector (Supported by Pretty Diff) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ### Pug Beautify @@ -14971,34 +17569,6 @@ If a terminating comma should be inserted into arrays, object literals, and dest } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`TypeScript Formatter`](#typescript-formatter) - -**Description**: - -Override EOL from line-ending-selector (Supported by TypeScript Formatter) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ### Uncrustify @@ -15501,34 +18071,6 @@ If a terminating comma should be inserted into arrays, object literals, and dest } ``` -##### [End of line](#end-of-line) - -**Namespace**: `js` - -**Key**: `end_of_line` - -**Default**: `System Default` - -**Type**: `string` - -**Enum**: `CRLF` `LF` `System Default` - -**Supported Beautifiers**: [`Vue Beautifier`](#vue-beautifier) - -**Description**: - -Override EOL from line-ending-selector (Supported by Vue Beautifier) - -**Example `.jsbeautifyrc` Configuration** - -```json -{ - "js": { - "end_of_line": "System Default" - } -} -``` - ##### [Indent inner html](#indent-inner-html) **Namespace**: `html` diff --git a/src/beautifiers/beautifier.coffee b/src/beautifiers/beautifier.coffee index c4b6ec0..e369ac6 100644 --- a/src/beautifiers/beautifier.coffee +++ b/src/beautifiers/beautifier.coffee @@ -97,26 +97,6 @@ module.exports = class Beautifier startDir.pop() return null - # Retrieves the default line ending based upon the Atom configuration - # `line-ending-selector.defaultLineEnding`. If the Atom configuration - # indicates "OS Default", the `process.platform` is queried, returning - # CRLF for Windows systems and LF for all other systems. - # Code modified from atom/line-ending-selector - # returns: The correct line-ending character sequence based upon the Atom - # configuration, or `null` if the Atom line ending configuration was not - # recognized. - # see: https://github.com/atom/line-ending-selector/blob/master/lib/main.js - getDefaultLineEnding: (crlf,lf) -> - switch atom.config.get('line-ending-selector.defaultLineEnding') - when 'LF' - return lf - when 'CRLF' - return crlf - when 'OS Default' - return if process.platform is 'win32' then crlf else lf - else - return lf - ### If platform is Windows ### diff --git a/src/beautifiers/js-beautify.coffee b/src/beautifiers/js-beautify.coffee index 96f15c3..7092e23 100644 --- a/src/beautifiers/js-beautify.coffee +++ b/src/beautifiers/js-beautify.coffee @@ -6,15 +6,6 @@ module.exports = class JSBeautify extends Beautifier link: "https://github.com/beautify-web/js-beautify" options: { - _: - eol: ['end_of_line', (end_of_line) -> - if (end_of_line == 'CRLF') - '\r\n' - else if (end_of_line == 'LF') - '\n' - else - null - ] HTML: true XML: true Handlebars: true @@ -34,10 +25,11 @@ module.exports = class JSBeautify extends Beautifier } beautify: (text, language, options) -> - @verbose("JS Beautify language #{language}") @info("JS Beautify Options: #{JSON.stringify(options, null, 4)}") - options.eol = options.eol ? @getDefaultLineEnding('\r\n','\n') + #TODO reconsider handling of EOL once js-beautify adds EOL detection + #see https://github.com/beautify-web/js-beautify/issues/899 + options.eol = getDefaultLineEnding() ? options.eol #fixes issue #707 return new @Promise((resolve, reject) => try switch language @@ -66,3 +58,23 @@ module.exports = class JSBeautify extends Beautifier reject(err) ) + + # Retrieves the default line ending based upon the Atom configuration + # `line-ending-selector.defaultLineEnding`. If the Atom configuration + # indicates "OS Default", the `process.platform` is queried, returning + # CRLF for Windows systems and LF for all other systems. + # Code modified from atom/line-ending-selector + # returns: The correct line-ending character sequence based upon the Atom + # configuration, or `null` if the Atom line ending configuration was not + # recognized. + # see: https://github.com/atom/line-ending-selector/blob/master/lib/main.js + getDefaultLineEnding= -> + switch atom.config.get('line-ending-selector.defaultLineEnding') + when 'LF' + return '\n' + when 'CRLF' + return '\r\n' + when 'OS Default' + return if process.platform is 'win32' then '\r\n' else '\n' + else + return null diff --git a/src/beautifiers/prettydiff.coffee b/src/beautifiers/prettydiff.coffee index 37c040a..2be957e 100644 --- a/src/beautifiers/prettydiff.coffee +++ b/src/beautifiers/prettydiff.coffee @@ -42,14 +42,6 @@ module.exports = class PrettyDiff extends Beautifier ] ternaryline: "preserve_ternary_lines" bracepadding: "space_in_paren" - crlf: ['end_of_line', (end_of_line) -> - if (end_of_line == 'CRLF') - true - else if (end_of_line == 'LF') - false - else - null - ] # Apply language-specific options CSV: true Coldfusion: true @@ -78,7 +70,6 @@ module.exports = class PrettyDiff extends Beautifier beautify: (text, language, options) -> - options.crlf = options.crlf ? @getDefaultLineEnding(true,false) return new @Promise((resolve, reject) => prettydiff = require("prettydiff") _ = require('lodash') diff --git a/src/languages/javascript.coffee b/src/languages/javascript.coffee index e5c2892..49c7a34 100644 --- a/src/languages/javascript.coffee +++ b/src/languages/javascript.coffee @@ -111,10 +111,5 @@ module.exports = { default: false description: "If a terminating comma should be inserted into \ arrays, object literals, and destructured objects." - end_of_line: - type: 'string' - default: "System Default" - enum: ["CRLF","LF","System Default"] - description: "Override EOL from line-ending-selector" }