Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. ESLint
  3. Simple import sort

Simple import sort

MITJavaScript

An ESLint plugin that automatically sorts imports and exports with a simple, opinionated approach.

GitHubGitHub
2.4k stars73 forks0 contributors

What is Simple import sort?

eslint-plugin-simple-import-sort is an ESLint plugin that automatically sorts import and export statements in JavaScript and TypeScript code. It solves the problem of inconsistent import ordering by providing a simple, autofixable rule that integrates directly into ESLint workflows. The plugin groups imports logically and sorts them alphabetically, ensuring clean and maintainable codebases.

Target Audience

JavaScript and TypeScript developers who use ESLint and want to automate import sorting without configuring complex rules. It's ideal for teams seeking consistent code style with minimal setup.

Value Proposition

Developers choose this plugin for its simplicity, reliability, and seamless autofix integration. Unlike more complex alternatives, it offers sensible defaults, handles edge cases like comments and TypeScript, and reduces merge conflicts by being git diff friendly.

Overview

Easy autofixable import sorting.

Use Cases

Best For

  • Automatically sorting imports in ESLint-enabled projects
  • Enforcing consistent import order across team codebases
  • Reducing manual formatting work with autofix integration
  • Handling TypeScript projects with type imports and exports
  • Minimizing git diff noise by sorting on the `from` string
  • Integrating with Prettier or dprint for comprehensive code formatting

Not Ideal For

  • Projects still using CommonJS `require` statements extensively, as the plugin only supports ES module imports.
  • Teams needing granular control over import ordering with multiple configuration options, such as custom sorting within groups or sorting by import names.
  • Codebases where automatic grouping for exports is required, since exports rely on manual comments for grouping.
  • Environments where sorting side effect imports is necessary, as they are intentionally kept in original order for safety.

Pros & Cons

Pros

Seamless Autofix Integration

Directly works with `eslint --fix` for automatic sorting, eliminating the need for separate tools and manual effort, as emphasized in the README's example usage.

Comment and TypeScript Support

Preserves comments during sorting and fully handles TypeScript, including type imports and exports, with examples provided in the README's sorting section.

Git Diff Friendly

Sorts based on the `from` string to minimize version control noise and reduce merge conflicts, a key feature explained under 'Why sort on from?' in the FAQ.

Flexible Custom Grouping

Offers a single but powerful `groups` option using regex patterns for defining import sections, allowing tailored grouping without complexity, as detailed in the Custom Grouping section.

Cons

No require Support

Intentionally lacks support for CommonJS `require` statements, limiting usability in projects not yet migrated to ES modules, as admitted in the FAQ.

Limited Configuration

Only provides one option (`groups`) and fixed sorting rules within groups, which may not suffice for teams with complex or non-standard import ordering needs, as noted in the 'Not for everyone' section.

Manual Export Grouping

Requires manual comments to group exports, unlike imports which have automatic grouping, adding overhead for maintaining export organization.

Frequently Asked Questions

Quick Stats

Stars2,441
Forks73
Contributors0
Open Issues3
Last commit6 days ago
CreatedSince 2018

Tags

#developer-tools#typescript#code-quality#eslint-plugin#javascript#code-formatting#import-sorting#eslint#linting

Included in

ESLint4.7k
Auto-fetched 1 day ago

Related Projects

perfectionist sortingperfectionist sorting

☂️ ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.

Stars2,880
Forks62
Last commit8 days ago
filenamesfilenames

Eslint plugin to check filenames.

Stars320
Forks34
Last commit1 year ago
pathspaths

A plugin for ESLint, to force use paths aliases from tsconfig

Stars87
Forks4
Last commit11 months ago
ESLint StylisticESLint Stylistic

Formatting and stylistic ESLint core rules moved to this project and are maintained by the community

Stars0
Forks0
Last commit
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub