lydell / eslint-plugin-simple-import-sort

Easy autofixable import sorting.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Duplicate imports are not being removed

RoySchiffmannGrip opened this issue · comments

For some reason when I'm having duplicated import from the same module, auto-fix unifies them into the same import line but unfortunately it keeps the duplication, for example:

import { something } from "./somewhere.ts";
import { something } from "./somewhere.ts";

after auto-fix will turn to be:

import { something, something } from "./somewhere.ts";

Is there already a configuration that will auto-delete the redundant duplicated imports?

Hi! This plugin does not handle removing duplicates, only sorting. (This is hinted at slightly at https://github.com/lydell/eslint-plugin-simple-import-sort#example-configuration, which suggests using import/no-duplicates.)