wix-incubator / tslint-wix-react

Linting configuration on top of tslint-microsoft-contrib for tsx projects
0 stars 3 forks source link

indent rules #3

Closed Ta4i closed 7 years ago

Ta4i commented 7 years ago

We missing rule for indentation: "indent": [true, "spaces", x]

It should be there. The only one question is how many spaces should it use. To solve it - vote for next comments of this issue.

Ta4i commented 7 years ago

2 spaces

Ta4i commented 7 years ago

4 spaces

qballer commented 7 years ago

I don't think a vote is the way to resolve this issue. On most cases this doesn't matter, but we have a code base which uses 4 spaces. Changing this is technically easy, but will rewrite the code base and destroy history. For that you need to start with git filter-branch magic. I vote against it.

tyv commented 7 years ago

by destroying history you mean blame? it is not so important as we are on early stages (and by the good is should be already done)

but we have a code base which uses 4 spaces

current code base has different styles. mainly 4 spaces.

wtfil commented 7 years ago

Ideally it would be nice also include some strict intent rule like ter-intent

ter-intent does not allow to put extra tabs in between {}

AviVahl commented 7 years ago

4 spaces for code. 2 spaces for json or css.

wtfil commented 7 years ago

@avi anyway tslint will not lint .css and .json files

VKobeliatsky commented 7 years ago

It is high time to merge this. The crowd has voted for 4 spaces. We merge today. Speak now or be silent forever.