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

space-after-anon-function not applied to object properties #761

Closed
JulianLaval opened this issue Aug 20, 2015 · 4 comments
Closed

space-after-anon-function not applied to object properties #761

JulianLaval opened this issue Aug 20, 2015 · 4 comments
Milestone

Comments

@JulianLaval
Copy link

I've noticed an inconsistency in the "space-after-anon-function" option, although am unsure whether it is a feature or a bug.

In particular, toggling the option doesn't seem to beautify anonymous functions that are specified as object parameters, e.g.

// Original
var objectName = {
  functionName: function(){ ... }
}

// Expected behaviour
var objectName = {
  functionName: function () { ... }
}

// Actual behaviour
var objectName = {
  functionName: function() { ... }
}

The fact that the brace is beautified makes me think that this was simply an oversight rather than intentional; if so, what are your thoughts on supporting this?

@JulianLaval JulianLaval changed the title space-after-anon-function applied to object properties space-after-anon-function not applied to object properties Aug 20, 2015
@bitwiseman bitwiseman added this to the 1.6.1 milestone Jan 29, 2016
@bitwiseman
Copy link
Member

@JulianLaval - This appears to be fixed in 1.6.0. I need to add regression test for it.

@JulianLaval
Copy link
Author

Great!

@bitwiseman
Copy link
Member

I'm going to keep it open until I have the test added.

@JulianLaval
Copy link
Author

👍

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

No branches or pull requests

2 participants