Skip to content

Incorrect indentation after multiline variable declaration with array or object #524

Closed
@markrian

Description

@markrian

Tested on latest develop ad5d09e. This is the resulting indentation:

const a = 1,
    b = {
        foo: 'bar'
    };

    anythingHere();

whereas I would expect this:

var a = 1,
    b = {
        foo: 'bar'
    };

anythingHere();

Bizarrely, a trailing comma in the object or array literal fixes the subsequent indentation:

const a = 1,
    b = {
        foo: 'bar',
    };

anythingHere();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions