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

Rule Proposal: no-spaced-func with never #6080

Closed
mysticatea opened this issue May 4, 2016 · 12 comments
Closed

Rule Proposal: no-spaced-func with never #6080

mysticatea opened this issue May 4, 2016 · 12 comments
Assignees
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion feature This change adds a new feature to ESLint rule Relates to ESLint's core rules

Comments

@mysticatea
Copy link
Member

mysticatea commented May 4, 2016

From requireSpacesInCallExpression and disallowSpacesInCallExpression.

In JSCS, we can specify that spaces are required before the open parenthesis of call expressions.
In ESLint, no-spaced-func has a responsibility for spacing of call expressions.

This proposal is to add "always"/"never" option to no-spaced-func.
Maybe we should rename this rule to call-spacing or something like.

{
    "call-spacing": ["error", "always" or "never"]
}
  • "always" - Requires spacing before the open parenthesis of call expressions.
  • "never" (default) - Disallows spacing before the open parenthesis of call expressions. (the current behavior)
@mysticatea mysticatea added rule Relates to ESLint's core rules feature This change adds a new feature to ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels May 4, 2016
@mysticatea mysticatea added this to the JSCS Compatibility milestone May 4, 2016
@mysticatea mysticatea added enhancement This change enhances an existing feature of ESLint and removed feature This change adds a new feature to ESLint labels May 4, 2016
@alberto
Copy link
Member

alberto commented Jul 18, 2016

I can champion this one

@alberto alberto self-assigned this Jul 18, 2016
@platinumazure
Copy link
Member

I would support a rename. Double negatives would be confusing.

@alberto
Copy link
Member

alberto commented Jul 18, 2016

Good point, I agree. Maybe func-spacing or func-parens-spacing?

@platinumazure
Copy link
Member

I liked the "call-spacing" @mysticatea had proposed. (Sorry, when I said "support" I was referring to his proposal, but I should have made that more clear.)

@mysticatea
Copy link
Member Author

I thought that func-spacing is confusing between call expressions and function declarations. It's the reason I chose call word.

@alberto
Copy link
Member

alberto commented Jul 19, 2016

Yeah, sorry, I lost focus on the scope.

@nzakas
Copy link
Member

nzakas commented Jul 21, 2016

How about func-call-spacing, as I'm not sure "call" is obvious on its own?

@nzakas nzakas added accepted There is consensus among the team that this change meets the criteria for inclusion feature This change adds a new feature to ESLint and removed enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Jul 21, 2016
@nzakas
Copy link
Member

nzakas commented Jul 21, 2016

Per TSC meeting (7/21/16), marking as accepted.

Note that is proposal includes deprecating no-spaced-func in favor of the new func-call-spacing rule.

@mysticatea
Copy link
Member Author

Should we need to tweak eslint:all preset for deprecated rules?

@alberto
Copy link
Member

alberto commented Jul 21, 2016

@mysticatea I think it's better to discuss that as a separate issue

@mysticatea
Copy link
Member Author

I opened #6734.

@btmills
Copy link
Member

btmills commented Jul 23, 2016

Working on this.

@alberto alberto removed their assignment Jul 27, 2016
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators Feb 6, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Feb 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion feature This change adds a new feature to ESLint rule Relates to ESLint's core rules
Projects
No open projects
Development

No branches or pull requests

5 participants