Thanks for the great package!
In this code I don't want beautify to put a whitespace between function and (:
$(function () {
var el = $('.l-mainMenu');
if (el.length) {
new NavigationView({
el: el
});
}
});
Didn't find the option, is it possible?
Thanks, @vorou!
JavaScript beautification is handled by js-beautify. Please take a look there. If there is anything on my end that I can help with to allow for a solution -- such as updating the js-beautify dependency version or even changing beautifiers for JavaScript -- please do not hesitate to let me know and I can reopen this issue :).
I installed js-beautify npm package (1.5.1, just like the one you use) and run it on the file. With default settings it removes the space between function and () (see the example I wrote in the first message). And your plugin somehow puts it back in.
There may be an issue with how the beautification options are loaded. Thanks for further testing on your end!
Would you be able to share your .jsbeautifyrc file?
It turned out to be related to jslint-happy parameter in .jsbeautifyrc. I set it to false and it no longer adds the space.
Sorry for wasting your time!
I'm glad you found a solution! Great to have an issue documenting it for anyone else with same problem :).
Thanks for having this issue documented, just ran into the same problem.
Most helpful comment
It turned out to be related to
jslint-happyparameter in.jsbeautifyrc. I set it to false and it no longer adds the space.Sorry for wasting your time!