`requireLeftStickedOperators` should ignore new lines #164

Closed
MoOx opened this Issue Jan 13, 2014 · 7 comments

Comments

Projects
None yet
3 participants

MoOx commented Jan 13, 2014

I want requireLeftStickedOperators to check comma (,) for var like array (like in your example x = [1, 2]), but not for that kind of code.

var x = [1, 2]
  , y = 32

Is this possible ?

Owner

markelog commented Feb 2, 2014

Sorry, i didn't understand your request, perhaps you could provide valid/invalid example?

Owner

markelog commented Feb 5, 2014

Closing for now, since owner is not responding

markelog closed this Feb 5, 2014

MoOx commented Feb 5, 2014

My example is just invalid.

"requireLeftStickedOperators": [
      ","
  ]

Valid

var x = [1, 2], y = 32

Invalid

var x = [1, 2]
  , y = 32

In the last example, there is nothing before the comma so it should be skipped (like if there is a \n between the last char & the "LeftStickedOperator".

Owner

markelog commented Feb 5, 2014

Okay, seems valid and relevant to disallowCommaBeforeLineBreak rule.

markelog reopened this Feb 5, 2014

markelog added the enhancement label Feb 5, 2014

Contributor

mikesherov commented Jun 24, 2014

@markelog is this still valid since we kill *sticked?

mikesherov removed the question label Jun 24, 2014

Owner

markelog commented Jun 25, 2014

It is valid i guess, but now for disallowSpaceBeforeBinaryOperators rule, perhaps we should create separate issue for it

Owner

markelog commented Jun 25, 2014

Replaced by mdevils#467

markelog closed this Jun 25, 2014

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