Skip to content

Enforce blank line between variable declaration and usage #15

Closed
@wincent

Description

@wincent

As per request here.

In short, if you declare a var, add a line break before using it. This shows order of requirements better.

Some (contrived) examples of correct code:

const thing = getThing();

thing.publish();
const items = getItems();

const reversedItems = items.reverse();

print(reversedItems);
const firstName = 'Jane';
const secondName = 'Smith';

const full name = [firstName, secondName].join(' ');

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions