Skip to main content

single-var-declarator

Disallows multiple variable definitions in the same declaration statement.

Invalid:

const foo = 1, bar = "2";

Valid:

const foo = 1;
const bar = "2";

Did you find what you needed?

Privacy policy