Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

prettier-plugin-organize-imports

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-organize-imports

Make prettier organize your imports using the TypeScript language service API.

latest
Source
npmnpm
Version
4.3.0
Version published
Weekly downloads
1.7M
2.97%
Maintainers
1
Weekly downloads
 
Created

What is prettier-plugin-organize-imports?

The prettier-plugin-organize-imports npm package is a plugin for Prettier that automatically organizes and sorts your import statements in JavaScript and TypeScript files. It helps maintain a clean and consistent import structure in your codebase.

What are prettier-plugin-organize-imports's main functionalities?

Sort Imports Alphabetically

This feature sorts the import statements alphabetically by module name, making it easier to find and manage imports.

import { B } from 'moduleB';
import { A } from 'moduleA';
import { C } from 'moduleC';

Group Imports

This feature groups imports from built-in modules, external modules, and local modules separately, improving the readability of the import section.

import fs from 'fs';
import path from 'path';

import { A } from 'moduleA';
import { B } from 'moduleB';

Remove Unused Imports

This feature removes any import statements that are not used in the file, helping to keep the code clean and free of unnecessary dependencies.

import { A } from 'moduleA';
import { B } from 'moduleB';

const a = new A();

Other packages similar to prettier-plugin-organize-imports

Keywords

prettier

FAQs

Package last updated on 18 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts