Description
Proposal
{
"rules": {
"@typescript-eslint/prefer-import-type": ["error"]
}
}
// your repro code case
import {FooBar} from 'foo-bar';
const foo: FooBar = {foo: 1, bar: 2};
Expected Result
FooBar is only being used as a type, import as 'import type {FooBar}'
Actual Result
Additional Info
Since typescript now supports import type {X}
for type only imports that don't get emitted in js, nor do get counted as cyclic imports, it would be nice to have typescript-eslint automatically flag and fix import {T}
to import type {T}
If you're willing to accept the suggestion, I'm happy to create a PR and land this