MiltonChung/sort-your-imports ? reverse-engineered prompt
Reverse engineered prompt
Build me a VS Code extension that sorts import statements in JavaScript and TypeScript files.
I want to be able to press a shortcut like F10 to instantly clean up the imports in the current file, and also right click selected lines and sort just those imports. The default sort should be by line length, but I want a few other options too, like sorting by variable name, import path, relative path level, natural alphabetical order, and even a random shuffle for fun.
Please add a settings panel so I can choose the sort style, remove duplicate imports, remove empty lines when sorting selected imports, sort automatically on save, choose whether to keep semicolons, pick single or double quotes, and control how many named imports stay on one line. If the sort mode is by path, make sure package imports, parent folder imports, and current folder imports can be ordered separately.
Keep it simple, polished, and ready to use in VS Code. If you need to look up current docs online, go ahead.
Are you gonna build this?
make sure you review the code using coderabbit