eslint-plugin-one-variable-per-varESLint rule for enforcing one variable per var statement
Why Use ItYou like consistency
Here are 3 consistent lines
Here are 3 inconsistent lines
var a = 1; var b = 2; var c = 3;
The first line has a var and ends with a comma, the second line has no var and ends with a comma, the 3rd line has no var and ends with a semicolon. That's not consistent.
var a = 1, b = 2, c = 3;
Further, copying, cutting, pasting in other variables requires more editing in the inconsistent case and requires having to deal with lines other than the ones you're editing. If I add
das a var I should not have to care about the line
cis on. In the consistent case each line has no dependecnes. In inconsistent case each line is dependent on 1 or more other lines.