Call Expressions Rules
Function call argument formatting, bracket placement, and single-line rules
6 rules6 auto-isFixable1 isConfigurable
On This Page
function-arguments-format
auto-isFixableisConfigurable
Format function call arguments consistently — one per line when threshold is met
Why: Consistent argument formatting makes function calls scannable and diffs clean
Options
| Option | Type | Default | Description |
|---|---|---|---|
minArgs | integer | 2 | Minimum arguments to enforce multiline |
skipHooks | boolean | true | Skip React hooks |
skipSingleArg | boolean | true | Skip calls with single complex argument |
eslint.config.js
javascript
"code-style/function-arguments-format": ["error", { minArgs: 2, skipHooks: true, skipSingleArg: true }]Correct
javascript
setValue( "email", "user@example.com",);Incorrect
javascript
setValue("email", "user@example.com");eslint.config.js
javascript
"code-style/function-arguments-format": "error"nested-call-closing-brackets
auto-isFixable
Chain closing brackets on same line: })); not scattered across lines
Why: Scattered closing brackets waste vertical space
Correct
javascript
const StyledCard = styled(Card)(({ theme }) => ({ color: theme.palette.text.primary,}));Incorrect
javascript
const StyledCard = styled(Card)(({ theme }) => ({ color: theme.palette.text.primary,}));eslint.config.js
javascript
"code-style/nested-call-closing-brackets": "error"no-empty-lines-in-function-calls
auto-isFixable
No empty lines between arguments or after opening/before closing parentheses
Why: Empty lines between arguments break visual grouping
Correct
javascript
createUser( name, email, password,);Incorrect
javascript
createUser( name, email, password,);eslint.config.js
javascript
"code-style/no-empty-lines-in-function-calls": "error"opening-brackets-same-line
auto-isFixable
Opening brackets in function arguments stay on same line as the function call
Why: Opening brackets on new lines create unnecessary indentation
Correct
javascript
fn({ key: value, other: data,});Incorrect
javascript
fn( { key: value });eslint.config.js
javascript
"code-style/opening-brackets-same-line": "error"simple-call-single-line
auto-isFixable
Collapse simple arrow function calls to single line
Why: Common patterns like lazy(() => import(...)) don't need multiline
Correct
javascript
const Page = lazy(() => import("./Page"));Incorrect
javascript
const Page = lazy( () => import("./Page"),);eslint.config.js
javascript
"code-style/simple-call-single-line": "error"single-argument-on-one-line
auto-isFixable
Function calls with a single simple argument stay on one line
Why: Single-argument calls don't need multiline formatting
Correct
javascript
fetchUser(userId);console.log(message);Incorrect
javascript
fetchUser( userId,);eslint.config.js
javascript
"code-style/single-argument-on-one-line": "error"