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 in empty parentheses #322

Closed
wants to merge 1 commit into from
Closed

Space in empty parentheses #322

wants to merge 1 commit into from

Conversation

mcharytoniuk
Copy link

I'd like an option to disable space in empty parens as a modifier to "space-in-paren" option.

Example

code with "--space-in-paren"

if ( foo ) {
    bar;
}

var baz = function ( ) {};

code with "--space-in-paren" without space in empty parens

if ( foo ) {
    bar;
}

var baz = function () {}; // no space inside function parens

@bitwiseman
Copy link
Member

I understand your intent here, but I don't think we should take this change now. At this time we don't want to add more options if we can avoid it.

If you want spaces inside parens, you take a space inside all parens including the empty ones. If you want no space inside your empty parens, take no space inside the non-empty ones as well.

js-beautifier is not a general purpose formatter. There are other projects that are attempting to do that.
@einars or @evocateur may countermand me if they disagree.

This request is now linked to #320, which remains open. At some point we may still take this feature.

@bitwiseman bitwiseman closed this Aug 27, 2013
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

Successfully merging this pull request may close these issues.

None yet

2 participants