Skip to content

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.

import { type A } from "flint";
import { type A, type B } from "flint";

This rule is not configurable.

If you’re not using TypeScript’s verbatimModuleSyntax option and your bundler handles import optimization for you, this rule may not be necessary.

Made with ❤️‍🔥 in Boston by Josh Goldberg and contributors.