Join GitHub today
Indentation of object literals #2278
Not sure if this is considered a feature request or a bug, but I can't find any combination of style rules that would warn about these code snippets:
The indentation of these snippets are way off, but as I said, I can't find any rules to flag this. I guess it's not a simple problem since you might want to align function arguments to start after the function name, something like:
But it should be pretty universal that
I'd be happy to take a crack at it, if someone could give me some starting pointers.
Found a plugin which handles this here: https://github.com/nodeca/eslint-plugin-nodeca/blob/master/lib/indent.js
Perhaps include that in the builtin indent rule?