Open
Description
In TypeScript, you can force a type import's module resolution to be either ESM or CJS with the following:
import type {Foo} from 'some-package' with {'resolution-mode': 'import'};
This is documented here: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-3.html#stable-support-resolution-mode-in-import-types
However, TypeScript only allows this when the type
is top-level. In other words, this gives a compiler error:
import {type Foo} from 'some-package' with {'resolution-mode': 'import'};
// ^ Error: `resolution-mode` can only be set for type-only imports.
This is a problem when import-x/consistent-type-specifier-style
is set to prefer-inline
. The rule option shouldn't warn in this case.