Skip to content

Organize Imports: Add option to change between relative and absolute paths #22908

Open

Description

@mjbvz

microsoft/vscode#46699

Feature Request
Add a configuration option that can force auto imports to be converted to relative or absolute paths. This option should be off by default (we leave the paths untouched)

Activity

  1. nukkamoto commented on Mar 23, 2021

    @nukkamoto

    I would prefer this under the refactor context menu, it would be better suited.

  2. twopelu commented on Nov 19, 2021

    @twopelu

    +1 (currently trying to manually refactor >1000 absolute paths causing my lib to crash when imported outside)

  3. Chris-McQuiggan commented on Jun 19, 2023

    @Chris-McQuiggan

    I don't suppose this is still being worked on?

  4. dan-b-hu commented on Sep 8, 2023

    @dan-b-hu

    I found an extension which seems to work well to convert all imports from relative to absolute based on the baseUrl in jsconfig.json / tsconfig.json
    https://marketplace.visualstudio.com/items?itemName=iulian-radu-at.fix-relative-imports-to-baseurl

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

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 featureDomain: LS: Organize ImportsIssues with the organize imports featureSuggestionAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions