feat: sort deno “node:/npm:” imports/exports first
Makes it so that imports/exports that begin with node: or npm: are first in each set of declarations.
I would really like something like this to be way more fleshed out, with more fine-grained configuration options, but I'd like to see if there's any interest first. If not, I might make a separate dprint plugin with this stuff.
Some notes:
- The
Npm_andNode_names are meant to representnpm:andnode: - The "inner text" of
Node_andNpm_is just sorted alphabetically, i.e. not by path depth - I know these specifiers are Deno-specific, but it most likely will not hurt any non-Deno projects
- Hope you don't mind I added a default VSCode test task
Thanks, looks good, but instead of making this npm and node specific, perhaps we should make this "schemed"? So if a specifier starts with all letters then a colon it would be considered "schemed" and sort before "absolute", which could maybe be renamed to "bare". That way it's not Deno specific.
Yes, that makes sense. I'll revisit this soon. Thanks for the feedback!