import-js/eslint-plugin-import

[no-duplicates] prefer-inline breaks unassigned and top-level type imports

Open

#3,130 opened on Dec 23, 2024

 (4 comments) (0 reactions) (0 assignees)JavaScript (1,550 forks)batch import
bughelp wantedtypescript

Repository metrics

Stars
 (5,940 stars)
PR merge metrics
 (Avg merge 138d 22h) (3 merged PRs in 30d)

Description

"import/no-duplicates": ["error", { "prefer-inline": true }],

Will detect an error in the following typescript code:

import type { X } from "xyz";

import "xyz";

// [...]

It will auto-fix by removing the import "xyz"; statement. This is not the desired behavior. I would expect it to stay as is.

Merry Christmas 🎄

Contributor guide