no-unexpected-multiline
eslint
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"no-unexpected-multiline": "error",
},
},
];const foo = bar
(1 || 2).baz();
const hello = 'world'
[1, 2, 3].forEach(addNumber);
const x = function() {}
`hello`
const y = function() {}
y
`hello`
const z = foo
/regex/g.test(bar)const foo = bar;
(1 || 2).baz();
const baz = bar
;(1 || 2).baz()
const hello = 'world';
[1, 2, 3].forEach(addNumber);
const hi = 'world'
void [1, 2, 3].forEach(addNumber);
const x = function() {};
`hello`
const tag = function() {}
tag `hello`Examples from the ESLint documentation.
no-unexpected-multiline
eslint
export default [
{
rules: {
"no-unexpected-multiline": "error",
},
},
];no-unexpected-multiline
eslint plugin · suspicious
{
"rules": {
"no-unexpected-multiline": "error"
}
}Biome does not have this rule.
Disallow the use of undeclared variables unless mentioned in /*global */ comments
Require spread operators instead of .apply()
Disallow variable assignments when the value is not used
Require rest parameters instead of arguments