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

Add arrow-parens rule to eslint config #6264

Merged
merged 1 commit into from
Apr 19, 2018
Merged

Add arrow-parens rule to eslint config #6264

merged 1 commit into from
Apr 19, 2018

Conversation

noisysocks
Copy link
Member

Closes #611.

Require that there are parens around the arguments of an arrow function. This option got the most 👍 reactions in #611 (comment).

(I'm not that phased by this to be honest—it's just that I was in the neighbourhood while fixing #6263.)

Require that there are parens around the arguments of an arrow function.
@noisysocks noisysocks added the [Type] Build Tooling Issues or PRs related to build tooling label Apr 19, 2018
@noisysocks noisysocks requested a review from a team April 19, 2018 00:09
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quickly! Merge it while nobody is looking! The bikeshed is coming!

@noisysocks
Copy link
Member Author

mods are asleep, add parens!

@noisysocks noisysocks merged commit b717499 into master Apr 19, 2018
@noisysocks noisysocks deleted the add/arrow-parens branch April 19, 2018 00:27
@noisysocks noisysocks added this to the 2.8 milestone Apr 19, 2018
@gziolo
Copy link
Member

gziolo commented Apr 19, 2018

Nooooo 😱 I can no longer do my magic:

param => ( { param } )

😃
By the way, we can also disallow this shortcut for returning inline objects for readability:

( param ) => {
    return { param };
}

This is something we try to encourage anyways.

@youknowriad
Copy link
Contributor

@aduth 😆

nuzzio pushed a commit to nuzzio/gutenberg that referenced this pull request Apr 25, 2018
Require that there are parens around the arguments of an arrow function.
@mtias
Copy link
Member

mtias commented May 3, 2018

First @pento sneaks a fundamental change to our ASCII art and now this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add eslint rule for lambda parameters
5 participants