distilagency / starward

:boom: ReactJS Wordpress Boilerplate
27 stars 9 forks source link

removed crazy eslint rule #142

Closed falconmick closed 5 years ago

falconmick commented 6 years ago

without this change the following is considered what you should use:

const { 
 some, props, to, descructure
} = someThing;

with this change

const { some, props, to, descructure } = someThing;
falconmick commented 6 years ago

@samlogan if your ok with this just pull it in. It's a tiny change but maybe you want our coding style to include this?

samlogan commented 6 years ago

@falconmick does this rule force you to break props onto a new line if there’s more than 3 being deconstructed?

falconmick commented 6 years ago

@samlogan Yeah that's correct! And probably not a bad thing to have on Perhapse my issue is that we have indent set to disabled, the only reason why I got upset by this was that it caused this to happen when I ran eslint:

image

When I instead change indent to 4 (to match people who use tab, or we can set to 2 if your one of those people! haha I really don't care)

image

The change to make this happen would be to remove "indent": 0, and instead have "indent": ["warn", 4],

Thoughts?

falconmick commented 6 years ago

@samlogan yeah it's definatly the indent which was driving me nuts.. also noticed that the jsx wasn't indenting via eslint --fix so I've change my PR to address the actual cause behind my pain.

falconmick commented 6 years ago

@samlogan do you see any issue with this or can I push it? I'm just really nit picky when it comes to code cleanliness

samlogan commented 6 years ago

All good to merge! Good find

falconmick commented 6 years ago

@samlogan Do you prefer 4 or 2 space indention? @markmollart pointed out that atom by default indents 2 spaces and it's what he's used to. Personally all I care about is consistancy so 2 or 4? Edit: 2 looks better

AllanPooley commented 5 years ago

@samlogan Do you prefer 4 or 2 space indention? @markmollart pointed out that atom by default indents 2 spaces and it's what he's used to. Personally all I care about is consistancy so 2 or 4? Edit: 2 looks better

@falconmick Can confirm, for atom an indentation (tab) is two spaces, though I believe it is recorded as a tab rather than two spaces?

In any case, this will be the configuration for all of us in Sydney (including @samlogan, @chungeric)

samlogan commented 5 years ago

@falconmick 2 looks nicer, can you merge once done?