Javascript formatting mulitline var
Howdy,
So I've spent a significant amount of time trying to make the javascript code style do what I want and haven't found a solution.
If I have multple vars declared with comments like so
var obj = {
a: 1,
b: 2,
c: 'three',
value1: 'abc',
// This is the comment about the next var
value3: 'four;
and I format the code I end up with
var obj = {
a: 1,
b: 2,
c: 'three',
value1: 'abc',
// This is the comment about the next var
value3: 'four;
Is there anyway to keep that comment indention? I see similar behaviour on chained functions
angular.module('aModule', [])
/**
* This is a controller
*/
.controller('MyCtrl, function($scope) {
$scope = [1,2,3];
});
<opt-cmd-l> format file
angular.module('aModule', [])
/**
* This is a controller
*/
.controller('MyCtrl, function($scope) {
$scope = [1,2,3];
});
Thanks!
Please sign in to leave a comment.