Closed jacekradko closed 9 years ago
I'm not sure that I'm behind the "inconsistent" word in the description, since this always follows "function" + space + name (optional) + parenthesis format, but I get what you mean. This formatting choice was picked to follow jslint's whitespace rules.
This looks like an excellent place for an additional option. Any suggestions for the property name?
That is fair. Inconsistent isn't the right word for it. Isn't there an option already to match jslint's formatting rules? This one could key of that option.
This should give you what you need. Please feel free to reopen or file a new issue if you're unhappy with the changes.
There should be consistent spacing around function declarations.
Right now named functions have different spacing from anonymous functions. Anonymous functions put a space between function and opening parenthesis. Named functions do not have a space between function name and opening parenthesis.
Here is a failing scenario for this