question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Organize imports: add an option to put all absolute paths after node_modules ones

See original GitHub issue

Feature Request

Add a configuration option that to sort all the absolute paths (i.e. with baseUrl = /src in jsconfig.json) after all the node_modules paths.

Reason

More and more people use alias to avoid long relative paths. It’s a common practice to have first the third-party imports, then the absolute paths, and finally the relative ones.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:16
  • Comments:7

github_iconTop GitHub Comments

1reaction
medihackcommented, Sep 16, 2021

Oh yes, the current way makes this feature useless. Absolute paths are so common these days.

0reactions
tycobbbcommented, Dec 1, 2022

same problem here, but i usually use $ the absolute-like module resolution. can’t really use this feature unless it sorts based on the expanded paths, or is configurable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Organize imports: add an option to put all absolute paths after ...
Add a configuration option that to sort all the absolute paths (i.e. with baseUrl = /src in jsconfig.json ) after all the node_modules...
Read more >
Advanced Features: Absolute Imports and Module Path Aliases
These options allow you to configure module aliases, for example a common pattern is aliasing certain directories to use absolute paths. One useful...
Read more >
Auto import in Visual Studio Code only offering absolute path ...
I've set my Import Module Specifier setting for TypeScript in Visual Studio Code to all three options (auto, relative, and absolute) and none...
Read more >
Clean Up Your Imports using Absolute Imports & Alias on ...
Absolute Import is a great way to clean up your imports Setting up ... so here is all of the setup I use...
Read more >
Understanding relative and absolute imports in Next.js
An absolute import provides a straightforward way to import modules. This import type specifies a path starting from the project's root. Now, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found