import-js/eslint-plugin-import

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

Open

#3.130 geöffnet am 23. Dez. 2024

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (4.946 Stars) (1.540 Forks)batch import
bughelp wantedtypescript

Beschreibung

"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