Skip to content

Restore case-sensitive import sorting #51617

Description

In #51579, I switched our sorting to be case insensitive, as sensitive sorting appeared to cause auto-imports to break.

This appears to be caused by #51616 (at least). After that's fixed, we could revert things.

Also, #51615, if we wanted to use organize imports, however that would be a problem regardless, but less of one given auto-imports should be able to put things in the right place. (Though, I'd rather just let a formatter do this for us.)

Activity

  1. rubiesonthesky commented on Nov 21, 2022

    @rubiesonthesky

    In one the PRs (#51565 (review)) weswigham you said:

    I do wonder if we'd have a better time switching to import type for type imports, though. Would sure make finding actual cycles easier.

    Is there performance change with using type imports, or other difficulties? While talking about taking modules into use, I saw discussion that it's benefical to use that feature by the code base itself so it's easier to see and understand how things work together. I wonder would using type importa have same kind benefit.

    Though, I have also seen (maybe in design notes?) that type imports where meant to just help when there was some sort of problem and not recommended to be used if there was no problem with imports.

    As Typescript user, I'd like to understand why they are not considered or if they were considered but it was decided to not to do that kind of change right now just to avoid unnecessary changes in code base or some non technical reason. :)

    Edit: fixed quoted person

  2. jakebailey commented on Nov 21, 2022

    @jakebailey
    MemberAuthor

    Is there performance change with using type imports, or other difficulties?

    No, there is no performance change, as type-only imports are removed by tsc, esbuild, etc, no matter how they are declared.

    (As to not put words in his mouth, that quote came from me, not Wesley, FYI.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

InfrastructureIssue relates to TypeScript team infrastructure

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions