Skip to content

Feature Request : make groupedLines of exports based on empty lines #49336

@Rlamotte

Description

@Rlamotte

Following this closed feature, since TS 4.7 organizeImports is groupping imports base on empty line separator.

By default, organizeImports also organize exports.
I need the same behaviour on exports, which are sometimes dependant of previous export (and which should not be reorder globally) :

Example - Before

export d from "D";
export a from "A";
export b from "B";

export c from "C"; //depends on D

{...}

Current behaviour

export a from "A";
export b from "B";
export c from "C";  //depends on D which is not currently exported => causes a build error
export d from "D";

{...}

Desired behaviour

export a from "A";
export b from "B";
export d from "D";

export c from "C";  //depends on D => no error

{...}

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions