jsx-function-call-newline
Configuration
rslint.config.ts
Enforce line breaks before and after JSX elements when they are used as arguments to a function.
Rule Details
This rule checks whether a line break is needed before and after every JSX element that serves as an argument to a function call or new expression. A trailing comma after the argument counts as a separator, so no line break is required between the element and that comma.
Options
This rule has a string option:
"multiline"(default) — a line break before and after a JSX argument is required only when the element itself spans multiple lines."always"— a line break before and after every JSX argument is required.
multiline
Examples of incorrect code for this rule with the default "multiline" option:
Examples of correct code for this rule with the default "multiline" option:
always
Examples of incorrect code for this rule with the "always" option:
Examples of correct code for this rule with the "always" option: