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.
Examples
Section titled “Examples”import {} from "mod";import Default from "mod";import type {} from "mod";import { named } from "mod";import Default from "mod";import * as mod from "mod";import "mod"; // Side-effect imports are allowedOptions
Section titled “Options”This rule is not configurable.
When Not To Use It
Section titled “When Not To Use It”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.
Further Reading
Section titled “Further Reading”Equivalents in Other Linters
Section titled “Equivalents in Other Linters”- ESLint:
import/no-empty-named-blocks - Oxlint:
import/no-empty-named-blocks
Made with ❤️🔥 in Boston by
Josh Goldberg and contributors.