importTypeSideEffects
Reports imports that use inline type qualifiers on all specifiers when a top-level type qualifier should be used instead.
✅ This rule is included in the ts logical presets.
When using TypeScript’s verbatimModuleSyntax option, imports with inline type qualifiers on every specifier (like import { type A, type B }) get transpiled to an empty import statement (import "mod").
This creates an unnecessary side-effect import at runtime.
Using a top-level import type declaration ensures the entire import statement is removed during transpilation.
Examples
Section titled “Examples”import { type A } from "flint";import { type A, type B } from "flint";import type { A, B } from "flint";// Mixed type and value imports are allowedimport { type A, value } from "flint";Options
Section titled “Options”This rule is not configurable.
When Not To Use It
Section titled “When Not To Use It”If you’re not using TypeScript’s verbatimModuleSyntax option and your bundler handles import optimization for you, this rule may not be necessary.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.