Require or disallow an newline around variable declarations (one-var-declaration-per-line)

Some developers declare multiple var statements on the same line:

varfoo,bar,baz;

Others prefer to declare one var per line.

varfoo,bar,baz;

This rule enforces a consistent style across the entire project.

Rule Details

This rule enforces a consistent coding style where newlines are required or disallowed after each var declaration or just when there is a variable initialization. It ignores var declarations inside for loop conditionals.

Options

This rule takes one option, a string, which can be:

"always" enforces a newline around each variable declaration

"initializations" enforces a newline around each variable initialization (default)