Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment inside an object literal treated as whitespace, triggering a false positive standard/object-curly-even-spacing #13

Closed
lolmaus opened this issue Aug 10, 2016 · 4 comments

Comments

@lolmaus
Copy link

lolmaus commented Aug 10, 2016

Hey.

Got this code which I consider stylistically fine:

import {belongsTo/*, hasMany*/} from 'ember-data/relationships'

I can put the caret anywhere inside the comment and hit Ctrl+Shift+/ to have it uncommented. Very efficient.

The code triggers this error:

Expected consistent spacing (standard/object-curly-even-spacing)

I believe it should not trigger this error, unless there's stray whitespace after */.

Please fix. 🙇

@Krinkle
Copy link

Krinkle commented Feb 28, 2017

Same issue for the following, using the default setting of either. Complains about there being two spaces between the value and the closing bracket instead of one, presumably because it ignores the comment.

var intuition = lib.fetch({ url: loadUrl, timeout: 7000 /* foo bar */ });

@xjamundx
Copy link
Contributor

xjamundx commented Mar 2, 2017

Thanks for these, I don't really intend to fix these as it looks like standard is going to pick some standard for curly braces and array brackets AFAIK

@feross
Copy link
Member

feross commented Mar 2, 2017

@xjamundx Yes, that's the plan.

@feross
Copy link
Member

feross commented Apr 5, 2017

Closing as this rule will be changed in a future version of standard, hopefully 11.x or 12.x.

@feross feross closed this as completed Apr 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants