Skip to content

importEmptyBlocks

Reports empty named import blocks.

✅ This rule is included in the ts logical presets.

Empty named import blocks (import { } from "mod") have no effect and are likely the result of incomplete refactoring or accidental deletion of import specifiers. This rule detects such empty blocks to help keep imports clean and intentional.

import {} from "mod";
import Default from "mod";
import type {} from "mod";

This rule is not configurable.

If you intentionally use empty named import blocks as placeholders during development or have tooling that generates such imports temporarily, you might disable this rule.

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