tools: disallow multiple spaces except for indentation
Checklist
-
tests and code linting passes -
the commit message follows commit guidelines
Affected core subsystem(s)
tools test benchmark lib
Description of change
Except for indentation, disallow multiple whitespace around logical expressions, conditional expressions, declarations, array elements, object properties, sequences and function parameters.
This stems from comments in https://github.com/nodejs/node/pull/6592 where five collaborators expressed frustration with the use of spaces to align things that do not appear first on a line. I would not be surprised if there are others who feel differently, but rather than make an assumption, I'm putting this out there and we'll see....
Anyway, @cjihrig probably stated the argument for this rule the clearest:
I'm in favor of not lining these up. It looks nice, but almost always ends with something being added that requires everything to be realigned, leading to more churn.
/cc @jasnell @targos @mscdex @jbergstroem @cjihrig