# eslint-plugin-import-helpers

> ESLint Rules to Aid with Imports

Latest version **2.0.2** (published 2026-05-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-import-helpers
pnpm add eslint-plugin-import-helpers
yarn add eslint-plugin-import-helpers
bun add eslint-plugin-import-helpers
```

## Health

**Score 45/100 (D)** — status: active.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2026-05-27 |
| First published | 2019-03-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 28.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 294 |
| Author | Will Honey |
| Maintainers | tibfib |
| Keywords | eslint, eslint-plugin, eslintplugin, import, eslint-plugin-import, configurable |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-import-helpers
- Repository: https://github.com/Tibfib/eslint-plugin-import-helpers
- Homepage: https://github.com/Tibfib/eslint-plugin-import-helpers#readme
- Issues: https://github.com/Tibfib/eslint-plugin-import-helpers/issues
- npm.io page: https://npm.io/package/eslint-plugin-import-helpers

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2026-05-27
- 2.0.1 — 2024-10-23
- 2.0.0 — 2024-10-23
- 1.3.1 — 2022-10-26
- 1.3.0 — 2022-10-14
- 1.2.1 — 2022-01-07
- 1.2.0 — 2021-11-19
- 1.1.0 — 2020-07-10
- 1.0.2 — 2019-07-05
- 1.0.1 — 2019-06-09
- 1.0.0 — 2019-06-08
- 1.0.0-0 — 2019-06-07
- 0.1.4 — 2019-03-23
- 0.1.3 — 2019-03-22
- 0.1.2 — 2019-03-22
- … 2 more at https://npm.io/package/eslint-plugin-import-helpers/versions

## README

# eslint-plugin-import-helpers

> Originally forked/inspired by [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import) and [this fork](https://github.com/dannysindra/eslint-plugin-import)

[![npm version](https://badge.fury.io/js/eslint-plugin-import-helpers.svg)](https://badge.fury.io/js/eslint-plugin-import-helpers)

This package was created to supplement the rules provided by [eslint-plugin-import](https://github.com/benmosher/eslint-plugin-import). There are a lot of great rules in there, but we found it missing a few key use cases.

# Alternatives

> [!TIP]
> Use Prettier!

I recommend using [@ianvs/prettier-plugin-sort-imports](https://github.com/IanVS/prettier-plugin-sort-imports) instead of this ESLint plugin for sorting imports. It works really well and I think Prettier is better suited for formatting-related rules.

# Rules

#### [`order-imports`]

Enforce a _configurable_ convention in module import order. See the [`order-imports`] page for configuration details.

```javascript
// Given ESLint Config
rules: {
  'import-helpers/order-imports': [
      'warn',
      {
          newlinesBetween: 'always', // new line between groups
          groups: [
              'module',
              '/^@shared/',
              ['parent', 'sibling', 'index'],
          ],
          alphabetize: { order: 'asc', ignoreCase: true },
      },
  ],
}

// will fix
import SiblingComponent from './SiblingComponent';
import lodash from 'lodash';
import SharedComponent from '@shared/components/SharedComponent';
import React from 'react';

// into
import lodash from 'lodash';
import React from 'react';

import SharedComponent from '@shared/components/SharedComponent';

import SiblingComponent from './SiblingComponent';
```

[`order-imports`]: ./docs/rules/order-imports.md

# Installation

```sh
npm install eslint-plugin-import-helpers -g
```

or if you manage ESLint as a dev dependency:

```sh
# inside your project's working tree
npm install eslint-plugin-import-helpers --save-dev
```

To add a rule, update your `.eslintrc.(yml|json|js)`:

```js
{
    // .eslintrc.js
    plugins: ['eslint-plugin-import-helpers'],
    rules: {
        'import-helpers/order-imports': [
            'warn',
            { // example configuration
                newlinesBetween: 'always',
                groups: [
                    'module',
                    '/^@shared/',
                    ['parent', 'sibling', 'index'],
                ],
                alphabetize: { order: 'asc', ignoreCase: true },
            },
        ],
    }
}
```

# ESLint Versions

The 2.0 version supports ESLint v9. It may still work with older versions of ESLint but we no longer test against it. If you need ESLint v8 support, use 1.X.

# TypeScript

To use this plugin with TypeScript, you must use the TypeScript parser for ESLint. See [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/parser) for more details.

Please note that the import sorter does not currently work with `type` imports.

# Working with This Repo

## Dependencies

| Name                          | Version |
| ----------------------------- | ------- |
| [node.js](https://nodejs.org) | 22.x    |

## Running Tests

First, `npm install`
Then, `npm test`

---
_Source: https://npm.io/package/eslint-plugin-import-helpers · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
