Javascript formatting for "prototype" style objects

Hi folks

I have started reusing IntelliJ at version 5.1.2 #4267.

I have found that the formatting for JS is pretty bust if you declare objects inline in the kinda Prototype library fashion <http://prototype.conio.net/>. BTW this notation isn't particular to Prototype, just JS standard anonymous object notation, hash stylee.

An example :

-


var Test = Class.create();
Test.prototype =
}
-



Anyways, I am sure IntelliJ was formatting this correctly on a previous version of 5.1. I can't find a way to configure JS formatting directly and I read in the docs that it just inherits from the Java code - is this correct ior did I miss something ?

Perhaps it worked before due to different coding style, I definitely had braces on new lines on the last project..

If you try and code in the style above you'll see the braces and newlines are consistently indented incorrectly and if you format (crtl-alt-l) the code it indents it too far...

any suggestions or workarounds would be very welcome as I am fighting the IDE when I code and there seems to way to switch of the JS formatting ?

TIA

Matt

Please sign in to leave a comment.