diff --git a/eslint.config.js b/eslint.config.js index c87bacce9..442ff39aa 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -25,6 +25,10 @@ export const rules = { '@stylistic/curly-newline': ['error', 'always'], '@stylistic/object-curly-spacing': ['error', 'always'], '@stylistic/indent': ['error', 4, { + ignoredNodes: [ + 'CallExpression', + 'NewExpression', + ], CallExpression: { arguments: 4, }, diff --git a/eslint/control-structure-spacing.js b/eslint/control-structure-spacing.js index 4fc66b261..3d8551c7c 100644 --- a/eslint/control-structure-spacing.js +++ b/eslint/control-structure-spacing.js @@ -129,10 +129,10 @@ export default { const afterOpen = sourceCode.getTokenAfter(openParen); const beforeClose = sourceCode.getTokenBefore(closeParen); - // Function calls should NOT have spacing + // Function calls should NOT have spacing on the same line (multi-line calls are allowed) if ( afterOpen && openParen.range[1] !== afterOpen.range[0] ) { const spaceAfter = sourceCode.getText().slice(openParen.range[1], afterOpen.range[0]); - if ( /^\s+$/.test(spaceAfter) ) { + if ( /^\s+$/.test(spaceAfter) && !spaceAfter.includes('\n') ) { context.report({ node, loc: openParen.loc, @@ -146,7 +146,7 @@ export default { if ( beforeClose && beforeClose.range[1] !== closeParen.range[0] ) { const spaceBefore = sourceCode.getText().slice(beforeClose.range[1], closeParen.range[0]); - if ( /^\s+$/.test(spaceBefore) ) { + if ( /^\s+$/.test(spaceBefore) && !spaceBefore.includes('\n') ) { context.report({ node, loc: closeParen.loc,