I use prettier-plugin-organize-imports https://www.npmjs.com/package/prettier-plugin-organize-imports Answer from PizzaConsole on reddit.com
🌐
npm
npmjs.com › package › prettier-plugin-organize-imports
prettier-plugin-organize-imports - npm
September 18, 2025 - Make sure that your import statements ... are. A plugin that makes Prettier organize your imports (i. e. sorts, combines and removes unused ones) using the organizeImports feature of the TypeScript language service API...
      » npm install prettier-plugin-organize-imports
    
Published   Sep 18, 2025
Version   4.3.0
Author   Simon Haenisch
🌐
GitHub
github.com › trivago › prettier-plugin-sort-imports
trivago/prettier-plugin-sort-imports
A prettier plugin to sort import declarations by provided Regular Expression order.
Author   trivago
Discussions

How to automatically sort imports in VS Code?
I use prettier-plugin-organize-imports https://www.npmjs.com/package/prettier-plugin-organize-imports More on reddit.com
🌐 r/vuejs
6
11
March 10, 2025
node.js - prettier-plugin-sort-imports ignores import order - Stack Overflow
I am using @trivago/prettier-plugin-sort-imports 4.0.0 with prettier 2.6.2 and it seems that it just plainly ignores what I am writing in there. Or I cannot figure out how to correctly specify what I More on stackoverflow.com
🌐 stackoverflow.com
Is it possible to remove unused imports with Prettier?
I can't see anything in the docs and I don't know if there is a way to add extra eslint plugins to Prettier. ... Does this answer your question? Is there a way to remove unused imports and declarations from Angular 2+? ... You can use VS Code .vscode/settings.json to organize imports. More on stackoverflow.com
🌐 stackoverflow.com
Sorting Import statements in VS Code with Prettier
Is there a written version? More on reddit.com
🌐 r/vscode
8
19
July 29, 2022
🌐
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 - This plugin receives an array of strings. It uses these strings to decide the order of our imports! So for example in my small sample project I have the following files: So we’ll have to set up the rules to configure them. I typically like the following order: ... This will cover mostly everything! So let’s create a .prettierrc (a prettier configuration file) at the route of our project.
🌐
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?

🌐
Stack Overflow
stackoverflow.com › questions › 76127977 › prettier-plugin-sort-imports-ignores-import-order
node.js - prettier-plugin-sort-imports ignores import order - Stack Overflow
235 What's the difference between prettier-eslint, eslint-plugin-prettier and eslint-config-prettier? 6 Prettier next (2.6.0) + import order plugin @trivago/prettier-plugin-sort-imports Error Ignored unknown option { importOrderSeparation: true }
Find elsewhere
🌐
GitHub
github.com › simonhaenisch › prettier-plugin-organize-imports › releases
Releases · simonhaenisch/prettier-plugin-organize-imports
Make Prettier organize your imports using the TypeScript language service API. - Releases · simonhaenisch/prettier-plugin-organize-imports
Author   simonhaenisch
🌐
npm
npmjs.com › prettier-plugin-sort-imports
prettier-plugin-sort-imports
August 1, 2011 - A prettier plugin that sorts import statements by either their length or alphabetically.
      » npm install prettier-plugin-sort-imports
    
Published   Feb 17, 2026
Version   1.8.11
Author   Sander Ronde
🌐
James Shopland
jamesshopland.com › blog › sort-imports-with-prettier
Organising your JavaScript imports with Prettier | James Shopland
October 6, 2023 - Now that the plugin is installed, you would find that if you ran Prttier it would have some defaults, which is sorting imports alphabetically. This isnt what I want, so lets jump in to some basic configuration. If you’d like to see more example, visit the documentation here ... If we wanted to ensure specific imports are always at the top, for example react, we need to add another line to our prettier config, importOrder
🌐
Prettier
prettier.io › docs › plugins
Plugins · Prettier
Thus, the two print functions – the one from the core and the one from the plugin – call each other while descending down the AST recursively. Here’s a simplified example to give an idea of what a typical implementation of print looks like: import * as prettier from "prettier"; const { group, indent, join, line, softline } = prettier.doc.builders; function print(path, options, print) { const node = path.node; switch (node.type) { case "list": return group([ "(", indent([softline, join(line, path.map(print, "elements"))]), softline, ")", ]); case "pair": return group([ "(", indent([softline, print("left"), line, ".
🌐
Norday Tech
norday.tech › posts › 2023 › automatically-sort-import-statements-with-prettier
Automatically sort import statements with Prettier | Norday Tech
July 31, 2023 - We used option 1 so other commits aren’t clouded by a change to another import order. This choice depends heavily on your project and organization. It’s now possible to also sort the order of your imports automatically with a Prettier extension. You need to configure the different types of import to your .prettierrc and optionally enable the option to create newlines between each import group.
🌐
YouTube
youtube.com › watch
Clean up your JavaScript imports with Prettier - YouTube
Leverage the power of Prettier to keep your code based organised. I'll show you this powerful plugin to neatly and automatically sort our imports to keep our...
Published   October 5, 2023
🌐
npm
npmjs.com › package › prettier-plugin-imports
prettier-plugin-imports - npm
April 24, 2025 - A prettier plugin to sort import declarations by provided Regular Expression order, while preserving side-effect import order.
      » npm install prettier-plugin-imports
    
Published   Apr 24, 2025
Version   4.3.3
Author   Avirup Ghosh
🌐
npm Trends
npmtrends.com › @trivago › prettier-plugin-sort-imports-vs-import-sort-vs-prettier-plugin-organize-imports
@trivago/prettier-plugin-sort-imports vs import-sort vs prettier-plugin-organize-imports | npm trends
Comparing trends for @trivago/prettier-plugin-sort-imports 6.0.2 which has 2,254,076 weekly downloads and 3,875 GitHub stars vs. import-sort 6.0.0 which has 60,541 weekly downloads and 464 GitHub stars vs. prettier-plugin-organize-imports 4.3.0 which has 1,775,943 weekly downloads and 1,218 ...
🌐
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

🌐
GitHub
github.com › simonhaenisch › prettier-plugin-organize-imports › blob › master › prettier.d.ts
prettier-plugin-organize-imports/prettier.d.ts at master · simonhaenisch/prettier-plugin-organize-imports
Make Prettier organize your imports using the TypeScript language service API. - simonhaenisch/prettier-plugin-organize-imports
Author   simonhaenisch