wix-incubator / tslint-wix-react

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

object-curly-spacing rule #4

Closed wtfil closed 7 years ago

wtfil commented 7 years ago

Currently we did not have this rule and you could find both styles

import { for, bar } from 'forbar';

and

import {for, bar} from 'forbar';

It would be nice to agree on one of them.

We could fix this with object-curly-spacing

Pls, vote for one of two following comments

wtfil commented 7 years ago
"object-curly-spacing": [
    true,
    "always"
]
import { for, bar } from 'forbar';
wtfil commented 7 years ago
"object-curly-spacing": [
    true,
    "newer"
]
import {for, bar} from 'forbar';
idoros commented 7 years ago

Does this have any effect on multi-line / block imports (in case you bring in a lot of them)? I care less about the spacing, but wouldn't like to lose the ability to have import blocks:

import {
    a.
    b.
    c.
    d
} from 'foobar';
tyv commented 7 years ago

if it is correct eslint fork, it shouldn't

wtfil commented 7 years ago

@idoros both of options are not affect the multiline imports. The basic idea of this rule is to have or not to have space between { and next visible char

AviVahl commented 7 years ago

I personally find it a lot more readable with the space. Voted for the first one.

wtfil commented 7 years ago

for me it is not that big different, but I don't like mix of both styles

VKobeliatsky commented 7 years ago

Looks like the time is long due to make a decision. We merge today. Speak now or be silent forever.