Skip to content

Always multiline imports / objects #453

@ruudandriessen

Description

@ruudandriessen

I've noticed multi-lining currently is only done when the configured lineWidth is reached.
However, we'd like to always multiline imports/objects that have more then 1 parameter, e.g.:

Currently:

import { a, b } from 'foo'

const obj = { a, b };

Ideal formatting:

import { 
    a, 
    b,
} from 'foo';

const obj = {
    a,
    b,
};

The reasoning behind it being that when multi-lining conflicts become easier to resolve, as they are a single line per import/property rather then a conflict on the entire line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions