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

Whitespace issue with function call with object literal + other arguments. #262

Closed
struys opened this issue May 15, 2013 · 2 comments
Closed

Comments

@struys
Copy link

struys commented May 15, 2013

The following:

foo({
    'a': 1
},
10);

Is converted to:

foo({
    'a': 1
},
    10);

I would expect something more like:

foo(
    {'a': 1},
    10
);

or

foo(
    {'a': 1},
    10);
@bitwiseman
Copy link
Member

How about this?

foo({
        'a': 1
    },
    10);

@struys
Copy link
Author

struys commented May 25, 2013

Works for me!

One more cool thing would be an option to have the closing param on a new line. At my company I really want js-beautify + jshint/fixmyjs to be precommit hooks. I've already added it to my own dev environment but people keep complaining in code reviews that

foo(
    a,
    b)

should be

foo(
    a,
    b
)

What do you think? Have others requested similar changes? Is there a particular reason we shouldn't want that?

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

No branches or pull requests

2 participants