🔧 The --fix
option on the command line can automatically fix some of the problems reported by this rule.
We want to enforce line breaks between all call expression arguments if any arguments are split by a line break. If any arguments are divided by line breaks, we also enforce a break after the opening paren (
and the closing paren )
.
This rule has no options.
👎 Examples of incorrect code for this rule:
// eslint func-arg-line-breaks: ["error"]
func(
a, b
);
// eslint func-arg-line-breaks: ["error"]
func(a,
b
);
// eslint func-arg-line-breaks: ["error"]
func(
a,
b);
// eslint func-arg-line-breaks: ["error"]
func(
a, b,
c
);
// eslint func-arg-line-breaks: ["error"]
func(
a, b,
c, d
);
// eslint func-arg-line-breaks: ["error"]
func(
a, b,
c, d()
);
👍 Examples of correct code for this rule:
// eslint func-arg-line-breaks: ["error"]
func(a, b);
// eslint func-arg-line-breaks: ["error"]
func(
a,
b
);
If you don't want to enforce line breaks in call expression arguments