Open The Bundle Editor, select the JavaScript bundle, select the JavaScript language entry, exchange the folding markers:
to fold [\n]
, {\n}
, /*\n*/
foldingStartMarker = '(^.*\bfunction\s*(\w+\s*)?\([^\)]*\)(\s*\{[^\}]*)?\s*$|\[\s*$|\{\s*$|/\*+\s*$)';
foldingStopMarker = '(^\s*\}|^\s*\]|^\s*\*+/)';