Prettier Plugin: Organize Imports
JSON →This Prettier plugin automates the organization of import statements within your JavaScript, TypeScript, JSX, TSX, and Vue files. It leverages the TypeScript language service API's `organizeImports` feature, which is the same logic used by VS Code's 'Organize Imports' action. The plugin sorts, combines, and removes unused imports, ensuring consistent import structures across your codebase and reducing merge conflicts related to import ordering. The current stable version is 4.3.0, with minor releases occurring periodically to address bug fixes, improve compatibility with `vue-tsc`, and introduce new configuration options like `organizeImportsTypeOrder`. A key differentiator is its reliance on the robust TypeScript language service for import logic, offering zero-config setup for Prettier v2 users and minimal configuration for Prettier v3. It acts by extending and overriding Prettier's built-in parsers, meaning it's incompatible with other plugins that attempt to do the same for `babel`, `typescript`, or `vue` parsers. It primarily manages peer dependencies `prettier`, `typescript`, and optionally `vue-tsc` for Vue.js support.
Traffic · last 30 days ↓37% vs prev 7d
top countries 🇺🇸 United States · 🇳🇴 Norway · 🇨🇦 Canada · 🇯🇵 Japan · BD