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
New: func-call-spacing rule (fixes #6080) #6749
Conversation
@btmills, thanks for your PR! By analyzing the annotation information on this pull request, we identified @nzakas, @alberto and @kaicataldo to be potential reviewers |
LGTM |
LGTM |
LGTM |
LGTM |
I think we need to come to some decision on the right way to mark rules as deprecated. See my note on his PR. |
This rule has one string option: | ||
|
||
- `"never"` (default) disallows space between the function name and the opening parenthesis | ||
- `"always"` requires space between the function name and the opening parenthesis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if i want a space but never a newline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disallowing always line breaks sounds good to me.
We can add an option such as allowLineBreaks
later if people want.
@btmills are you going to finish this up? |
LGTM |
LGTM |
I've added the |
LGTM |
What issue does this pull request address?
#6080 - support requireSpacesInCallExpression and disallowSpacesInCallExpression by replacing the
no-spaced-func
rule with a newfunc-call-spacing
rule having"never"
(default) or"always"
modes.What changes did you make? (Give an overview)
Copied the
no-spaced-func
rule, named the new rulefunc-call-spacing
, and added support for"never"
and"always"
options.Is there anything you'd like reviewers to focus on?
no-spaced-func
. What's the proper way to indicate that it's deprecated in favor offunc-call-spacing
?requireSpacesInCallExpression
,"always"
permits newlines within calls.