From Google JavaScript Style Guide:
Long identifiers or values present problems for aligned initialization
lists, so always prefer non-aligned initialization. For example:
CORRECT_Object.prototype = {
a: 0,
b: 1,
lengthyName: 2
};
Not like this:
WRONG_Object.prototype = {
a : 0,
b : 1,
lengthyName: 2
};
The wrong one looks better.
I do not understand what kind of problems they are talking about.
In what way inserting a couple of tabs before the colon could hurt my code?
There is nothing wrong with either.. Its more a personal preference than anything. Avoiding those extra tab/space characters, will shave some bytes off the file size, but if you are using some kind of minifier or compressor, it shouldn’t matter as these extra characters will be stripped off. So you should probably stick to what you like best as it doesn’t really matter.