2 title: function-call-argument-newline
6 - function-paren-newline
8 - object-property-newline
9 - array-element-newline
14 A number of style guides require or disallow line breaks between arguments of a function call.
18 This rule enforces line breaks between arguments of a function call.
22 This rule has a string option:
24 * `"always"` (default) requires line breaks between arguments
25 * `"never"` disallows line breaks between arguments
26 * `"consistent"` requires consistent usage of line breaks between arguments
30 Examples of **incorrect** code for this rule with the default `"always"` option:
35 /*eslint function-call-argument-newline: ["error", "always"]*/
37 foo("one", "two", "three");
44 baz("one", "two", (x) => {
51 Examples of **correct** code for this rule with the default `"always"` option:
56 /*eslint function-call-argument-newline: ["error", "always"]*/
92 Examples of **incorrect** code for this rule with the `"never"` option:
97 /*eslint function-call-argument-newline: ["error", "never"]*/
122 Examples of **correct** code for this rule with the `"never"` option:
127 /*eslint function-call-argument-newline: ["error", "never"]*/
129 foo("one", "two", "three");
132 "one", "two", "three"
135 bar("one", "two", { one: 1, two: 2 });
142 baz("one", "two", (x) => {
151 Examples of **incorrect** code for this rule with the `"consistent"` option:
156 /*eslint function-call-argument-newline: ["error", "consistent"]*/
169 (x) => { console.log(x); }
175 Examples of **correct** code for this rule with the `"consistent"` option:
180 /*eslint function-call-argument-newline: ["error", "consistent"]*/
182 foo("one", "two", "three");
210 baz("one", "two", (x) => {
225 ## When Not To Use It
227 If you don't want to enforce line breaks between arguments, don't enable this rule.