Update: support single argument on newline with function-paren-newline#11406
Conversation
3069014 to
df8699c
Compare
|
🤔 |
|
Looks like this PR has a lot of community support, but no support from the team. Anyone on ESLint team wants to support this change? |
|
@g-plane @platinumazure, what do you think about this PR? |
|
IMHO, we can accept it if the community support it. |
|
@g-plane Would you like to champion this issue? |
|
@platinumazure I will and I may review this PR tomorrow. |
|
@g-plane to accept a rule change, we need a champion and 3+ 👍from the team. That is to say, the issue is not "accepted" yet. |
|
Ok, I'm sorry. |
|
@g-plane, how is the championing progressing? |
|
@gwer I've left a 👍 on the issue so we're at least 1/3 of the way to team consensus. Unfortunately, I can't tell which other team members might have left 👍 on the issue because we have a large number of community members who have left 👍 and GitHub only shows a subset (it doesn't even show my name). @g-plane It might be worth pinging team members on the team Gitter chat to try to get this accepted. |
|
I've left a 👍 before. |
|
@g-plane Awesome. That said-- you're champion, so we need 3 other team members besides you to leave 👍. As I noted, I've already done so. |
|
Hmm, I think today is a good day to ping team members (= |
|
This is now accepted, since we have more then enough support from the team for it. |
not-an-aardvark
left a comment
There was a problem hiding this comment.
Thanks for the PR! I left a comment -- I'm having trouble understanding what the intended behavior is based on the documentation.
|
I hope one day we will merge this PR :D |
What is the purpose of this pull request? (put an "X" next to item)
What rule do you want to change?
function-paren-newlineHow will the change be implemented? (New option, new default behavior, etc.)?
New option
consistent-arguments.What changes did you make? (Give an overview)
"consistent-arguments"requires consistent usage of linebreaks for each pair of parentheses and parameters/arguments. It allows linebreaks inside function parentheses if there is only one parameter/argument.Examples of incorrect code for this rule with the
"consistent-arguments"option:Examples of correct code for this rule with the consistent
"consistent-arguments"option:Is there anything you'd like reviewers to focus on?
There are some issues about this problem :: #9286 :: #9411
For
multilineoption this is obvious behavior when you can use single argument on their own line. But now for this you should use less strictconsistentoption.Airbnb JavaScript Style Guide define this code as bad. But their eslint config now use
consistentoption that miss many bad cases becausemultilineoption disallow to use single argument on their own line. Until then they were forced to use additional parens as workaround.