Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

js-beautify indentation of case labels

js-beautify, when used from the command line (latest version, on both Windows and Linux) indents case labels, leading to double indentation of case blocks. I posted this as an issue on github:

https://github.com/einars/js-beautify/issues/367

in reply to which someone correctly pointed out that it actually works properly when you use it via the web interface, which suggests it might be a configuration problem rather than an actual bug in the code.

Does anyone know what's causing this, and whether there's a way to fix it with a configuration tweak?

like image 253
rwallace Avatar asked Dec 13 '13 11:12

rwallace


1 Answers

You should use the option --good-stuff on the command line, e.g.

js-beautify --good-stuff -f test.js
like image 98
Stephen Thomas Avatar answered Nov 11 '22 20:11

Stephen Thomas