import-js/eslint-plugin-import

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

Open

#3130 aperta il 23 dic 2024

Vedi su GitHub
 (4 commenti) (0 reazioni) (0 assegnatari)JavaScript (1540 fork)batch import
bughelp wantedtypescript

Metriche repository

Star
 (4946 star)
Metriche merge PR
 (Merge medio 138g 22h) (3 PR mergiate in 30 g)

Descrizione

"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 🎄

Guida contributor