Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update organizing of imports #520

Open
abelzis opened this issue Jan 19, 2024 · 0 comments · May be fixed by #626
Open

Update organizing of imports #520

abelzis opened this issue Jan 19, 2024 · 0 comments · May be fixed by #626
Assignees
Labels
dev improvement Improvements for developer experience

Comments

@abelzis
Copy link
Collaborator

abelzis commented Jan 19, 2024

In a lot of files imports are used like this:

import { CommandAction } from '../../model';

When they could be imported like this:

import { CommandAction } from '@app/model';

However, I didn't manage to find a simple solution in 5 minutes. Spend 1 hour trying to find a solution to update the imports on save. Hint: https://stackoverflow.com/questions/72029343/typescript-prefers-importing-relative-import-instead-of-path-alias

Bonus: Add the following, to keep imports organized by IDE in .vscode/settings.json:

    "editor.codeActionsOnSave": {
        "source.organizeImports": true,
    },
@abelzis abelzis added the dev improvement Improvements for developer experience label Jan 19, 2024
@AldasKleinas AldasKleinas self-assigned this Sep 4, 2024
@AldasKleinas AldasKleinas linked a pull request Dec 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev improvement Improvements for developer experience
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants