This repository has been archived by the owner. It is now read-only.

Changed the right alignment #1500

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
@kolomiichenko

Changed the right alignment.

_Valid_

var x = {
    a:   1,
    bcd: 2,
    ef:  'str'
};

_Invalid_

var x = {
    a   : 1,
    bcd : 2,
    ef  : 'str'
};

Fixed a conflict between disallowSpaceAfterObjectKeys and requireAlignedObjectValues rules.

Changed the right alignment.
Fixed a conflict between disallowSpaceAfterObjectKeys and requireAlignedObjectValues rules
@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Jun 30, 2015

Member

Could you elaborate? requireAlignedObjectValues should enforce

var x = {
    a   : 1,
    bcd : 2,
    ef  : 'str'
};
Member

markelog commented Jun 30, 2015

Could you elaborate? requireAlignedObjectValues should enforce

var x = {
    a   : 1,
    bcd : 2,
    ef  : 'str'
};
@kolomiichenko

This comment has been minimized.

Show comment
Hide comment
@kolomiichenko

kolomiichenko Jun 30, 2015

When you set "disallowSpaceAfterObjectKeys": true and "requireAlignedObjectValues": "all" rules will conflict because first disallow spaces before collons.
So I think that pattern alignment is fundamentally wrong and I offer my alignment template.
But maybe need to modify, and make the choice of alignment template...
Sorry for the tests. This is only my proposal, if someone really considers relevant - I will modify and correct. Now it's more like a question.

When you set "disallowSpaceAfterObjectKeys": true and "requireAlignedObjectValues": "all" rules will conflict because first disallow spaces before collons.
So I think that pattern alignment is fundamentally wrong and I offer my alignment template.
But maybe need to modify, and make the choice of alignment template...
Sorry for the tests. This is only my proposal, if someone really considers relevant - I will modify and correct. Now it's more like a question.

@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Jun 30, 2015

Member

There is a lot of rules that conflict with each other, like requireSemicolons and disallowSemicolons.

Current style of requireAlignedObjectValues is fairly popular, it seems it would better to introduce disallowAlignedObjectValues rule for your particular use-case.

Member

markelog commented Jun 30, 2015

There is a lot of rules that conflict with each other, like requireSemicolons and disallowSemicolons.

Current style of requireAlignedObjectValues is fairly popular, it seems it would better to introduce disallowAlignedObjectValues rule for your particular use-case.

@hzoo

This comment has been minimized.

Show comment
Hide comment
@hzoo

hzoo Jun 30, 2015

Member

I think you would just make an option for requireAlignedObjectValues to align by the key or colon since some people would like either?

Member

hzoo commented Jun 30, 2015

I think you would just make an option for requireAlignedObjectValues to align by the key or colon since some people would like either?

@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Aug 8, 2015

Member

@kolomiichenko Still interested?

Member

markelog commented Aug 8, 2015

@kolomiichenko Still interested?

@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Aug 11, 2015

Member

Okay, ping us up if you change your mind

Member

markelog commented Aug 11, 2015

Okay, ping us up if you change your mind

@markelog markelog closed this Aug 11, 2015

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Mar 17, 2017

Coverage Status

Changes Unknown when pulling 82ac888 on kolomiichenko:master into ** on jscs-dev:master**.

Coverage Status

Changes Unknown when pulling 82ac888 on kolomiichenko:master into ** on jscs-dev:master**.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.