Skip to content

eslint/no-duplicate-imports Style

🚧 An auto-fix is still under development.

What it does

Disallow duplicate module imports

Why is this bad?

Using a single import statement per module will make the code clearer because you can see everything being imported from that module on one line.

Examples

Examples of incorrect code for this rule:

js
import { merge } from "module";
import something from "another-module";
import { find } from "module";

Examples of correct code for this rule:

js
import { merge, find } from "module";
import something from "another-module";

References

Released under the MIT License.