one-var-declaration-per-line
eslint
Safe autofix
eslint.config.js
export default [
{
rules: {
"one-var-declaration-per-line": "error",
},
},
];This rule is deprecated. Check its documentation for a replacement before enabling it.
Require or disallow newlines around variable declarations
var a, b, c = 0;
let d,
e = 0, f;var a, b;
let c, d = 0;
const e = 0, f = 0;var a, b;
let c,
d;
let e,
f = 0;var a,
b;
let c,
d = 0;Examples from the ESLint documentation.
one-var-declaration-per-line
eslint
export default [
{
rules: {
"one-var-declaration-per-line": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Require return statements to either always or never specify values
Disallow dangling underscores in identifiers
Disallow variable declarations from shadowing variables declared in the outer scope