"editor.codeActionsOnSave": {
  "source.fixAll": "explicit",
   // "source.sortImports": "explicit"
},

I have right now the same issue, I've solved it by commenting the source.sortImports property in my VSCode Open User settings file (Command+P -> >Open User Settings)

I beleive it will help you!

Answer from Sergei on Stack Overflow
🌐
Reddit
reddit.com › r/vscode › sorting import statements in vs code with prettier
r/vscode on Reddit: Sorting Import statements in VS Code with Prettier
July 29, 2022 -

Here's one of the videos I made that helped many people with automatic sorting import statements in VS Code using Prettier. I hope it helps people around here as well.

Do let me know some feedback 🙂

https://youtu.be/QQWgN0_gUxI

🌐
npm
npmjs.com › package › prettier-plugin-organize-imports
prettier-plugin-organize-imports - npm
... 🤯 If your editor supports ... about their order anymore. ... This plugin inherits, extends, and then overrides the built-in Prettier parsers for babel, babel-ts, typescript and vue....
      » npm install prettier-plugin-organize-imports
    
Published   Sep 18, 2025
Version   4.3.0
Author   Simon Haenisch
🌐
DEV Community
dev.to › josephciullo › how-to-customize-import-sorting-in-javascript-with-prettier-and-regex-1h8j
Customizing JavaScript Import Sorting in VSCode Using Prettier (and Regex) - DEV Community
January 20, 2024 - @trivago/prettier-plugin-sort-imports: By incorporating this package, we gain the capability to leverage Prettier for not only code formatting but also the systematic arrangement of import statements.
🌐
GitHub
github.com › prettier › prettier-vscode › issues › 716
Plugin has a conflict with the built-in organize imports · Issue #716 · prettier/prettier-vscode
February 9, 2019 - prettier: "prettier": "^1.16.4", (was initially on 1.13.7, tried to update) vscode: Version 1.31.0 (1.31.0) extension: 1.8.0 · I first opened a ticket with vscode core, but was referred to the extension as the source of the problem: microsoft/vscode#68193 · Add setting for editor.codeActionsOnSave.source.organizeImports = true (see below for example json) ... create a ts file (may also work with js) that has an import that exceeds the configured line length, which should be turned into a multi-line import
Published   Feb 09, 2019
🌐
Genicsblog
genicsblog.com › usman › how-to-sort-imports-for-a-javascript-project-using-prettier
How to sort imports for a JavaScript Project using Prettier
March 29, 2022 - By default, we import other files and libraries in an unformatted way. With Prettier and one of it’s community plugins, we can easily configure it to sort import statements the way we want them automatically whenever we format code inside VS Code.
🌐
GitHub
github.com › simonhaenisch › prettier-plugin-organize-imports
GitHub - simonhaenisch/prettier-plugin-organize-imports: Make Prettier organize your imports using the TypeScript language service API.
... 🤯 If your editor supports ... about their order anymore. ... This plugin inherits, extends, and then overrides the built-in Prettier parsers for babel, babel-ts, typescript and vue....
Starred by 1.2K users
Forked by 44 users
Languages   JavaScript
Find elsewhere
🌐
Medium
medium.com › dooboolab › using-eslint-prettier-and-sort-imports-vscode-extensions-for-formatting-open-source-project-16edf317129d
Using eslint, prettier and sort-imports vscode extensions for formatting Open Source Project…
November 19, 2019 - Format and sort imports all at once! ... prettier extension settings moved into .prettierrc.js as using it inside of .vscode/settings.json has deprecated
🌐
DEV Community
dev.to › diballesteros › how-to-quickly-sort-imports-with-prettier-3po7
How to quickly sort imports with Prettier - DEV Community
March 30, 2022 - npm install prettier @trivago/prettier-plugin-sort-imports --save-dev · Now we can go ahead and start configuring our rules. This plugin receives an array of strings.
🌐
Reddit
reddit.com › r/vuejs › how to automatically sort imports in vs code?
r/vuejs on Reddit: How to automatically sort imports in VS Code?
March 10, 2025 -

Looking at this GitHub comment, it seems like I should be able to add "editor.codeActionsOnSave": { "source.organizeImports": true } to .vscode/settings.json and have it "just work", but in my testing that doesn't work. How do you handle automatic import sorting for .vue files in Visual Studio Code?

🌐
Haseeb Majid
haseebmajid.dev › posts › til: how to get vscode eslint to sort imports
TIL: How to Get VSCode ESLint to Sort Imports | Haseeb Majid
January 4, 2026 - { "eslint.validate": [ "javascript", "svelte", "javascriptreact", "typescript", "typescriptreact" ], "[typescript]": { "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.tabSize": 2, "editor.codeActionsOnSave": { "source.organizeImports": true, "source.fixAll": true } }, } Now this format our typescript files automatically when we save it, including organising our imports. Now this is all well and good, except when we add the following ESLint plugin ESLint-plugin-import.
🌐
Francisco Moretti
franciscomoretti.com › blog › how-to-setup-tailwind-and-sort-imports-prettier-plugins
How to Setup Tailwind and Sort Imports Prettier Plugins
June 26, 2023 - Prettier Plugin Sort Imports from @ianvs/prettier-plugin-sort-imports is a prettier plugin that allows you to sort import declarations based on a provided Regular Expression order while preserving the order of side-effect imports.
🌐
Medium
medium.com › @diballesteros › how-to-quickly-sort-imports-with-prettier-14f82b16a956
How to quickly sort imports with Prettier | by Diego Ballesteros (Relatable Code) | Medium
March 30, 2022 - This will cover mostly everything! So let’s create a .prettierrc (a prettier configuration file) at the route of our project. ... { "importOrder": [ "^components/(.*)$", "^[./]" ], "importOrderSeparation": true, "importOrderSortSpecifiers": true }
🌐
DevDojo
devdojo.com › post › usmanwrites › sort-imports-using-prettier-in-a-javascript-project-inside-vs-code
🎨 Sort imports using Prettier in a JavaScript Project inside VS Code! - DevDojo
March 27, 2022 - By default, we import other files and libraries in an unformatted way. With Prettier and one of it's community plugins, we can easily configure it to sort import statements the way we want them automatically whenever we format code inside VS Code.
🌐
Visual Studio Marketplace
marketplace.visualstudio.com › items
JS/TS Import/Export Sorter - Visual Studio Marketplace
Extension for Visual Studio Code - Auto format imports and exports for JavaScript and TypeScript.