Support aliases from tsconfig.json #29
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Is your feature request related to a problem? Please describe.
I'm using some import aliases in my
tsconfig.json
. My project is broken up into a "shared" alias, and subprojects. It's not exactly a monorepo since there's only one package.json, but functionally, this is intended to be a project that includes some sample games using a library.Currently, to manually ensure the "shared" aliases are sorted higher, you have to either manually exclude or manually include folders, which is somewhat more brittle (see below).
While this approach works, I'd rather set up rules based on the real import path, not the aliased paths
Describe the solution you'd like
With this in my
tsconfig.json
:I'd like to be able to do something like this:
or alternatively
Describe alternatives you've considered
or
I also could differentiate the aliases (e.g.
@/
and#/
or something), but I'd prefer not to do that.Additional context
My goal is to sort anything that's in the
reactCommon
folder higher than anything that's specific to anything specific to an individual game, without having to manually specify either the names of the games or the names of the folders underreactCommon
As things are now, without those explicit folder mentions, when it sees
@/util
and@/tictactoe
, it ends up sorting the imports alphabetically rather than grouping them by "is this shared sample code or sample code specific to one game?"The text was updated successfully, but these errors were encountered: