vscode extension that will automatically finds, parses and provides code actions for all available imports. Only currently works with files in your folder and TypeScript.
MIT License
165
stars
62
forks
source link
[feature request] Add option to favor absolute imports over relative imports #85
first of all, thanks for the awesome extension! It works beautifully.
One thing bothers me though: I favor using absolute (relative to src/ directory) imports over relative ones. No '../../../' hell and easier to refactor / move around code, especially when working on larger projects.
I think such a feature would be quite easy to add:
Add configuration switch favorAbsoluteImports, which is a boolean value, defaults to false
Add configuration switch absoluteImportRoot, which is a string value, required if favorAbsoluteImports is true, maybe default to ${workSpaceRoot}/src/ as this is the most common configuration when using absolute imports
Does anyone think this feature would be useful as well? If so, I'd be willing to but some time into implementing it if someone could provide me some pointers as to where to start.
Hey there,
first of all, thanks for the awesome extension! It works beautifully. One thing bothers me though: I favor using absolute (relative to src/ directory) imports over relative ones. No
'../../../'
hell and easier to refactor / move around code, especially when working on larger projects.I think such a feature would be quite easy to add:
favorAbsoluteImports
, which is a boolean value, defaults to falseabsoluteImportRoot
, which is a string value, required if favorAbsoluteImports istrue
, maybe default to${workSpaceRoot}/src/
as this is the most common configuration when using absolute importsDoes anyone think this feature would be useful as well? If so, I'd be willing to but some time into implementing it if someone could provide me some pointers as to where to start.
Cheers