Skip to content

Ranged formatting doesn't match whole file formatting. #6046

@mathieulj

Description

@mathieulj

Prettier 1.16.4
Playground link

--parser babel
--range-end 261
--range-start 17
--tab-width 4

Input:

{
    {
        {
            {
                {
                    {
                        console.log({
                            someAttribute: PrepareValueSomehow(value),
                        })
                    }
                }
            }
        }
    }
}

Output:

{
    {
        {
            {
                {
                    {
                        console.log({
                            someAttribute: PrepareValueSomehow(
                                value
                            )
                        });
                    }
                }
            }
        }
    }
}

Expected behavior:

The output should match that of the output without a range (identical to the input):

{
    {
        {
            {
                {
                    {
                        console.log({
                            someAttribute: PrepareValueSomehow(value),
                        })
                    }
                }
            }
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions