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

Spaces in function definition #372

Closed
roman01la opened this issue Dec 25, 2013 · 6 comments
Closed

Spaces in function definition #372

roman01la opened this issue Dec 25, 2013 · 6 comments

Comments

@roman01la
Copy link

Is there an option to set style of defining functions with spaces?

Before parentheses, after or without at all.

@evocateur
Copy link
Contributor

--jslint-happy, despite its name, only puts a space between the function keyword and the opening paren (function () {...). Without it, an anonymous function has no space in that position (function() {...). I don't believe there is an option controlling the space after the trailing paren and before the opening bracket (thus making function(){... impossible).

@rossipedia
Copy link

Not entirely correct. --jslist-happy also reduces the indent level of the inside of a switch block, lining up the case labels with the switch statement as well.

Which is really a shame, as I would love to have the case labels indented as well as have the space after the function keyword/name.

I might try submitting a PR for this

@roman01la
Copy link
Author

@rossipedia Yes, please! 👍

@gabrielmaldi
Copy link
Contributor

I would love to have the case labels indented as well as have the space after the function keyword/name.

Me too! 👍

gabrielmaldi added a commit to gabrielmaldi/js-beautify that referenced this issue Jun 10, 2014
@gabrielmaldi
Copy link
Contributor

#474, which solves this, is now merged 😄

@bitwiseman
Copy link
Member

👍

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

5 participants