Disable sorting for imports in VSCode #6203
Replies: 2 comments 1 reply
-
|
"enabling ESLint during the configuration" what does this mean? how is your question specifically related to TanStack Router? |
Beta Was this translation helpful? Give feedback.
-
|
This is related to the configuration process of the TanStack Router. The package comes with some predefined rules in: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm new to Tanstack Router and after configuration using ViteJS and enabling ESLint during the configuration, I noticed that the sort order for the imports had a conflict in VSCode. If you open the vite.config.ts file, you should see that ESLint complains about the import for node:url. If I save the file, the import briefly moves to the top as recommended by ESLint and then comes back to the current line. If I try to move the import manually at the top of the file and then save the file, the import moves back to the original line.
I figured out that this could be fixed by adding the following instruction in .vscode/settings.json:
"editor.codeActionsOnSave": {
"source.organizeImports": never,
},
Could you please confirm this is the correct approach?
Beta Was this translation helpful? Give feedback.
All reactions