Closed camerondubas closed 10 months ago
How does the Sort Imports command work on a project that already has eslint-plugin-simple-import-sort
(this plugin works on *.{gjs,gts}
files)? Would there be some conflict between the two?
@ijlee2 I imagine it would interact in exactly the same way as that plugin does with the built-in "Sort Imports" commands that are provided for regular JS and TS files today. Presumably if you're using the eslint plugin, then you aren't invoking this command and instead are relying on eslint --fix
or fix-on-save instead.
@dfreeman Sounds good, thanks for the clarification.
@camerondubas looks like there are lint failures? Can you address and push? Thanks!
Thanks for getting this in!
Thx for this feature 🙏
We've been using source.organizeImports
for a while, and this both sorts, but also removes unused imports.
@camerondubas , I know you chose to not implement this feature in this PR, but are there any plans on adding this?
@bartocc Ya I could take a look at that. Should have some time over the next week
As requested here https://github.com/typed-ember/glint/issues/626, this adds a "Sort Imports" command to the vscode extension and implements a request in the language server to get the TextEdits needed to organize the imports of the current file.
gts
files as well asts
https://github.com/typed-ember/glint/assets/6216460/18df1dbd-670e-476e-ab0c-ce4b3dcb5e4d