eslint-plugin-ft-flow icon indicating copy to clipboard operation
eslint-plugin-ft-flow copied to clipboard

Allow mixed type-import-style

Open FezVrasta opened this issue 1 year ago • 1 comments

I'd like to ensure no side effects are introduced by type imports, that means if I only import a type from a module, it should use the declaration syntax (import type { X } from 'y').

If I import a mix of types and normal exports from a module though, I don't care about this:

// this separation is not useful as the first import will run any module side effects.
import { X } from 'y';
import type { Z } from 'y';

Right now the type-import-style rule doesn't allow to specify this. Do you think it could be implemented?

FezVrasta avatar Mar 30 '23 15:03 FezVrasta