Closed fbartho closed 1 year ago
There's no way to separate THIRD_PARTY_MODULES and absolute-imports currently
When you say "absolute-imports", do you mean imports using an absolute file path, like /users/foo/module
? Or, do you mean internal (non-third-party) imports that are aliased and thus are non-relative like @src/helpers/module
(ref https://github.com/trivago/prettier-plugin-sort-imports/issues/162)?
I mean libs/path/to/thing.ts
as opposed to (../../to/thing.ts
or ./libs/path/to/thing.ts
)
I guess I should have called that a “root-relative-path” or repo-root-absolute-path? Idk what the right name for it is, but it is a pattern (that I discouraged in my repo(s)), that people ask for often enough that there’s instructions on how to use them in various runtime, typescript, webpack, etc.
Or, do you mean internal (non-third-party) imports that are aliased and thus are non-relative like @src/helpers/module (ref https://github.com/trivago/prettier-plugin-sort-imports/issues/162)?
Yes, this. It’s clear it’s bedtime because I totally missed your comment about this. Sometimes those aliases don’t have any prefix and are just the path to the file, but as if you were at the root of the repo instead of wherever the file is importing from.
I pushed up some examples for the README, let me know what you think, and feel free to adjust them.
No objection to your README changes!
Fixes #76