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

Change the default behavior of space-before-function-paren with async arrow functions #8267

Closed
not-an-aardvark opened this issue Mar 16, 2017 · 4 comments

Comments

Projects
3 participants
@not-an-aardvark
Copy link
Member

commented Mar 16, 2017

What rule do you want to change?

space-before-function-paren

Does this change cause the rule to produce more or fewer warnings?

More

How will the change be implemented? (New option, new default behavior, etc.)?

This will change the default of the asyncArrow option from "ignore" to "always".

As a result, the option will be consistent with all of the rule's other options. When the asyncArrow option was added in #7180, we decided to set the default to "ignore" at first and consider changing it in 4.0.

Please provide some example code that this change will affect:

/* eslint space-before-function-paren: "error" */
async() => {};

What does the rule currently do for this code?

It does not report an error.

What will the rule do after it's changed?

It will report an error.

@ilyavolodin ilyavolodin added this to Needs Approval in v4.0.0 Mar 16, 2017

not-an-aardvark added a commit that referenced this issue Mar 18, 2017

Breaking: tweak space-before-function-paren default option (fixes #8267)
This updates the `asyncArrow` option for space-before-function-paren to be consistent with the other options in the rule. Previously, the user had to explicitly opt-in to async arrow function checking, for backwards compatibility.
@not-an-aardvark

This comment has been minimized.

Copy link
Member Author

commented Mar 18, 2017

Adding this to the TSC agenda because it's a breaking change.

@kaicataldo

This comment has been minimized.

Copy link
Member

commented Mar 19, 2017

Do we also need issues for other config default changes listed in this comment? #7407 (comment)

@not-an-aardvark

This comment has been minimized.

Copy link
Member Author

commented Mar 19, 2017

Looking at the issue again, I'm no longer convinced that those other config defaults changes are worth pursuing. I'm fine with considering them if someone else thinks they're worthwhile though.

@alberto

This comment has been minimized.

Copy link
Member

commented Mar 19, 2017

Since we already have a majority in agreement with this, I think we can accept it.

@not-an-aardvark not-an-aardvark moved this from Needs Approval to Ready in v4.0.0 Mar 19, 2017

not-an-aardvark added a commit that referenced this issue Mar 20, 2017

Breaking: tweak space-before-function-paren default option (fixes #8267)
This updates the `asyncArrow` option for space-before-function-paren to be consistent with the other options in the rule. Previously, the user had to explicitly opt-in to async arrow function checking, for backwards compatibility.

@ilyavolodin ilyavolodin moved this from Ready to Merged in v4.0.0 Apr 3, 2017

@eslint eslint bot locked and limited conversation to collaborators Feb 6, 2018

@eslint eslint bot added the archived due to age label Feb 6, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.