From 0e1ee41bf68e1a15411a2a320b292fbdacfa7ceb Mon Sep 17 00:00:00 2001 From: andrewsuperlegit <47898478+andrewsuperlegit@users.noreply.github.com> Date: Sun, 25 Apr 2021 03:09:40 -0500 Subject: [PATCH] Adds comma_first as an option for javascript because after digging thru js-beautify's code: ```atom-beautify/node-modules/js-beautify/js/lib/beautifier.js ``` on approximately line 1213 inside the Beautifier.prototype.handle_comma function, you can see on line 1227: ``` } else if (this._options.comma_first){ // <-------- ``` so the option "comma_first" both exists, and is usable and works as expected if you specify the option in your .jsbeautifyrc :-) --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aea3e9938..04817c48d 100644 --- a/README.md +++ b/README.md @@ -313,7 +313,8 @@ See [examples/simple-jsbeautifyrc/.jsbeautifyrc](examples/simple-jsbeautifyrc/.j "preserve_newlines": true, "max_preserve_newlines": 2, "jslint_happy": true, - "indent_handlebars": true + "indent_handlebars": true, + "comma_first": true } ``` @@ -344,7 +345,8 @@ See [examples/nested-jsbeautifyrc/.jsbeautifyrc](examples/nested-jsbeautifyrc/.j "indent_with_tabs": false, "preserve_newlines": true, "max_preserve_newlines": 2, - "jslint_happy": true + "jslint_happy": true, + "comma_first": true }, "sql": { "indent_size": 4,