# eslint-plugin-sort-imports-es6-autofix

> A sort-imports rule that properly distinguishes between ES6 import types.

Latest version **0.6.0** (published 2021-03-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install eslint-plugin-sort-imports-es6-autofix
pnpm add eslint-plugin-sort-imports-es6-autofix
yarn add eslint-plugin-sort-imports-es6-autofix
bun add eslint-plugin-sort-imports-es6-autofix
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.0 |
| Published | 2021-03-18 |
| First published | 2017-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 18 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 81 |
| Author | marudor |
| Maintainers | marudor |
| Keywords | eslint, eslintplugin, eslint-plugin |

## Links

- npm: https://www.npmjs.com/package/eslint-plugin-sort-imports-es6-autofix
- Repository: https://github.com/schuchertmanagementberatung/eslint-plugin-sort-imports-es6-autofix
- npm.io page: https://npm.io/package/eslint-plugin-sort-imports-es6-autofix

## 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

- 0.6.0 (latest) — 2021-03-18
- 0.5.0 — 2019-08-29
- 0.4.0 — 2019-02-27
- 0.3.0 — 2018-03-19
- 0.2.2 — 2018-01-24
- 0.2.1 — 2018-01-18
- 0.2.0 — 2018-01-18
- 0.1.1 — 2017-02-12
- 0.1.0 — 2017-02-12

## README

# eslint-plugin-sort-imports-es6-autofix

A sort-imports rule that properly distinguishes between ES6 import types and that is also able to autofix all detected problems.

ESLint's built-in `sort-imports` rule considers the following to be the same type of import:

```js
import foo from 'foo';
import { bar } from 'bar';
```

This version of the rule fixes that.

It accepts the same options as the [original rule](http://eslint.org/docs/rules/sort-imports), but the `multiple` type corresponds to all named imports (regardless of how many are imported), while the `single` type corresponds only to default imports.

This rule respects whitespace and comments between imports by only looking at the order of (and sorting) consecutive import statements (those without newlines/comments in between them).

This fork also fixes the import order on eslint --fix.
To avoid problems, it will only switch out the import statements, not comments on the same line, etc.

ESLint's built-in `sort-imports` is only able to sort variable names inside of `multiple`-imports.

## Usage

`npm i --save-dev eslint-plugin-sort-imports-es6-autofix`

```json
{
  "plugins": [
    "sort-imports-es6-autofix"
  ],
  "rules": {
    "sort-imports-es6-autofix/sort-imports-es6": [2, {
      "ignoreCase": false,
      "ignoreMemberSort": false,
      "memberSyntaxSortOrder": ["none", "all", "multiple", "single"]
    }]
  }
}
```

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