-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
Tell us about your environment
- ESLint Version:
v4.6.1 - Node Version:
v8.3.0 - npm Version:
v5.3.0
What parser (default, Babel-ESLint, etc.) are you using?
babel-eslint
Please show your full configuration:
Configuration
// relevant section:
"function-paren-newline" : ["error", "multiline"],What did you do? Please include the actual source code causing the issue.
function foo(
param1
)
// or
foo(
"some very long argument that I'd love to have on it's own line"
);What did you expect to happen?
No errors
What actually happened? Please include the actual, raw output from ESLint.
1:13 error Unexpected newline after '(' function-paren-newline
3:1 error Unexpected newline before ')' function-paren-newline
7:4 error Unexpected newline after '(' function-paren-newline
9:1 error Unexpected newline before ')' function-paren-newline
Some elaboration: with the multiline setting it is only allowed to have newlines in function parenthesis if there are at least 2 arguments. I would expect it to also accept newlines in function parenthesis for single arguments as well (as long as it's done consistent).
I'm not sure if this is actually a bug or intended behaviour, if it's the latter then an option to allow newlines for single-argument functions would be very welcome.