Standard: Use VariableDeclarator ?

Created on 26 Apr 2017  路  3Comments  路  Source: standard/standard

consider this

screenshot from 2017-04-26 14-32-23

wouldn't it be nice if we just write like this

screenshot from 2017-04-26 14-30-39

But i got error no-multi-spaces when i wrote code like that.
We can implement that with no-multi-spaces' exception VariableDeclarator.
http://eslint.org/docs/rules/no-multi-spaces#exceptions

question

Most helpful comment

fixed?
image

All 3 comments

I think that the problem with this is the horrible git diffs that you get when adding one slightly longer variable. Then you have to go back and change all the previous lines to match.

Also, I personally don't think that standard should allow both, either this should be required or not allowed...

Sorry, this kind of manual variable alignment is not really the best use of limited programmer time, even though I agree that it arguably looks "pretty".

Better to have a consistent聽rule:聽always type one space.

fixed?
image

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tsujigiri picture tsujigiri  路  3Comments

rbecheras picture rbecheras  路  3Comments

vdclouis picture vdclouis  路  3Comments

johannes-z picture johannes-z  路  3Comments

davidjamesstone picture davidjamesstone  路  3Comments